mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 23:16:48 +00:00
标题处理、标签页分页处理
This commit is contained in:
@@ -7,35 +7,23 @@ import Container from '@/components/Container'
|
||||
import JumpToTop from '@/components/JumpToTop'
|
||||
import SideBar from '@/components/SideBar'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import BlogPostListScrollPagination from '@/components/BlogPostListScrollPagination '
|
||||
|
||||
const IndexLayout = ({ tags, posts, page, currentTag, ...customMeta }) => {
|
||||
const meta = {
|
||||
title: `${BLOG.title} | 首页`,
|
||||
type: 'website',
|
||||
...customMeta
|
||||
}
|
||||
import BlogPostListScrollPagination from '@/components/BlogPostListScrollPagination'
|
||||
|
||||
const IndexLayout = ({ tags, posts, page, currentTag, meta, ...customMeta }) => {
|
||||
const targetRef = useRef(null)
|
||||
|
||||
return (
|
||||
<Container id='wrapper' meta={meta} tags={tags}>
|
||||
<TopNav tags={tags} />
|
||||
|
||||
{/* middle */}
|
||||
<div ref={targetRef} className={`${BLOG.font} flex justify-between bg-gray-100 dark:bg-black min-h-screen`}>
|
||||
{/* 侧边菜单 */}
|
||||
<SideBar />
|
||||
<div className='flex-grow'>
|
||||
<main className='flex-grow'>
|
||||
<TagsBar tags={tags} currentTag={currentTag} />
|
||||
<BlogPostListScrollPagination posts={posts} tags={tags} targetRef={targetRef}/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* 下方菜单组 */}
|
||||
<div className='right-0 space-x-2 fixed flex bottom-24 px-5 py-1 duration-500'>
|
||||
<div className='flex-wrap'>
|
||||
<BlogPostListScrollPagination posts={posts} tags={tags} targetRef={targetRef} />
|
||||
<JumpToTop targetRef={targetRef} showPercent={false} />
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user