forked from thedevslot/WhatATheme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.html
More file actions
40 lines (37 loc) · 1015 Bytes
/
Copy pathdefault.html
File metadata and controls
40 lines (37 loc) · 1015 Bytes
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
---
layout: compress
---
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
{% include navbar.html %}
{% include showcase.html %}
{% include about.html %}
{% include contact.html %}
<!--Footer begins here-->
{% include footer.html %}
</body>
<script>
window.addEventListener("scroll", function (event) {
var scroll = this.scrollY;
var item = document.getElementsByClassName('navbar-item');
/* console.log(scroll); */
if (scroll < 565) {
item[1].classList.add('is-active');
item[2].classList.remove('is-active');
item[3].classList.remove('is-active');
}
if (scroll > 565 && scroll < 1130) {
item[1].classList.remove('is-active');
item[2].classList.add('is-active');
item[3].classList.remove('is-active');
}
if (scroll > 1130) {
item[1].classList.remove('is-active');
item[2].classList.remove('is-active');
item[3].classList.add('is-active');
}
});
</script>
</html>