新增StickyBar组件;
标签页、分类页、搜索页重排;
This commit is contained in:
tangly1024
2021-11-29 17:25:34 +08:00
parent 99d98566b7
commit 5c84afb5c3
15 changed files with 145 additions and 106 deletions

View File

@@ -1,8 +1,9 @@
import { getAllCategories, getAllPosts, getAllTags } from '@/lib/notion'
import BLOG from '@/blog.config'
import TagsBar from '@/components/TagsBar'
import StickyBar from '@/components/StickyBar'
import BaseLayout from '@/layouts/BaseLayout'
import BlogPostListScroll from '@/components/BlogPostListScroll'
import TagList from '@/components/TagList'
export default function Tag ({ tags, posts, currentTag, categories }) {
const meta = {
@@ -12,7 +13,9 @@ export default function Tag ({ tags, posts, currentTag, categories }) {
}
return <BaseLayout meta={meta} tags={tags} currentTag={currentTag} categories={categories} totalPosts={posts}>
<div className='flex-grow bg-gray-200 dark:bg-black shadow-inner'>
<TagsBar tags={tags} currentTag={currentTag}/>
<StickyBar>
<TagList tags={tags} currentTag={currentTag}/>
</StickyBar>
<BlogPostListScroll posts={posts} tags={tags} currentTag={currentTag}/>
</div>
</BaseLayout>