From e98db24cb7219b4f2ad265b85d6b3d10640dc2a2 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Mon, 21 Mar 2022 17:49:42 +0800 Subject: [PATCH] =?UTF-8?q?Hexo:lates=E7=BB=84=E4=BB=B6=E5=AD=97=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/LatestPostsGroup.js | 42 +++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/themes/hexo/components/LatestPostsGroup.js b/themes/hexo/components/LatestPostsGroup.js index 5b0425ef..2adcac1a 100644 --- a/themes/hexo/components/LatestPostsGroup.js +++ b/themes/hexo/components/LatestPostsGroup.js @@ -18,9 +18,13 @@ const LatestPostsGroup = ({ posts }) => { const currentPath = useRouter().asPath const { locale } = useGlobal() - return <> -
-
{locale.COMMON.LATEST_POSTS}
+ return ( + <> +
+
+ + {locale.COMMON.LATEST_POSTS} +
{posts.map(post => { const selected = currentPath === `${BLOG.PATH}/article/${post.slug}` @@ -29,20 +33,34 @@ const LatestPostsGroup = ({ posts }) => { : `url("/${CONFIG_HEXO.HOME_BANNER_IMAGE}")` return ( - - -
-