From 4dbf141ee245f202be2b5f4a3dd354c0f0083c6f Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Tue, 11 Apr 2023 11:07:01 +0800 Subject: [PATCH] =?UTF-8?q?hexo-=E5=88=97=E8=A1=A8=E9=BC=A0=E6=A0=87?= =?UTF-8?q?=E6=82=AC=E5=81=9C=E6=94=BE=E5=A4=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/BlogPostCard.js | 65 +++++++++++--------------- themes/hexo/config_hexo.js | 2 + 2 files changed, 28 insertions(+), 39 deletions(-) diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index 1c6274ff..fd258d37 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -14,50 +14,37 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const delay = (index % 2) * 200 return ( -
- {/* 文字内容 */} - +
+
- {/* 图片封面 */} - {showPageCover && !showPreview && post?.page_cover && ( -
- - {/* eslint-disable-next-line @next/next/no-img-element */} - {/* {post.title} */} -
+ {/* 文字内容 */} + + + {/* 图片封面 */} + {showPageCover && !showPreview && post?.page_cover && ( +
+ +
+ +
+ )} - {/*
- {post.title} -
*/} -
- )} -
+
+ ) } diff --git a/themes/hexo/config_hexo.js b/themes/hexo/config_hexo.js index 73febab2..3cba78cc 100644 --- a/themes/hexo/config_hexo.js +++ b/themes/hexo/config_hexo.js @@ -13,6 +13,8 @@ const CONFIG_HEXO = { MENU_SEARCH: true, // 显示搜索 POST_LIST_COVER: true, // 列表显示文章封面 + POST_LIST_COVER_HOVER_ENLARGE: false, // 列表鼠标悬停放大 + POST_LIST_COVER_DEFAULT: true, // 封面为空时用站点背景做默认封面 POST_LIST_SUMMARY: true, // 文章摘要 POST_LIST_PREVIEW: true, // 读取文章预览