diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index df120154..ee679bcf 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -5,28 +5,29 @@ import TagItemMini from './TagItemMini' import CONFIG_HEXO from '../config_hexo' import NotionPage from '@/components/NotionPage' -const BlogPostCard = ({ post, showSummary }) => { +const BlogPostCard = ({ post, showSummary, index }) => { const showPreview = CONFIG_HEXO.POST_LIST_PREVIEW && post.blockMap + const showPageCover = CONFIG_HEXO.POST_LIST_COVER return (
-
-
+ className={`flex md:flex-row flex-col-reverse ${index % 2 === 0 ? 'md:flex-row-reverse' : ''} + w-full md:h-72 h-96 justify-between overflow-hidden drop-shadow-md + border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray `}> + +
+ } leading-tight text-gray-600 dark:text-gray-100 hover:text-indigo-700 dark:hover:text-indigo-400`}> - {post.title} + {post.title} {index % 2} @@ -88,20 +89,20 @@ const BlogPostCard = ({ post, showSummary }) => {
- {CONFIG_HEXO.POST_LIST_COVER && !showPreview && post?.page_cover && !post.results && ( - -
- {/* eslint-disable-next-line @next/next/no-img-element */} - {post.title} - {/* {post.title} */} + {showPageCover && !showPreview && post?.page_cover && !post.results && ( +
+ + {/* eslint-disable-next-line @next/next/no-img-element */} + {post.title} + {/* {post.title} */} +
- )} -
+
) } diff --git a/themes/hexo/components/BlogPostListPage.js b/themes/hexo/components/BlogPostListPage.js index 3662aee9..edbdfbb8 100644 --- a/themes/hexo/components/BlogPostListPage.js +++ b/themes/hexo/components/BlogPostListPage.js @@ -22,7 +22,7 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount }) => { {/* 文章列表 */}
{posts.map(post => ( - + ))}
{showPagination && } diff --git a/themes/hexo/components/BlogPostListScroll.js b/themes/hexo/components/BlogPostListScroll.js index ca6f705d..c846b83a 100644 --- a/themes/hexo/components/BlogPostListScroll.js +++ b/themes/hexo/components/BlogPostListScroll.js @@ -58,7 +58,7 @@ const BlogPostListScroll = ({ posts = [], currentSearch, showSummary = CONFIG_HE {/* 文章列表 */}
{postsToShow.map(post => ( - + ))}