-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
121 lines (103 loc) · 2.91 KB
/
script.js
File metadata and controls
121 lines (103 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// script.js
function printResume() {
const printWindow = window.open('', '_blank');
const outputContent = document.getElementById('output').innerHTML;
printWindow.document.open();
printWindow.document.write(`
<html>
<head>
<title>Printed Resume</title>
<style>
body {
font-family: 'Arial', sans-serif;
margin: 20px;
background-color: #f4f4f4;
}
<style>
body {
font-family: 'Arial', sans-serif;
margin: 20px;
background-color: #f4f4f4;
}
#resume {
max-width: 800px;
margin: auto;
background-color: #ffffff;
border: 1px solid #ddd;
border-radius: 10px;
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
h1,
h2 {
color: #333;
}
label {
font-weight: bold;
display: block;
margin-top: 10px;
color: #555;
}
input,
textarea {
width: 100%;
padding: 8px;
margin-top: 5px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
background-color: #4CAF50;
color: white;
padding: 10px 15px;
border: none;
border-radius: 5px;
cursor: pointer;
margin-top: 10px;
}
button:hover {
background-color: #45a049;
}
#output {
margin-top: 20px;
padding: 30px;
}
#output h2,
#output p,
#output ul {
margin-bottom: 10px;
}
#output ul {
list-style: none;
padding: 0;
}
#output li {
margin-left: 20px;
padding-left: 10px;
position: relative;
border-left: 2px solid #4CAF50;
}
/* Decorative line after each section */
h1::after,
h2::after,
label::after,
button::after {
content: "";
display: block;
width: 50px;
height: 2px;
background-color: #4CAF50;
margin-top: 10px;
}
</style> </style>
</head>
<body>${outputContent}</body>
</html>
`);
printWindow.document.close();
// Wait for content to be loaded before printing
printWindow.onload = function () {
printWindow.print();
};
}