diff options
author | 2021-07-16 13:39:41 -0400 | |
---|---|---|
committer | 2021-07-16 13:39:41 -0400 | |
commit | 94fdd0db1b0a8ba2f109c5a240dc5770fdf784b8 (patch) | |
tree | 6ec6bbf3fc38a481816c6ed471f52bda39393a6d /docs/public/nav.js | |
parent | c2176bfc839e31051e09bebd97cb09311c506b3a (diff) | |
download | astro-94fdd0db1b0a8ba2f109c5a240dc5770fdf784b8.tar.gz astro-94fdd0db1b0a8ba2f109c5a240dc5770fdf784b8.tar.zst astro-94fdd0db1b0a8ba2f109c5a240dc5770fdf784b8.zip |
Revert "[ci] yarn format"
This reverts commit c2176bfc839e31051e09bebd97cb09311c506b3a.
Diffstat (limited to 'docs/public/nav.js')
-rw-r--r-- | docs/public/nav.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/public/nav.js b/docs/public/nav.js index d6c2bcda3..93fadcd61 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'); -}; +} |