diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index a1d880f6..54e18c71 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -5,27 +5,34 @@ import React from 'react' const BlogPostCard = ({ post }) => { return ( -
- {/* 封面图 */} - {post.page_cover && post.page_cover.length > 1 && ( - - {post.title} - - )} +
+ {/* 封面图 */} + {post.page_cover && post.page_cover.length > 1 && ( + + {post.title} + + )} -
- -
{post.title}
- -
+
+ +
{post.title}
+ +

{post.summary}

+ +
+
-
{post.category}
+
{post.category}
{post.date.start_date}
-
{post.tags.map(tag => ())}
-

{post.summary}

+
{post.tags.map(tag => ())}
+
) } diff --git a/components/BlogPostListPage.js b/components/BlogPostListPage.js index 9903aac9..fe5fb6b0 100644 --- a/components/BlogPostListPage.js +++ b/components/BlogPostListPage.js @@ -56,7 +56,7 @@ const BlogPostListPage = ({ page = 1, posts = [], tags }) => {
{/* 文章列表 */} -
+
{postsToShow.map(post => ( ))} diff --git a/components/BlogPostListScroll.js b/components/BlogPostListScroll.js index 61cba439..3755f663 100644 --- a/components/BlogPostListScroll.js +++ b/components/BlogPostListScroll.js @@ -49,40 +49,46 @@ const BlogPostListScroll = ({ posts = [], tags, currentSearch, currentCategory, const targetRef = useRef(null) if (!postsToShow || postsToShow.length === 0) { - return + return } else { - return
+ return
{currentCategory && ( -
-
{currentCategory}
+
+
{currentCategory}
)} {currentSearch && ( -
-
关键字:{currentSearch}
+
+
关键字:{currentSearch}
)} {currentTag && ( -
-
{currentTag}
+
+
+ {currentTag}
)} {/* 文章列表 */} -
- {postsToShow.map(post => ( - - ))} -
+
+ {postsToShow.map(post => ( + + ))} +
-
-
{ handleGetMore() }} - className='w-full my-4 py-4 bg-gray-300 text-center cursor-pointer dark:bg-gray-700 dark:text-gray-200' - > {hasMore ? '继续加载' : '加载完了😰'}
-
+
+
{ + handleGetMore() + }} + className='w-full my-4 py-4 bg-gray-300 text-center cursor-pointer dark:bg-gray-700 dark:text-gray-200' + > {hasMore ? '继续加载' : '加载完了😰'}
+
} } diff --git a/components/TagItemMini.js b/components/TagItemMini.js index e050f173..fa6049e9 100644 --- a/components/TagItemMini.js +++ b/components/TagItemMini.js @@ -2,12 +2,12 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false, count }) => { return -
-
{tag + (count ? `(${count})` : '')}
+ : 'bg-white text-gray-500 hover:shadow-xl hover:text-white border-gray-500 dark:bg-gray-800 dark:border-gray-600'}` }> +
{tag + (count ? `(${count})` : '')}
}