mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-02 15:10:16 +00:00
feature: 剥离主题目录
This commit is contained in:
31
themes/NEXT/IndexLayout.js
Normal file
31
themes/NEXT/IndexLayout.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import BaseLayout from './BaseLayout'
|
||||
import Header from './components/Header'
|
||||
import LatestPostsGroup from './components/LatestPostsGroup'
|
||||
import Card from './components/Card'
|
||||
import BlogPostListScroll from './components/BlogPostListScroll'
|
||||
import BlogPostListPage from './components/BlogPostListPage'
|
||||
import _NEXT from './_NEXT'
|
||||
|
||||
const IndexLayout = ({ posts, tags, meta, categories, postCount, latestPosts }) => {
|
||||
return <BaseLayout
|
||||
headerSlot={_NEXT.HOME_BANNER && <Header />}
|
||||
meta={meta}
|
||||
tags={tags}
|
||||
sideBarSlot={<LatestPostsGroup posts={latestPosts} />}
|
||||
rightAreaSlot={
|
||||
_NEXT.RIGHT_LATEST_POSTS && <Card><LatestPostsGroup posts={latestPosts} /></Card>
|
||||
}
|
||||
postCount={postCount}
|
||||
categories={categories}
|
||||
>
|
||||
{_NEXT.POSTS_LIST_TYPE !== 'page'
|
||||
? (
|
||||
<BlogPostListScroll posts={posts} tags={tags} showSummary={true} />
|
||||
)
|
||||
: (
|
||||
<BlogPostListPage posts={posts} tags={tags} postCount={postCount} />
|
||||
)}
|
||||
</BaseLayout>
|
||||
}
|
||||
|
||||
export default IndexLayout
|
||||
Reference in New Issue
Block a user