From 073a05968f25eaae516b9da047275067b4bc5713 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 10 Apr 2022 13:42:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A4=96=E9=93=BE=E6=96=B0=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/MenuButtonGroupTop.js | 2 +- themes/hexo/components/MenuGroupCard.js | 2 +- themes/hexo/components/MenuList.js | 36 ++++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/themes/hexo/components/MenuButtonGroupTop.js b/themes/hexo/components/MenuButtonGroupTop.js index 0d21721f..c8d087fc 100644 --- a/themes/hexo/components/MenuButtonGroupTop.js +++ b/themes/hexo/components/MenuButtonGroupTop.js @@ -22,7 +22,7 @@ const MenuButtonGroupTop = (props) => { {links.map(link => { if (link.show) { return - +
{link.name}
diff --git a/themes/hexo/components/MenuGroupCard.js b/themes/hexo/components/MenuGroupCard.js index 3c8fee64..a36aede5 100644 --- a/themes/hexo/components/MenuGroupCard.js +++ b/themes/hexo/components/MenuGroupCard.js @@ -20,7 +20,7 @@ const MenuGroupCard = (props) => { {links.map(link => { if (link.show) { return -
+
{link.name}
{link.slot}
diff --git a/themes/hexo/components/MenuList.js b/themes/hexo/components/MenuList.js index bf8ac23b..c8103624 100644 --- a/themes/hexo/components/MenuList.js +++ b/themes/hexo/components/MenuList.js @@ -22,23 +22,23 @@ const MenuList = (props) => { } return
+ {links.map(link => { + if (link && link.show) { + const selected = (router.pathname === link.to) || (router.asPath === link.to) + return + +
+ +
{link.name}
+
+ {link.slot} +
+ + } else { + return null + } + })} + } export default MenuList From 1cbcd5adacc2936163bb983156105e98dd165297 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 10 Apr 2022 13:42:27 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=A4=96=E9=93=BE=E6=96=B0=E7=AA=97?= =?UTF-8?q?=E5=8F=A3=20=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/hexo/components/BlogPostCard.js | 3 ++- themes/medium/components/TopNavBar.js | 2 +- themes/next/components/MenuButtonGroup.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/themes/hexo/components/BlogPostCard.js b/themes/hexo/components/BlogPostCard.js index d1ba0023..54a37a72 100644 --- a/themes/hexo/components/BlogPostCard.js +++ b/themes/hexo/components/BlogPostCard.js @@ -39,7 +39,8 @@ const BlogPostCard = ({ post, showSummary }) => {
{(!showPreview || showSummary) && ( -

+

{post.summary}

)} diff --git a/themes/medium/components/TopNavBar.js b/themes/medium/components/TopNavBar.js index b1ed876b..2c48ec7b 100644 --- a/themes/medium/components/TopNavBar.js +++ b/themes/medium/components/TopNavBar.js @@ -21,7 +21,7 @@ export default function TopNavBar (props) { if (link.show) { const selected = (router.pathname === link.to) || (router.asPath === link.to) return -