mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-24 02:36:02 +10:00
fix: correct scroll behavior for top bar visibility toggle
This commit is contained in:
@@ -86,9 +86,9 @@ function setupScrollTopBar() {
|
|||||||
if (scrollTop < 80) {
|
if (scrollTop < 80) {
|
||||||
body.classList.remove("blog-scrolled");
|
body.classList.remove("blog-scrolled");
|
||||||
} else if (scrollingDown) {
|
} else if (scrollingDown) {
|
||||||
body.classList.add("blog-scrolled");
|
|
||||||
} else {
|
|
||||||
body.classList.remove("blog-scrolled");
|
body.classList.remove("blog-scrolled");
|
||||||
|
} else {
|
||||||
|
body.classList.add("blog-scrolled");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
body.addEventListener("scroll", applyState, { passive: true });
|
body.addEventListener("scroll", applyState, { passive: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user