From 33740681637e2b265138fb4fce562fc1eedbafeb Mon Sep 17 00:00:00 2001 From: anime Date: Fri, 8 Nov 2024 00:14:09 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BD=BF=E6=89=80=E6=9C=89=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E7=9A=84404=E8=83=BD=E5=A4=9F=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E8=BF=90=E8=BD=AC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 3e3b7667d043522a3d782b804815b8f1683127d1) --- themes/commerce/index.js | 2 +- themes/example/index.js | 2 +- themes/fukasawa/index.js | 2 +- themes/game/index.js | 2 +- themes/heo/index.js | 2 +- themes/hexo/index.js | 2 +- themes/magzine/index.js | 2 +- themes/matery/index.js | 2 +- themes/medium/index.js | 2 +- themes/movie/index.js | 2 +- themes/nobelium/index.js | 2 +- themes/photo/index.js | 2 +- themes/plog/index.js | 2 +- themes/simple/index.js | 52 +++++++++++++++++++++------------------- themes/starter/index.js | 2 +- 15 files changed, 41 insertions(+), 39 deletions(-) diff --git a/themes/commerce/index.js b/themes/commerce/index.js index 7ced2e85726..f415f8e5200 100644 --- a/themes/commerce/index.js +++ b/themes/commerce/index.js @@ -246,7 +246,7 @@ const LayoutSlug = props => {
{lock && } - {!lock && ( + {!lock && post && (
diff --git a/themes/example/index.js b/themes/example/index.js index 60b896c1f4f..2d6ecfefaee 100644 --- a/themes/example/index.js +++ b/themes/example/index.js @@ -178,7 +178,7 @@ const LayoutSlug = props => { <> {lock ? ( - ) : ( + ) : post && (
diff --git a/themes/fukasawa/index.js b/themes/fukasawa/index.js index 96936df8229..2167a95027f 100644 --- a/themes/fukasawa/index.js +++ b/themes/fukasawa/index.js @@ -159,7 +159,7 @@ const LayoutSlug = props => { <> {lock ? ( - ) : ( + ) : post && ( )} diff --git a/themes/game/index.js b/themes/game/index.js index 718f6a92a8c..04bc192ccf5 100644 --- a/themes/game/index.js +++ b/themes/game/index.js @@ -307,7 +307,7 @@ const LayoutSlug = props => { <> {lock && } - {!lock && ( + {!lock && post && (
diff --git a/themes/heo/index.js b/themes/heo/index.js index 9bab5daffc8..42bfcb83f45 100644 --- a/themes/heo/index.js +++ b/themes/heo/index.js @@ -292,7 +292,7 @@ const LayoutSlug = props => { {/* 文章锁 */} {lock && } - {!lock && ( + {!lock && post && (
{/* 文章主体 */}
{
{lock && } - {!lock && ( + {!lock && post && (
{ {/* 文章锁 */} {lock && } - {!lock && ( + {!lock && post && (
{/* 文章信息 */} diff --git a/themes/matery/index.js b/themes/matery/index.js index 7cbcad19ddb..13a5992f094 100644 --- a/themes/matery/index.js +++ b/themes/matery/index.js @@ -253,7 +253,7 @@ const LayoutSlug = props => { className={`${fullWidth ? '' : '-mt-32'} transition-all duration-300 rounded-md mx-3 lg:border lg:rounded-xl lg:py-4 bg-white dark:bg-hexo-black-gray dark:border-black`}> {lock && } - {!lock && ( + {!lock && post && (
{/* 文章信息 */} {post?.type && post?.type === 'Post' && ( diff --git a/themes/medium/index.js b/themes/medium/index.js index ee5eb121f4e..b51db693622 100644 --- a/themes/medium/index.js +++ b/themes/medium/index.js @@ -209,7 +209,7 @@ const LayoutSlug = props => { {/* 文章锁 */} {lock && } - {!lock && ( + {!lock && post && (
{/* 文章信息 */} diff --git a/themes/movie/index.js b/themes/movie/index.js index 00b90346c4e..c205d6d02b8 100644 --- a/themes/movie/index.js +++ b/themes/movie/index.js @@ -315,7 +315,7 @@ const LayoutSlug = props => { return ( <> - {!lock ? ( + {!lock ? post && (
diff --git a/themes/nobelium/index.js b/themes/nobelium/index.js index ed2b6ea6ea4..44afc5c004a 100644 --- a/themes/nobelium/index.js +++ b/themes/nobelium/index.js @@ -243,7 +243,7 @@ const LayoutSlug = props => { <> {lock && } - {!lock && ( + {!lock && post && (
<> diff --git a/themes/photo/index.js b/themes/photo/index.js index f369e6fb28c..64f6a1f06b5 100644 --- a/themes/photo/index.js +++ b/themes/photo/index.js @@ -315,7 +315,7 @@ const LayoutSlug = props => { return ( <> - {!lock ? ( + {!lock ? post && (
diff --git a/themes/plog/index.js b/themes/plog/index.js index be778f685b7..b715206f42a 100644 --- a/themes/plog/index.js +++ b/themes/plog/index.js @@ -198,7 +198,7 @@ const LayoutSlug = props => { <> {lock && } - {!lock && ( + {!lock && post && (
<> diff --git a/themes/simple/index.js b/themes/simple/index.js index 397e6a69d34..29516202e1a 100644 --- a/themes/simple/index.js +++ b/themes/simple/index.js @@ -224,35 +224,37 @@ const LayoutSlug = props => { <> {lock && } -
- {/* 文章信息 */} - - - {/* 广告嵌入 */} - {/* */} - - -
- {/* Notion文章主体 */} - {!lock && } -
+ {!lock && post && ( +
+ {/* 文章信息 */} + + + {/* 广告嵌入 */} + {/* */} + + +
+ {/* Notion文章主体 */} + {!lock && } +
- {/* 分享 */} - + {/* 分享 */} + - {/* 广告嵌入 */} - + {/* 广告嵌入 */} + - {post?.type === 'Post' && ( - <> - - - - )} + {post?.type === 'Post' && ( + <> + + + + )} - {/* 评论区 */} - -
+ {/* 评论区 */} + +
+ )} ) } diff --git a/themes/starter/index.js b/themes/starter/index.js index 35d837bd559..c4f9af8c032 100644 --- a/themes/starter/index.js +++ b/themes/starter/index.js @@ -159,7 +159,7 @@ const LayoutSlug = props => {
{lock && } - {!lock && ( + {!lock && post && (