Skip to content

Commit f937966

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 85ba03b commit f937966

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/Header.astro

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,18 @@ import links from "@data/links.json";
5151
document.addEventListener("DOMContentLoaded", function() {
5252
var navbar = document.getElementById("navbar") as HTMLElement;
5353
if (!navbar) return;
54-
54+
5555
var prevScrollPos = window.pageYOffset || document.documentElement.scrollTop;
56-
56+
5757
window.addEventListener("scroll", function() {
5858
var currentScrollPos = window.pageYOffset || document.documentElement.scrollTop;
59-
59+
6060
if (prevScrollPos > currentScrollPos) {
6161
navbar.style.transform = "translateY(0)";
6262
} else {
6363
navbar.style.transform = "translateY(-100%)";
6464
}
65-
65+
6666
prevScrollPos = currentScrollPos;
6767
});
6868
});

0 commit comments

Comments
 (0)