mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
滚动监听微调
This commit is contained in:
@@ -55,10 +55,10 @@ const ArticleLayout = ({
|
||||
<SideBar tags={tags} post={frontMatter} />
|
||||
|
||||
{/* 主体区块 */}
|
||||
<main className='bg-gray-100 w-full dark:bg-gray-800'>
|
||||
<main className='bg-gray-100 w-full dark:bg-gray-800' ref={targetRef} >
|
||||
{/* 中央区域 wrapper */}
|
||||
<header
|
||||
className='hover:scale-105 hover:shadow-2xl duration-200 transform mx-auto max-w-5xl mt-16 lg:mt-20 md:flex-shrink-0 overflow-y-auto animate__fadeIn animate__animated'>
|
||||
className='hover:scale-105 hover:shadow-2xl duration-200 transform mx-auto max-w-5xl mt-16 lg:mt-20 md:flex-shrink-0 animate__fadeIn animate__animated'>
|
||||
{/* 封面图 */}
|
||||
{frontMatter.page_cover && frontMatter.page_cover.length > 1 && (
|
||||
<img className='bg-center object-cover w-full' style={{ maxHeight: '40rem' }}
|
||||
@@ -66,9 +66,7 @@ const ArticleLayout = ({
|
||||
)}
|
||||
</header>
|
||||
|
||||
<article
|
||||
ref={targetRef}
|
||||
className='mb-10 overflow-x-auto md:px-10 px-5 py-10 max-w-5xl mx-auto bg-white dark:border-gray-700 dark:bg-gray-700'>
|
||||
<article className='mb-10 overflow-x-auto md:px-10 px-5 py-10 max-w-5xl mx-auto bg-white dark:border-gray-700 dark:bg-gray-700'>
|
||||
{/* 文章标题 */}
|
||||
<h1 className='font-bold text-4xl text-black my-5 dark:text-white animate__animated animate__fadeIn'>
|
||||
{frontMatter.title}
|
||||
@@ -166,7 +164,7 @@ const ArticleLayout = ({
|
||||
{/* 分享按钮 */}
|
||||
<ShareButton post={frontMatter} />
|
||||
{/* 跳回顶部 */}
|
||||
<JumpToTop />
|
||||
<JumpToTop targetRef={targetRef}/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user