From 3d9aad32056567b292795e2941428d7ab157cc42 Mon Sep 17 00:00:00 2001 From: Dillon Date: Sat, 14 Mar 2020 14:42:12 +0800 Subject: feat(style): adjust style of header, tags and dynamic-to-top button --- src/js/theme.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') 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'; -- cgit v1.2.3