-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (40 loc) · 1.38 KB
/
index.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
const toggleContact = () => {
if(document.getElementById('contact').style.display==""){
document.getElementById('contact').style.display="flex";
document.getElementById('about-me').style.display="";
}
else{
document.getElementById('contact').style.display="";
}
}
const toggleAbout = () => {
if(document.getElementById('about-me').style.display==""){
document.getElementById('contact').style.display="";
document.getElementById('about-me').style.display="flex";
}
else{
document.getElementById('about-me').style.display="";
}
}
const toggleProjects = () => {
document.getElementById('projects').style.display="flex";
}
const slideOut = () => {
document.getElementById('projects').style.animation="";
document.getElementById('projects').style.animation="slide-out 1s both";
setTimeout(() => {
document.getElementById('projects').style.display="";
document.getElementById('projects').style.animation="slide-in-projects 1s";
},
1000);
}
const offSound = () => {
if(document.getElementById("ambient").paused){
document.getElementById('speaker').src="./assets/volume-line.svg";
document.getElementById("ambient").play();
}
else{
document.getElementById('speaker').src="./assets/silent-line.svg";
document.getElementById("ambient").pause();
}
};