From ef8f38fd7b7d03be85a3921168a159f7b6f52144 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 15 Dec 2021 11:37:37 +0800 Subject: [PATCH] =?UTF-8?q?Link=E5=86=85=E5=B5=8C=E6=94=B9=E4=B8=BAa?= =?UTF-8?q?=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BlogAround.js | 8 ++++---- components/BlogPostCard.js | 10 +++++----- components/CategoryGroup.js | 7 ++++--- components/LatestPostsGroup.js | 4 ++-- components/SideBar.js | 8 ++++---- components/TagItemMini.js | 4 ++-- pages/article/[slug].js | 8 ++++---- 7 files changed, 25 insertions(+), 24 deletions(-) diff --git a/components/BlogAround.js b/components/BlogAround.js index 4bd6c3a6..7021575f 100644 --- a/components/BlogAround.js +++ b/components/BlogAround.js @@ -10,14 +10,14 @@ import { faAngleDoubleLeft, faAngleDoubleRight } from '@fortawesome/free-solid-s export default function BlogAround ({ prev, next }) { return
-
+ {prev.title} -
+ -
{next.title} + {next.title} -
+
} diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index e72ac60c..9f72d1bd 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -19,20 +19,20 @@ const BlogPostCard = ({ post, tags }) => {
- + {post.category} - + | - {post.date.start_date} + {post.date.start_date}
-

+ {post.title} -

+

{post.summary}

diff --git a/components/CategoryGroup.js b/components/CategoryGroup.js index a09a7acf..dd0ac764 100644 --- a/components/CategoryGroup.js +++ b/components/CategoryGroup.js @@ -5,15 +5,16 @@ import React from 'react' const CategoryGroup = ({ currentCategory, categories }) => { return
-
+
{Object.keys(categories).map(category => { const selected = currentCategory === category return -
- {category}({categories[category]})
+ {category}({categories[category]}) + })}
diff --git a/components/LatestPostsGroup.js b/components/LatestPostsGroup.js index 811dde22..42ec1d03 100644 --- a/components/LatestPostsGroup.js +++ b/components/LatestPostsGroup.js @@ -31,7 +31,7 @@ const LatestPostsGroup = ({ posts, sliceCount = 5 }) => { const selected = currentPath === `${BLOG.path}/article/${post.slug}` return ( -
+
{
{formatDateFmt(post.lastEditedTime, 'yyyy/MM/dd')}
-
+
) })} diff --git a/components/SideBar.js b/components/SideBar.js index 04c1b0fb..ceabf56d 100644 --- a/components/SideBar.js +++ b/components/SideBar.js @@ -54,9 +54,9 @@ const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory, c
{locale.COMMON.CATEGORY}
- +
@@ -69,9 +69,9 @@ const SideBar = ({ tags, currentTag, post, posts, categories, currentCategory, c
{locale.COMMON.TAGS}
- +
diff --git a/components/TagItemMini.js b/components/TagItemMini.js index 959eaec5..a7ab3fc0 100644 --- a/components/TagItemMini.js +++ b/components/TagItemMini.js @@ -4,13 +4,13 @@ import Link from 'next/link' const TagItemMini = ({ tag, selected = false }) => { return -
{selected && } {tag.name + (tag.count ? `(${tag.count})` : '')}
-
+ } diff --git a/pages/article/[slug].js b/pages/article/[slug].js index f0d982e1..a37923e6 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -67,15 +67,15 @@ const ArticleDetail = ({ post, blockMap, tags, prev, next, allPosts, categories
- + {post.type[0] !== 'Page' && ( - + )}