diff --git a/components/JumpToTopButton.js b/components/JumpToTopButton.js index 4a949db0..69349846 100644 --- a/components/JumpToTopButton.js +++ b/components/JumpToTopButton.js @@ -22,7 +22,6 @@ const JumpToTopButton = ({ targetRef, showPercent = true }) => { if (per > 100) per = 100 const shouldShow = scrollY > 100 && per > 0 - if (shouldShow !== show) { switchShow(shouldShow) } @@ -34,15 +33,15 @@ const JumpToTopButton = ({ targetRef, showPercent = true }) => { }, [show]) return ( -
+
window.scrollTo({ top: 0, behavior: 'smooth' })} style={{ boxShadow: 'rgba(41, 50, 60, 0.5) 0px 2px 16px', borderRadius: '28px' }} - className={(show ? 'animate__fadeInUp' : 'animate__fadeOutUp') + ' bg-gray-700 px-1 py-1 cursor-pointer animate__animated animate__faster shadow-2xl'}> + className={(show ? 'animate__fadeInUp' : 'animate__fadeOutUp') + ' bg-white dark:bg-gray-700 px-1 py-1 cursor-pointer animate__animated animate__faster shadow-2xl'}>
-
- {showPercent && (
{percent}
)} +
+ {showPercent && (
{percent}
)}
diff --git a/components/TocDrawerButton.js b/components/TocDrawerButton.js index 39f9f98e..7a60d58a 100644 --- a/components/TocDrawerButton.js +++ b/components/TocDrawerButton.js @@ -10,11 +10,11 @@ import React from 'react' */ const TocDrawerButton = (props) => { return ( -
+
-
+ className={'animate__fadeInUp bg-white dark:bg-gray-700 px-1 py-1 cursor-pointer animate__animated animate__faster shadow-xl'}> +
目录