diff options
author | Dillon <dillonzq@outlook.com> | 2020-03-14 09:42:12 +0300 |
---|---|---|
committer | Dillon <dillonzq@outlook.com> | 2020-03-14 09:42:12 +0300 |
commit | 3d9aad32056567b292795e2941428d7ab157cc42 (patch) | |
tree | 6c486271ee0648832feede4b392a13c5315ee64f /src | |
parent | d8bfd23ace6d3c467af9f24749113ce9c17b8d6f (diff) |
feat(style): adjust style of header, tags and dynamic-to-top button
Diffstat (limited to 'src')
-rw-r--r-- | src/js/theme.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/js/theme.js b/src/js/theme.js index 53505f7..5897e3f 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -14,7 +14,7 @@ } isMobile() { - return window.matchMedia('only screen and (max-width: 720px)').matches; + return window.matchMedia('only screen and (max-width: 680px)').matches; } isTocStatic() { @@ -258,14 +258,14 @@ header.classList.add('fadeInDown'); } }); - if (this.newScrollTop > 400) { + if (this.newScrollTop > 200) { if (scroll > MIN_SCROLL) { - toTopButton.classList.remove('fadeIn'); - toTopButton.classList.add('fadeOut'); + toTopButton.classList.remove('fadeInUp'); + toTopButton.classList.add('fadeOutDown'); } else if (scroll < - MIN_SCROLL) { toTopButton.style.display = 'block'; - toTopButton.classList.remove('fadeOut'); - toTopButton.classList.add('fadeIn'); + toTopButton.classList.remove('fadeOutDown'); + toTopButton.classList.add('fadeInUp'); } } else { toTopButton.style.display = 'none'; |