From 9c38dae8aa81cc28f68a9b66d61d307df58c7b69 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Fri, 17 Dec 2021 13:49:17 +0800 Subject: [PATCH] =?UTF-8?q?V2.0=20=E9=87=8D=E6=96=B0=E6=8E=92=E7=8F=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ArticleDetail.js | 8 +-- components/BlogAround.js | 2 +- components/BlogPostCard.js | 6 +- components/BlogPostListEmpty.js | 4 +- components/BlogPostListScroll.js | 2 +- components/CategoryGroup.js | 14 ++--- components/CategoryList.js | 2 +- components/LatestPostsGroup.js | 4 +- components/LoadingCover.js | 2 +- components/MenuButtonGroup.js | 6 +- components/ShareBar.js | 4 +- components/SideArea.js | 101 +++++++++++++++++++++++++++++++ components/SideAreaDrawer.js | 45 ++++++++++++++ components/StickyBar.js | 26 ++++---- components/TagList.js | 4 +- components/TopNav.js | 2 +- layouts/BaseLayout.js | 11 ++-- lib/cache/cache_manager.js | 4 +- lib/cache/memory_cache.js | 6 +- pages/404.js | 2 +- pages/_app.js | 2 +- pages/archive/index.js | 7 +-- pages/category/[category].js | 6 +- pages/category/index.js | 4 +- pages/index.js | 2 - pages/search.js | 4 +- pages/tag/[tag].js | 8 +-- pages/tag/index.js | 4 +- 28 files changed, 215 insertions(+), 77 deletions(-) create mode 100644 components/SideArea.js create mode 100644 components/SideAreaDrawer.js diff --git a/components/ArticleDetail.js b/components/ArticleDetail.js index d4b5ccf9..93ba0122 100644 --- a/components/ArticleDetail.js +++ b/components/ArticleDetail.js @@ -45,11 +45,11 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n
-
+
{post.type && !post.type.includes('Page') && post?.page_cover && ( <> @@ -150,7 +150,7 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n
{post.tagItems && (
-
+
{locale.COMMON.TAGS}:
{post.tagItems.map(tag => ( @@ -167,7 +167,7 @@ export default function ArticleDetail ({ post, blockMap, recommendPosts, prev, n
{/* 评论互动 */} -
+
diff --git a/components/BlogAround.js b/components/BlogAround.js index 01edc213..53231eb1 100644 --- a/components/BlogAround.js +++ b/components/BlogAround.js @@ -11,7 +11,7 @@ export default function BlogAround ({ prev, next }) { if (!prev || !next) { return <> } - return
+ return
{prev.title} diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index 55229ed7..05a7ced7 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -8,8 +8,8 @@ import TagItemMini from './TagItemMini' const BlogPostCard = ({ post, tags }) => { return ( -
+
@@ -41,7 +41,7 @@ const BlogPostCard = ({ post, tags }) => { {post?.page_cover && ( -
+
{post.title}
diff --git a/components/BlogPostListEmpty.js b/components/BlogPostListEmpty.js index acb4e688..b1d87253 100644 --- a/components/BlogPostListEmpty.js +++ b/components/BlogPostListEmpty.js @@ -5,10 +5,8 @@ * @constructor */ const BlogPostListEmpty = ({ currentSearch }) => { - return
-
+ return

没有找到文章 {(currentSearch &&

{currentSearch}
)}

-
} export default BlogPostListEmpty diff --git a/components/BlogPostListScroll.js b/components/BlogPostListScroll.js index e5f7920b..2d9f2224 100644 --- a/components/BlogPostListScroll.js +++ b/components/BlogPostListScroll.js @@ -51,7 +51,7 @@ const BlogPostListScroll = ({ posts = [], tags, currentSearch, currentCategory, if (!postsToShow || postsToShow.length === 0) { return } else { - return
+ return
{/* 文章列表 */}
diff --git a/components/CategoryGroup.js b/components/CategoryGroup.js index dd0ac764..6e9c71e8 100644 --- a/components/CategoryGroup.js +++ b/components/CategoryGroup.js @@ -4,21 +4,21 @@ import Link from 'next/link' import React from 'react' const CategoryGroup = ({ currentCategory, categories }) => { - return
- + } export default CategoryGroup diff --git a/components/CategoryList.js b/components/CategoryList.js index ba84f6b9..e226bf08 100644 --- a/components/CategoryList.js +++ b/components/CategoryList.js @@ -11,7 +11,7 @@ const CategoryList = ({ currentCategory, categories }) => { const { locale } = useGlobal() return