hexo 搜索调整标红方式

This commit is contained in:
tangly1024
2022-03-17 14:58:34 +08:00
parent 11cd974e38
commit e4f31cc860
4 changed files with 18 additions and 12 deletions

View File

@@ -13,6 +13,7 @@ import BlogPostListEmpty from './BlogPostListEmpty'
*/
const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
const totalPage = Math.ceil(postCount / BLOG.POSTS_PER_PAGE)
const showPagination = posts.length === BLOG.POSTS_PER_PAGE
if (!posts || posts.length === 0) {
return <BlogPostListEmpty />
@@ -25,7 +26,7 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount }) => {
<BlogPostCard key={post.id} post={post} />
))}
</div>
<PaginationNumber page={page} totalPage={totalPage} />
{showPagination && <PaginationNumber page={page} totalPage={totalPage} /> }
</div>
)
}