From d8ff172a82e6408771ca29795011b96e25352748 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 11 Mar 2023 09:27:00 +0800 Subject: [PATCH] =?UTF-8?q?fix-theme-simple-=E5=86=85=E5=AE=B9=E6=BA=A2?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blog.config.js | 2 +- components/StarrySky.js | 2 +- themes/simple/LayoutBase.js | 17 +++++++---------- themes/simple/components/SideBar.js | 26 +++++++++++--------------- 4 files changed, 20 insertions(+), 27 deletions(-) diff --git a/blog.config.js b/blog.config.js index bb063c18..2449cc31 100644 --- a/blog.config.js +++ b/blog.config.js @@ -75,7 +75,7 @@ const BLOG = { POST_PREVIEW_LINES: 12, // 预览博客行数 POST_RECOMMEND_COUNT: 6, // 推荐文章数量 POSTS_PER_PAGE: 12, // post counts per page - POSTS_SORT_BY: 'notion', // 排序方式 'date'按时间,'notion'由notion控制 + POSTS_SORT_BY: process.env.NEXT_PUBLIC_POST_SORT_BY || 'notion', // 排序方式 'date'按时间,'notion'由notion控制 PREVIEW_CATEGORY_COUNT: 16, // 首页最多展示的分类数量,0为不限制 PREVIEW_TAG_COUNT: 16, // 首页最多展示的标签数量,0为不限制 diff --git a/components/StarrySky.js b/components/StarrySky.js index 3a3a77d6..089a95b9 100644 --- a/components/StarrySky.js +++ b/components/StarrySky.js @@ -7,7 +7,7 @@ export const StarrySky = () => { }, []) return (
- +
) } diff --git a/themes/simple/LayoutBase.js b/themes/simple/LayoutBase.js index 514bb314..ad2608e2 100644 --- a/themes/simple/LayoutBase.js +++ b/themes/simple/LayoutBase.js @@ -23,8 +23,8 @@ const LayoutBase = props => { const { onLoading } = useGlobal() /** - * 路由跳转时的遮罩 - */ + * 路由跳转时的遮罩 + */ const LoadingCover =
@@ -47,16 +47,13 @@ const LayoutBase = props => { {/* 主体 */} -
- -
- -
- {onLoading ? LoadingCover : children} -
+
+
+ {onLoading ? LoadingCover : children} +
+
-
diff --git a/themes/simple/components/SideBar.js b/themes/simple/components/SideBar.js index bd110529..b3cdf2ce 100644 --- a/themes/simple/components/SideBar.js +++ b/themes/simple/components/SideBar.js @@ -4,20 +4,16 @@ import Catalog from './Catalog' export const SideBar = (props) => { const { notice } = props - return ( -
+ return (<> + - - - - - -
- ) + + + ) }