From f57e804bcf3cd362486ede49374e48ea0ecb9ddd Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 27 Dec 2022 11:28:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=80=E7=82=B9=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ThemeSwitch.js | 2 +- themes/matery/LayoutSlug.js | 25 ++++++++++++++++++++--- themes/matery/components/HeaderArticle.js | 8 +++++++- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/components/ThemeSwitch.js b/components/ThemeSwitch.js index 4e84f36f..fe9b1de7 100644 --- a/components/ThemeSwitch.js +++ b/components/ThemeSwitch.js @@ -19,7 +19,7 @@ export function ThemeSwitch() {
{/*
{theme}
*/} - {ALL_THEME.map(t => { const selected = t === theme return diff --git a/themes/matery/LayoutSlug.js b/themes/matery/LayoutSlug.js index 1eb6e978..db78b172 100644 --- a/themes/matery/LayoutSlug.js +++ b/themes/matery/LayoutSlug.js @@ -51,7 +51,13 @@ export const LayoutSlug = props => { {!lock &&
{post?.type === 'Post' && <> -
+

@@ -60,7 +66,14 @@ export const LayoutSlug = props => {
{/* Notion文章主体 */} -
+
{post && }
@@ -92,7 +105,13 @@ export const LayoutSlug = props => { {post.type === 'Post' && } {post?.toc?.length > 0 &&
-
+
diff --git a/themes/matery/components/HeaderArticle.js b/themes/matery/components/HeaderArticle.js index f7c7379d..4b0b2a20 100644 --- a/themes/matery/components/HeaderArticle.js +++ b/themes/matery/components/HeaderArticle.js @@ -2,7 +2,13 @@ export default function HeaderArticle({ post, siteInfo }) { const headerImage = post?.page_cover ? post?.page_cover : siteInfo?.pageCover const title = post?.title return ( -