From d64fa80ee3412f34d4a5b1bccfeb9812d065f75e Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Thu, 9 Feb 2023 17:38:32 +0800 Subject: [PATCH] =?UTF-8?q?medium=20=E5=B0=81=E9=9D=A2=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/medium/components/BlogPostCard.js | 115 +++++++++++++---------- 1 file changed, 63 insertions(+), 52 deletions(-) diff --git a/themes/medium/components/BlogPostCard.js b/themes/medium/components/BlogPostCard.js index be243a01..2d27cd23 100644 --- a/themes/medium/components/BlogPostCard.js +++ b/themes/medium/components/BlogPostCard.js @@ -11,65 +11,76 @@ const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MEDIUM.POST_LIST_PREVIEW && post.blockMap const { locale } = useGlobal() return ( -
-
- - - {post.title} - - -
-
{post.date?.start_date}
- {CONFIG_MEDIUM.POST_LIST_CATEGORY && ( - - )} - {CONFIG_MEDIUM.POST_LIST_TAG && - post?.tagItems?.map(tag => ( - - ))} -
-
- - {(!showPreview || showSummary) && ( -

- {post.summary} -

- )} - - {showPreview && ( -
- -
-
+
- - {locale.COMMON.ARTICLE_DETAIL} - + href={`${BLOG.SUB_PATH}/${post.slug}`} + passHref + className={ + 'cursor-pointer font-bold hover:underline text-3xl leading-tight text-gray-700 dark:text-gray-300 hover:text-green-500 dark:hover:text-green-400' + }> +
+
+ {/* eslint-disable-next-line @next/next/no-img-element */} + +
+ {post.title} +
-
+ +
+
{post.date?.start_date}
+ {CONFIG_MEDIUM.POST_LIST_CATEGORY && ( + + )} + {CONFIG_MEDIUM.POST_LIST_TAG && + post?.tagItems?.map(tag => ( + + ))} +
+ +
+ + {(!showPreview || showSummary) && ( +

+ {post.summary} +

+ )} + + {showPreview && ( +
+ +
+
+ + + {locale.COMMON.ARTICLE_DETAIL} + + + +
+
+
+ )}
-
- )} -
-
+
) }