-
Notifications
You must be signed in to change notification settings - Fork 0
/
cvscript.js
68 lines (56 loc) · 2.23 KB
/
cvscript.js
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
const navExperience = document.getElementById("exp");
const navEducation = document.getElementById("edu");
const navSkills = document.getElementById("ski");
const experienceContainer = document.getElementById("experience");
const educationContainer = document.getElementById("education");
const skillsContainer = document.getElementById("skills");
const sendMessage = document.getElementById("send");
sendMessage.addEventListener("click", () => {
prompt("What is your message?");
alert("Anjali will try and get back to you.");
console.log("Thankyou! We will get back to you soon 🤠");
});
navExperience.addEventListener("click", () => {
navExperience.classList.add("active");
navSkills.classList.remove("active");
navEducation.classList.remove("active");
experienceContainer.hidden = false;
educationContainer.hidden = true;
skillsContainer.hidden = true;
});
navEducation.addEventListener("click", () => {
navExperience.classList.remove("active");
navSkills.classList.remove("active");
navEducation.classList.add("active");
experienceContainer.hidden = true;
educationContainer.hidden = false;
skillsContainer.hidden = true;
});
navSkills.addEventListener("click", () => {
navExperience.classList.remove("active");
navSkills.classList.add("active");
navEducation.classList.remove("active");
experienceContainer.hidden = true;
educationContainer.hidden = true;
skillsContainer.hidden = false;
});
const toggle = document.getElementById("darkToggle");
const toggleBtn = document.getElementById("toggleBtn");
toggle.addEventListener("click", () => {
if (toggle.classList.contains("toggleOff")) {
toggle.classList.remove("toggleOff");
toggle.classList.add("toggleOn");
toggleBtn.classList.remove("off");
toggleBtn.classList.add("on");
document.body.classList.remove('lightMode');
document.body.classList.add('darkMode');
/*document.querySelectorAll('.darkModeText')*/
} else {
toggle.classList.add("toggleOff");
toggle.classList.remove("toggleOn");
toggleBtn.classList.add("off");
toggleBtn.classList.remove("on");
document.body.classList.add('lightMode');
document.body.classList.remove('darkMode')
}
});