-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.js
71 lines (64 loc) · 3.36 KB
/
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
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
/*Funtion Animation Menu Icon*/
export function Option(toggle) {
if (toggle == true) {
document.getElementById("op").style.width = "350px";
document.getElementById("bo").style.opacity = "1";
document.getElementById("item1").style.opacity = "1";
document.getElementById("item2").style.opacity = "1";
document.getElementById("item3").style.opacity = "1";
document.getElementById("item4").style.opacity = "1";
document.getElementById("item5").style.opacity = "1";
document.getElementById("shadow").style.opacity = "1";
document.getElementById("shadow").style.zIndex = "9";
document.getElementById("it").style.color = "rgb(177, 177, 177)";
document.getElementById("it2").style.color = "rgb(177, 177, 177)";
document.getElementById("it3").style.color = "rgb(177, 177, 177)";
document.getElementById("it4").style.color = "rgb(177, 177, 177)";
document.getElementById("it5").style.color = "rgb(177, 177, 177)";
document.getElementById("it6").style.color = "rgb(177, 177, 177)";
document.getElementById("it7").style.color = "rgb(177, 177, 177)";
document.getElementById("it8").style.color = "rgb(177, 177, 177)";
document.getElementById("logo-01").style.fill = "rgb(177, 177, 177)";
}
else {
document.getElementById("op").style.width = "0px"
document.getElementById("bo").style.opacity = "0";
document.getElementById("item1").style.opacity = "0";
document.getElementById("item2").style.opacity = "0";
document.getElementById("item3").style.opacity = "0";
document.getElementById("item4").style.opacity = "0";
document.getElementById("item5").style.opacity = "0";
document.getElementById("shadow").style.opacity = "0";
document.getElementById("shadow").style.zIndex = "0";
document.getElementById("it").style.color = "white";
document.getElementById("it").style.color = "white";
document.getElementById("it2").style.color = "white";
document.getElementById("it3").style.color = "white";
document.getElementById("it4").style.color = "white";
document.getElementById("it5").style.color = "white";
document.getElementById("it6").style.color = "white";
document.getElementById("it7").style.color = "white";
document.getElementById("it8").style.color = "white";
document.getElementById("logo-01").style.fill = "white";
}
}
var prevScrollpos = window.pageYOffset;
export default window.onscroll = function() {
var currentScrollPos = window.pageYOffset;
const element = document.getElementById("box-slide")
if (prevScrollpos > currentScrollPos) {
document.getElementById("box-slide").style.height = "100px";
document.getElementById("box-slide").style.top = "0";
document.getElementById("navbar-01").style.opacity = "1";
if (document.documentElement.scrollTop < 674) {
document.getElementById("box-slide").style.height = "0";
}
} else {
document.getElementById("op").style.width = "0px"
document.getElementById("bo").style.opacity = "0";
document.getElementById("box-slide").style.opacity = "1";
document.getElementById("box-slide").style.height = "0px";
document.getElementById("navbar-01").style.opacity = "0";
}
prevScrollpos = currentScrollPos;
}