From 06852ad99ec5ecf32cc2a77be287b2dc4c361472 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 14 Mar 2023 15:40:21 +0800 Subject: [PATCH] blog-card-height --- themes/hexo/components/BlogPostCard.js | 13 +------- themes/hexo/components/BlogPostCardInfo.js | 39 ++++++++++++++++------ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 1d1ed14e..1f02e323 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -11,7 +11,6 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { post.page_cover = siteInfo?.pageCover } const showPageCover = CONFIG_HEXO.POST_LIST_COVER && post?.page_cover - const delay = (index % 2) * 200 return (
{ border dark:border-black rounded-xl bg-white dark:bg-hexo-black-gray`}> {/* 文字内容 */} -
- - - -
+ {/* 图片封面 */} {showPageCover && !showPreview && post?.page_cover && ( diff --git a/themes/hexo/components/BlogPostCardInfo.js b/themes/hexo/components/BlogPostCardInfo.js index 8c99dc93..68dc911d 100644 --- a/themes/hexo/components/BlogPostCardInfo.js +++ b/themes/hexo/components/BlogPostCardInfo.js @@ -3,10 +3,25 @@ import NotionPage from '@/components/NotionPage' import Link from 'next/link' import TagItemMini from './TagItemMini' -export const BlogPostCardInfo = ({ post, showPreview, showSummary }) => { - return <> - {/* 标题 */} - { + const delay = (index % 2) * 200 + + return
+
+ + {/* 标题 */} + {
- {/* 摘要 */} - {(!showPreview || showSummary) && !post.results && ( + {/* 摘要 */} + {(!showPreview || showSummary) && !post.results && (

{post.summary}

- )} + )} {/* 搜索结果 */} {post.results && ( @@ -55,8 +70,11 @@ export const BlogPostCardInfo = ({ post, showPreview, showSummary }) => {
)} - {/* 分类标签 */} -
+
+ +
+ {/* 分类标签 */} +
{
- + + }