forked from Ojas-Arora/SCD-Profile-Score
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresume.html
395 lines (352 loc) · 17.8 KB
/
resume.html
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Resume - Career Website</title>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
/>
<link rel="stylesheet" href="navbar.css" />
<link rel="stylesheet" href="resume.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar">
<div class="logo">
<button class="image-button1">
<img src="./image.png" alt="Image Button1" class="image-icon1">
</button>
<h2>Ajivika</h2>
</div>
<!-- Floating Image Button -->
<!-- hamburger menu -->
<button class="hamburger" onclick="toggleMenu()">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</button>
<!-- Navigation Links -->
<ul class="nav-links">
<li><a href="./index.html"><i class="fas fa-home"></i><span>Home</span></a></li>
<li><a href="./about.html"><i class="fas fa-address-card"></i> <span>About Us</span></a></li>
<li><a href="./contact.html"><i class="fas fa-envelope"></i> <span>Contact Us</span></a></li>
<li><a href="./pricing.html"><i class="fas fa-comments"></i><span>Go Pro</span></a></li>
<li><a href="./register.html"><i class="fas fa-user-plus"></i> <span>Register</span></a></li>
<li><button class="translate-button" onclick="toggleTranslate()">🌐</button>
<div id="google_translate_element"></div></li>
<li><label class="theme-switch">
<input type="checkbox" class="theme-switch__checkbox">
<div class="theme-switch__container">
<div class="theme-switch__clouds"></div>
<div class="theme-switch__stars-container">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 144 55" fill="none">
<path fill-rule="evenodd" clip-rule="evenodd" d="M135.831 3.00688C135.055 3.85027 134.111 4.29946 133 4.35447C134.111 4.40947 135.055 4.85867 135.831 5.71123C136.607 6.55462 136.996 7.56303 136.996 8.72727C136.996 7.95722 137.172 7.25134 137.525 6.59129C137.886 5.93124 138.372 5.39954 138.98 5.00535C139.598 4.60199 140.268 4.39114 141 4.35447C139.88 4.2903 138.936 3.85027 138.16 3.00688C137.384 2.16348 136.996 1.16425 136.996 0C136.996 1.16425 136.607 2.16348 135.831 3.00688ZM31 23.3545C32.1114 23.2995 33.0551 22.8503 33.8313 22.0069C34.6075 21.1635 34.9956 20.1642 34.9956 19C34.9956 20.1642 35.3837 21.1635 36.1599 22.0069C36.9361 22.8503 37.8798 23.2903 39 23.3545C38.2679 23.3911 37.5976 23.602 36.9802 24.0053C36.3716 24.3995 35.8864 24.9312 35.5248 25.5913C35.172 26.2513 34.9956 26.9572 34.9956 27.7273C34.9956 26.563 34.6075 25.5546 33.8313 24.7112C33.0551 23.8587 32.1114 23.4095 31 23.3545ZM0 36.3545C1.11136 36.2995 2.05513 35.8503 2.83131 35.0069C3.6075 34.1635 3.99559 33.1642 3.99559 32C3.99559 33.1642 4.38368 34.1635 5.15987 35.0069C5.93605 35.8503 6.87982 36.2903 8 36.3545C7.26792 36.3911 6.59757 36.602 5.98015 37.0053C5.37155 37.3995 4.88644 37.9312 4.52481 38.5913C4.172 39.2513 3.99559 39.9572 3.99559 40.7273C3.99559 39.563 3.6075 38.5546 2.83131 37.7112C2.05513 36.8587 1.11136 36.4095 0 36.3545ZM56.8313 24.0069C56.0551 24.8503 55.1114 25.2995 54 25.3545C55.1114 25.4095 56.0551 25.8587 56.8313 26.7112C57.6075 27.5546 57.9956 28.563 57.9956 29.7273C57.9956 28.9572 58.172 28.2513 58.5248 27.5913C58.8864 26.9312 59.3716 26.3995 59.9802 26.0053C60.5976 25.602 61.2679 25.3911 62 25.3545C60.8798 25.2903 59.9361 24.8503 59.1599 24.0069C58.3837 23.1635 57.9956 22.1642 57.9956 21C57.9956 22.1642 57.6075 23.1635 56.8313 24.0069ZM81 25.3545C82.1114 25.2995 83.0551 24.8503 83.8313 24.0069C84.6075 23.1635 84.9956 22.1642 84.9956 21C84.9956 22.1642 85.3837 23.1635 86.1599 24.0069C86.9361 24.8503 87.8798 25.2903 89 25.3545C88.2679 25.3911 87.5976 25.602 86.9802 26.0053C86.3716 26.3995 85.8864 26.9312 85.5248 27.5913C85.172 28.2513 84.9956 28.9572 84.9956 29.7273C84.9956 28.563 84.6075 27.5546 83.8313 26.7112C83.0551 25.8587 82.1114 25.4095 81 25.3545ZM136 36.3545C137.111 36.2995 138.055 35.8503 138.831 35.0069C139.607 34.1635 139.996 33.1642 139.996 32C139.996 33.1642 140.384 34.1635 141.16 35.0069C141.936 35.8503 142.88 36.2903 144 36.3545C143.268 36.3911 142.598 36.602 141.98 37.0053C141.372 37.3995 140.886 37.9312 140.525 38.5913C140.172 39.2513 139.996 39.9572 139.996 40.7273C139.996 39.563 139.607 38.5546 138.831 37.7112C138.055 36.8587 137.111 36.4095 136 36.3545ZM101.831 49.0069C101.055 49.8503 100.111 50.2995 99 50.3545C100.111 50.4095 101.055 50.8587 101.831 51.7112C102.607 52.5546 102.996 53.563 102.996 54.7273C102.996 53.9572 103.172 53.2513 103.525 52.5913C103.886 51.9312 104.372 51.3995 104.98 51.0053C105.598 50.602 106.268 50.3911 107 50.3545C105.88 50.2903 104.936 49.8503 104.16 49.0069C103.384 48.1635 102.996 47.1642 102.996 46C102.996 47.1642 102.607 48.1635 101.831 49.0069Z" fill="currentColor"></path>
</svg>
</div>
<div class="theme-switch__circle-container">
<div class="theme-switch__sun-moon-container">
<div class="theme-switch__moon">
<div class="theme-switch__spot"></div>
<div class="theme-switch__spot"></div>
<div class="theme-switch__spot"></div>
</div>
</div>
</div>
</div>
</label></li>
</ul>
</nav>
<!-- Resume Section -->
<div class="section1">
<section class="section resume-section" >
<h1>My Resume</h1>
<p>This is where you can view and manage your resume details.</p>
<div class="resume-box">
<h2>Resume Detail Entry</h2>
<form id="resumeForm">
<label for="name">Full Name<b>*</b></label>
<input type="text" id="name" name="name" required />
<label for="email">Email<b>*</b></label>
<input type="text" id="email" name="email" required />
<label for="phone">Phone Number<b>*</b></label>
<input type="text" id="phone" name="phone" required />
<fieldset>
<label for="education"><u>Education</u><b>*</b></label>
<label for="class10"
>10th percentage<b>*</b>
<input type="number" id="10th" name="10th" required />
</label>
<label for="schooling10"
>School<b>*</b>
<input type="text" id="10ths" name="10ths" required />
</label>
<label for="class12"
>12th percentage<b>*</b>
<input type="number" id="12th" name="12th" required />
</label>
<label for="schooling12"
>School<b>*</b>
<input type="text" id="12ths" name="12ths" required />
</label>
<label for="degree">Degree<b>*</b></label>
<input type="text" id="degree" name="degree" required />
<label for="institution">Institution<b>*</b></label>
<input type="text" id="institution" name="institution" required />
<label for="year">Passing Year<b>*</b></label>
<select id="year" name="year" required></select>
</fieldset>
<br />
<fieldset>
<label for="skills">Skills<b>*</b></label>
<div class="skills-container">
<div class="add-item">
<input
type="text"
id="skill-input"
placeholder="Enter a skill"
required
/>
<span
class="add-icon"
onclick="addItem('Skill', 'skills-list', 'skill-input')"
>+</span
>
</div>
<ul class="skills-list" id="skills-list"></ul>
</div>
</fieldset>
<br />
<fieldset>
<label for="Project">Project</label>
<div class="Project-container">
<div class="add-item">
<input
type="text"
id="job-input"
placeholder="Enter Project Title"
/>
<span
class="add-icon"
onclick="addItem('Job', 'Project-list', 'job-input')"
>+</span
>
</div>
<ul class="Project-list" id="Project-list"></ul>
</div>
</fieldset>
<br />
<fieldset>
<label for="achievements">Achievements</label>
<div class="achievements-container">
<div class="add-item">
<input
type="text"
id="company-input"
placeholder="Highlight Your Key Achievements"
/>
<span
class="add-icon"
onclick="addItem('Company', 'achievements-list', 'company-input')"
>+</span
>
</div>
<ul class="achievements-list" id="achievements-list"></ul>
</div>
</fieldset>
<button type="button" onclick="generatePDF()">
Download as PDF
</button>
</form>
</div>
</section>
</div>
<script>
// hamburger menu js
function toggleMenu() {
const navLinks = document.querySelector('.nav-links');
navLinks.classList.toggle('active');
}
</script>
<script>
// Populate year options
const yearSelect = document.getElementById("year");
const currentYear = new Date().getFullYear();
for (let i = currentYear; i >= 1990; i--) {
const option = document.createElement("option");
option.value = i;
option.text = i;
yearSelect.appendChild(option);
}
// Add skills, Project, and achievements
function addItem(type, listId, inputId) {
const input = document.getElementById(inputId);
const value = input.value.trim();
if (value) {
const list = document.getElementById(listId);
const li = document.createElement("li");
li.innerHTML = `<span>${value}</span><button onclick="removeItem(this)">x</button>`;
list.appendChild(li);
input.value = "";
}
}
// Remove skills, Project, or achievements
function removeItem(button) {
const li = button.parentElement;
li.remove();
}
// Generate PDF from form data
function generatePDF() {
const { jsPDF } = window.jspdf;
const doc = new jsPDF();
// Fetching input values
const name = document.getElementById("name").value;
const email = document.getElementById("email").value;
const phone = document.getElementById("phone").value;
const degree = document.getElementById("degree").value;
const institution = document.getElementById("institution").value;
const year = document.getElementById("year").value;
const tenthP = document.getElementById("10th").value;
const tenthC = document.getElementById("10ths").value;
const twelvethP = document.getElementById("12th").value;
const twelvethC = document.getElementById("12ths").value;
const skills = Array.from(
document.querySelectorAll("#skills-list li span")
).map((item) => item.textContent);
const projects = Array.from(
document.querySelectorAll("#projects-list li span")
).map((item) => item.textContent);
const achievements = Array.from(
document.querySelectorAll("#achievements-list li span")
).map((item) => item.textContent);
// Add styling
doc.setFillColor(255, 252, 230); // Light creamy background color
doc.rect(0, 0, 105, 297, "F"); // Fill the upper half of A4 paper
// Draw the remaining part of the background in white
doc.setFillColor(255, 255, 255); // White color
doc.rect(105, 0, 105, 297, "F"); // Fill the lower half of A4 paper
// Name and contact details
doc.setFontSize(24); // Enlarged font size for name
doc.setTextColor(0, 0, 0); // Black color
// Calculate text width and height for the name
const nameWidth = doc.getTextWidth(name);
const nameHeight = 10; // Rough estimate, adjust as needed
// Draw rectangle around name
const margin = 10; // Margin between text and rectangle
const nameBoxX = 105 - nameWidth / 2 - margin;
const nameBoxY = 30 - nameHeight / 2 - margin;
const nameBoxWidth = nameWidth + 2 * margin;
const nameBoxHeight = nameHeight + 2 * margin;
doc.setDrawColor(139, 69, 19); // Chocolate color
doc.setLineWidth(1); // Line width for rectangle
doc.rect(nameBoxX, nameBoxY, nameBoxWidth, nameBoxHeight);
// Add name text
doc.setFont("Times", "bold");
doc.setFontSize(24); // Enlarged font size for name
doc.text(name, 105, 35, { align: "center" });
// Contact details below the rectangle
doc.setFontSize(12);
// Headings bold
doc.setFont("Times", "bold");
const contactStartY = nameBoxY + nameBoxHeight + 10; // 10 units below the rectangle
doc.text(`10th Class %:`, 10, contactStartY);
doc.text(`10th Class:`, 10, contactStartY + 10);
doc.text(`12th Class %:`, 10, contactStartY + 20);
doc.text(`12th Class:`, 10, contactStartY + 30);
doc.text(`Email:`, 125, contactStartY);
doc.text(`Phone:`, 125, contactStartY + 10);
doc.text(`Degree:`, 125, contactStartY + 20);
doc.text(`Institution:`, 125, contactStartY + 30);
doc.text(`Year:`, 125, contactStartY + 40);
// Set font to normal for values
doc.setFont("Times", "normal");
doc.text(`${tenthP}`, 50, contactStartY); // Adjust the X position as needed
doc.text(`${tenthC}`, 50, contactStartY + 10); // Adjust the X position as needed
doc.text(`${twelvethP}`, 50, contactStartY + 20); // Adjust the X position as needed
doc.text(`${twelvethC}`, 50, contactStartY + 30); // Adjust the X position as needed
doc.text(`${email}`, 155, contactStartY);
doc.text(`${phone}`, 155, contactStartY + 10);
doc.text(`${degree}`, 155, contactStartY + 20);
doc.text(`${institution}`, 155, contactStartY + 30);
doc.text(`${year}`, 155, contactStartY + 40);
// Draw a horizontal line under the contact details
doc.setDrawColor(139, 69, 19); // Chocolate color
doc.setLineWidth(0.5);
doc.line(10, contactStartY + 50, 200, contactStartY + 50);
doc.line(10, contactStartY + 52, 200, contactStartY + 52);
// Skills section
doc.setFontSize(16);
doc.setFont("Times", "bold");
doc.text("Skills", 10, contactStartY + 60);
doc.setFontSize(12);
doc.setFont("Times", "normal");
skills.forEach((skill, index) => {
doc.text(`- ${skill}`, 10, contactStartY + 70 + index * 10);
});
// Draw a horizontal line after Skills section
let skillsEndY = contactStartY + 70 + skills.length * 10 + 10;
doc.setDrawColor(139, 69, 19); // Chocolate color
doc.setLineWidth(0.5);
doc.line(10, skillsEndY, 200, skillsEndY);
doc.line(10, skillsEndY + 2, 200, skillsEndY + 2);
// Projects section
doc.setFontSize(16);
doc.setFont("Times", "bold");
doc.text("Projects", 10, skillsEndY + 10);
doc.setFontSize(12);
doc.setFont("Times", "normal");
projects.forEach((project, index) => {
doc.text(`- ${project}`, 10, skillsEndY + 20 + index * 10);
});
// Draw a horizontal line after Projects section
let projectsEndY = skillsEndY + 20 + projects.length * 10 + 10;
doc.setDrawColor(139, 69, 19); // Chocolate color
doc.setLineWidth(0.5);
doc.line(10, projectsEndY, 200, projectsEndY);
doc.line(10, projectsEndY + 2, 200, projectsEndY + 2);
// Achievements section
doc.setFontSize(16);
doc.setFont("Times", "bold");
doc.text("Achievements", 10, projectsEndY + 10);
doc.setFontSize(12);
doc.setFont("Times", "normal");
achievements.forEach((achievement, index) => {
doc.text(`- ${achievement}`, 10, projectsEndY + 20 + index * 10);
});
// Draw footer
doc.setFontSize(10);
doc.setFont("Times", "normal");
doc.text("Generated by Resume Creator", 105, 290, { align: "center" });
// Save PDF
doc.save("resume.pdf");
}
</script>
<script>
document.addEventListener('DOMContentLoaded', () => {
const themeToggle = document.querySelector('.theme-switch__checkbox');
const currentTheme = localStorage.getItem('theme');
if (currentTheme === 'dark') {
document.body.classList.add('dark');
document.body.classList.remove('light');
themeToggle.checked = true;
} else {
document.body.classList.add('light');
document.body.classList.remove('dark');
}
themeToggle.addEventListener('change', () => {
if (themeToggle.checked) {
document.body.classList.add('dark');
document.body.classList.remove('light');
localStorage.setItem('theme', 'dark');
} else {
document.body.classList.remove('dark');
document.body.classList.add('light');
localStorage.setItem('theme', 'light');
}
});
});
</script>
</body>
</html>