-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
97 lines (77 loc) · 3.23 KB
/
script.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
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
const toggleTheme = document.querySelector("#toggle-theme-btn");
const header = document.querySelector(".header");
const navLinks = document.querySelectorAll("ul li a");
const hire = document.querySelector("#hire-me");
const connect = document.querySelector("#connect-me");
const imgs = document.querySelectorAll(".img img");
const skilltabs = document.querySelectorAll(".skill-tab");
const projectTabs = document.querySelectorAll(".project-tab");
const projectTabsImgs = document.querySelectorAll(".project-tab .img img");
const projectLinksBtns = document.querySelectorAll(".btn");
const projectLinks = document.querySelectorAll(".btn a");
const contactInputs = document.querySelectorAll("input");
const contactTextarea = document.querySelector("textarea");
const messageBtn = document.querySelector(".message-btn button");
const contactEmail = document.querySelector(".contact-email h1 a");
const contactSvgs = document.querySelectorAll("svg");
toggleTheme.addEventListener("click", () => {
document.body.classList.toggle("theme");
header.classList.toggle("theme");
hire.classList.toggle("button-theme");
connect.classList.toggle("button-theme");
toggleTheme.classList.toggle("toggle-light-theme");
navLinks.forEach((link) => {
link.classList.toggle("text-black");
});
skilltabs.forEach((tab) => {
tab.classList.toggle("button-theme");
});
imgs.forEach((img) => {
img.classList.toggle("img-theme");
});
projectTabs.forEach((tab) => {
tab.classList.toggle("button-theme");
});
projectTabsImgs.forEach((img) => {
img.classList.toggle("project-img-theme");
});
projectLinksBtns.forEach((btn) => {
btn.classList.toggle("color-black");
});
projectLinks.forEach((link) => {
link.classList.toggle("text-black");
});
contactInputs.forEach((input) => {
input.classList.toggle("contact-border");
});
contactTextarea.classList.toggle("contact-border");
messageBtn.classList.toggle("contact-btn-theme");
contactEmail.classList.toggle("text-black");
contactSvgs.forEach((svg) => {
svg.classList.toggle("svg-black");
});
});
////////////////////////////////////////////////
// gsap.to(".img10", { opacity: 0, duration: 1 });
// gsap.to(".img10", { opacity: 0, duration: 1, });
// gsap.to(".img9", { opacity: 0, duration: 2 });
// gsap.to(".img8", { opacity: 0, duration: 3 });
// gsap.to(".img7", { opacity: 0, duration: 4 });
// gsap.to(".img6", { opacity: 0, duration: 5 });
// gsap.to(".img5", { opacity: 0, duration: 6 });
// gsap.to(".img4", { opacity: 0, duration: 7 });
// gsap.to(".img3", { opacity: 0, duration: 8 });
// gsap.to(".img2", { opacity: 0, duration: 9 });
// gsap.to(".img1", { opacity: 0, duration: 10 });
// let t1 = gsap.timeline();
// t1.to(".img10", { display: "none", duration: 1 });
// t1.to(".img9", { display: "none", duration: 1 });
// t1.to(".img8", { display: "none", duration: 1 });
// t1.to(".img7", { display: "none", duration: 1 });
// t1.to(".img6", { display: "none", duration: 1 });
// t1.to(".img5", { display: "none", duration: 1 });
// t1.to(".img4", { display: "none", duration: 1 });
// t1.to(".img3", { display: "none", duration: 1 });
// t1.to(".img2", { display: "none", duration: 1 });
// // t1.to(".img1", { display: "none", duration: 1 });
// t1.repeat(-1);