-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
31 lines (26 loc) · 890 Bytes
/
app.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
function handleTabClick(button) {
document.querySelector(".active-btn").classList.remove("active-btn");
button.classList.add("active-btn");
document.querySelector(".active").classList.remove("active");
document.getElementById(button.dataset.id).classList.add("active");
}
function toggleLightMode() {
document.body.classList.toggle("light-mode");
}
document.querySelectorAll(".control").forEach((button) => {
button.addEventListener("click", function () {
handleTabClick(this);
});
});
document.querySelector(".theme-btn").addEventListener("click", () => {
toggleLightMode();
});
function downloadCV() {
const cvPath = "./ReSume HanZaLa....pdf";
const link = document.createElement("a");
link.download = "Resume.pdf";
link.href = cvPath;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}