mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 07:26:45 +00:00
fix:post-scroll-page
This commit is contained in:
@@ -3,6 +3,6 @@ import LayoutBase from './LayoutBase'
|
|||||||
|
|
||||||
export const LayoutIndex = (props) => {
|
export const LayoutIndex = (props) => {
|
||||||
return <LayoutBase {...props}>
|
return <LayoutBase {...props}>
|
||||||
<BlogListPage {...props}/>
|
<BlogListPage {...props} />
|
||||||
</LayoutBase>
|
</LayoutBase>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
|
import BLOG from '@/blog.config'
|
||||||
import BlogPostListPage from './components/BlogPostListPage'
|
import BlogPostListPage from './components/BlogPostListPage'
|
||||||
|
import BlogPostListScroll from './components/BlogPostListScroll'
|
||||||
import Header from './components/Header'
|
import Header from './components/Header'
|
||||||
import CONFIG_HEXO from './config_hexo'
|
import CONFIG_HEXO from './config_hexo'
|
||||||
import LayoutBase from './LayoutBase'
|
import LayoutBase from './LayoutBase'
|
||||||
|
|
||||||
export const LayoutIndex = (props) => {
|
export const LayoutIndex = (props) => {
|
||||||
return <LayoutBase {...props} headerSlot={CONFIG_HEXO.HOME_BANNER_ENABLE && <Header {...props}/>}>
|
return <LayoutBase {...props} headerSlot={CONFIG_HEXO.HOME_BANNER_ENABLE && <Header {...props} />}>
|
||||||
<BlogPostListPage {...props}/>
|
{BLOG.POST_LIST_STYLE === 'page' ? <BlogPostListPage {...props} /> : <BlogPostListScroll {...props} />}
|
||||||
</LayoutBase>
|
</LayoutBase>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
|
import BLOG from '@/blog.config'
|
||||||
import BlogPostListPage from './components/BlogPostListPage'
|
import BlogPostListPage from './components/BlogPostListPage'
|
||||||
|
import BlogPostListScroll from './components/BlogPostListScroll'
|
||||||
import LayoutBase from './LayoutBase'
|
import LayoutBase from './LayoutBase'
|
||||||
|
|
||||||
export const LayoutIndex = (props) => {
|
export const LayoutIndex = (props) => {
|
||||||
return <LayoutBase {...props}>
|
return <LayoutBase {...props}>
|
||||||
<BlogPostListPage {...props}/>
|
{BLOG.POST_LIST_STYLE === 'page' ? <BlogPostListPage {...props} /> : <BlogPostListScroll {...props} />}
|
||||||
</LayoutBase>
|
</LayoutBase>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const BlogPostListScroll = ({ posts = [], currentSearch }) => {
|
|||||||
<div onClick={() => {
|
<div onClick={() => {
|
||||||
handleGetMore()
|
handleGetMore()
|
||||||
}}
|
}}
|
||||||
className='w-full my-4 py-4 text-center cursor-pointer glassmorphism shadow-xl rounded-xl dark:text-gray-200'
|
className='w-full my-4 py-4 text-center cursor-pointer dark:text-gray-200'
|
||||||
> {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`} </div>
|
> {hasMore ? locale.COMMON.MORE : `${locale.COMMON.NO_MORE} 😰`} </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import Card from './components/Card'
|
|||||||
import BlogPostListScroll from './components/BlogPostListScroll'
|
import BlogPostListScroll from './components/BlogPostListScroll'
|
||||||
import BlogPostListPage from './components/BlogPostListPage'
|
import BlogPostListPage from './components/BlogPostListPage'
|
||||||
import CONFIG_NEXT from './config_next'
|
import CONFIG_NEXT from './config_next'
|
||||||
|
import BLOG from '@/blog.config'
|
||||||
|
|
||||||
export const LayoutIndex = (props) => {
|
export const LayoutIndex = (props) => {
|
||||||
const { latestPosts } = props
|
const { latestPosts } = props
|
||||||
@@ -15,7 +16,7 @@ export const LayoutIndex = (props) => {
|
|||||||
rightAreaSlot={rightAreaSlot}
|
rightAreaSlot={rightAreaSlot}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{CONFIG_NEXT.POST_LIST_TYPE !== 'page'
|
{BLOG.POST_LIST_TYPE !== 'page'
|
||||||
? <BlogPostListScroll {...props} showSummary={true} />
|
? <BlogPostListScroll {...props} showSummary={true} />
|
||||||
: <BlogPostListPage {...props} />
|
: <BlogPostListPage {...props} />
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user