From 15a6a2cb51b698f81dbbc1ca8ee8b7cc93b03026 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 7 Oct 2021 17:41:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=E6=96=87=E7=AB=A0=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=86=E9=A1=B5=E6=8C=89=E9=92=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Pagination.js | 2 +- layouts/DefaultLayout.js | 26 ++++++++++---------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/components/Pagination.js b/components/Pagination.js index 78f1c91e..d853a1a1 100644 --- a/components/Pagination.js +++ b/components/Pagination.js @@ -8,7 +8,7 @@ const Pagination = ({ page, showNext }) => { const router = useRouter() const currentPage = +page return ( -
+
{ return (
- +
{/* 侧边菜单 */}
- {(!page || page === 1) && ( -
- ) - } + {(!page || page === 1) && (
)} + {/* 标签 */} {currentTag && (
@@ -93,35 +91,31 @@ const DefaultLayout = ({ tags, posts, page, currentTag, ...customMeta }) => {
)} + {/* 当前搜索 */} {(currentSearch || (page && page !== 1)) && (
- {currentSearch && ( - 搜索关键词: {currentSearch} - )} - {page && page !== 1 && ( - 页 {page} / {totalPages} - )} + {currentSearch && (搜索关键词: {currentSearch})} + {page && page !== 1 && (页 {page} / {totalPages})}

)} - {/* 文章列表 */}
- {/*
*/} + {/* 文章列表 */}
{!postsToShow.length && (

No posts found.

)} {postsToShow.map(post => ( - + ))}
-
- + +