mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
medium 回顶按钮微调
This commit is contained in:
@@ -41,13 +41,15 @@ const LayoutBase = props => {
|
||||
<div className='px-7 max-w-5xl justify-center mx-auto min-h-screen'>
|
||||
{slotTop}
|
||||
{children}
|
||||
|
||||
{/* 回顶按钮 */}
|
||||
<div
|
||||
data-aos="fade-up"
|
||||
data-aos-duration="300"
|
||||
data-aos-easing="ease-in-out"
|
||||
data-aos-once="false"
|
||||
data-aos-anchor-placement="top-center"
|
||||
className='fixed right-96 bottom-24 hidden lg:block z-20'>
|
||||
className='fixed xl:right-80 right-2 mr-6 bottom-24 hidden lg:block z-20'>
|
||||
<i className='fas fa-chevron-up cursor-pointer p-2 rounded-full border' onClick={() => { window.scrollTo({ top: 0, behavior: 'smooth' }) }}/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@ export const LayoutSlug = props => {
|
||||
</section>
|
||||
|
||||
{/* Notion文章主体 */}
|
||||
<section id="notion-article" className="px-1 max-w-5xl">
|
||||
<section id="notion-article" className="px-1 max-w-4xl">
|
||||
{post && (<NotionPage post={post} />)}
|
||||
</section>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user