summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar natemoo-re <natemoo-re@users.noreply.github.com> 2021-07-20 00:37:38 +0000
committerGravatar GitHub Actions <actions@github.com> 2021-07-20 00:37:38 +0000
commitcd8b438c081cc8e034638b727c8eed323e4cfd80 (patch)
tree04b824049f55f25793a96a8026a6300b3d812bd4
parent325e8cba2d63eae909a8f6ca1f92722ed2f514db (diff)
downloadastro-cd8b438c081cc8e034638b727c8eed323e4cfd80.tar.gz
astro-cd8b438c081cc8e034638b727c8eed323e4cfd80.tar.zst
astro-cd8b438c081cc8e034638b727c8eed323e4cfd80.zip
[ci] yarn format
-rw-r--r--docs/public/nav.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/public/nav.js b/docs/public/nav.js
index 93fadcd61..d6c2bcda3 100644
--- a/docs/public/nav.js
+++ b/docs/public/nav.js
@@ -11,7 +11,7 @@ let threshold = 32;
function onScroll() {
const curr = window.scrollY;
const dir = curr > prev ? 1 : -1;
-
+
if (curr < threshold) {
show();
document.documentElement.classList.add('initial');
@@ -22,16 +22,16 @@ function onScroll() {
show();
}
}
-
+
prev = curr;
}
const hide = () => {
- nav.classList.add('hidden')
+ nav.classList.add('hidden');
document.documentElement.classList.add('scrolled');
document.documentElement.classList.remove('initial');
};
const show = () => {
nav.classList.remove('hidden');
document.documentElement.classList.remove('scrolled');
-}
+};