diff --git a/themes/medium/LayoutBase.js b/themes/medium/LayoutBase.js index 8741679e..3f2bff0c 100644 --- a/themes/medium/LayoutBase.js +++ b/themes/medium/LayoutBase.js @@ -41,13 +41,15 @@ const LayoutBase = props => {
{slotTop} {children} + + {/* 回顶按钮 */}
+ className='fixed xl:right-80 right-2 mr-6 bottom-24 hidden lg:block z-20'> { window.scrollTo({ top: 0, behavior: 'smooth' }) }}/>
diff --git a/themes/medium/LayoutSlug.js b/themes/medium/LayoutSlug.js index c3cc0423..6000c3f3 100644 --- a/themes/medium/LayoutSlug.js +++ b/themes/medium/LayoutSlug.js @@ -67,7 +67,7 @@ export const LayoutSlug = props => { {/* Notion文章主体 */} -
+
{post && ()}
diff --git a/themes/medium/components/Catalog.js b/themes/medium/components/Catalog.js index f9499506..11b8cae0 100644 --- a/themes/medium/components/Catalog.js +++ b/themes/medium/components/Catalog.js @@ -28,7 +28,6 @@ const Catalog = ({ toc }) => { const throttleMs = 100 const actionSectionScrollSpy = React.useCallback(throttle(() => { - console.log('滚动') const sections = document.getElementsByClassName('notion-h') let prevBBox = null let currentSectionId = activeSection