-
- {/* 文章主体卡片 */}
-
-
- {lock &&
}
-
- {!lock &&
-
- {/* 文章信息 */}
- {post?.type && post?.type === 'Post' && <>
-
-
- >}
-
-
-
-
-
- {/* Notion文章主体 */}
-
-
- {/* 分享 */}
-
-
- {/* 版权说明 */}
- {post?.type === 'Post' && }
-
-
-
-
-
- {/* 评论互动 */}
-
-
-
-
-
-
}
+ return (
+ <>
+
+ {/* 文章主体 */}
+
+ {lock &&
}
+
+ {!lock && (
+
+ {/* 文章信息 */}
+ {post?.type && post?.type === 'Post' && (
+ <>
+
+
+ >
+ )}
+
+
+
+ {/* Notion文章主体 */}
+
+
+ {/* 分享 */}
+
+
+ {/* 版权说明 */}
+ {post?.type === 'Post' && }
+
+
+
+
+ {/* 评论互动 */}
+
+
+
+
+
+ )}
+
- {/* 底部文章推荐 */}
- {post?.type === 'Post' &&
}
-
- {/* 底部公告 */}
-
-
- {/* 右侧文章目录 */}
-
+ {/* 底部文章推荐 */}
+ {post?.type === 'Post' &&
}
-
+ {/* 底部公告 */}
+
+ {/* 右侧文章目录 */}
+
+
>
)
}
@@ -291,7 +325,9 @@ const Layout404 = props => {
useEffect(() => {
// 延时3秒如果加载失败就返回首页
setTimeout(() => {
- const article = typeof document !== 'undefined' && document.getElementById('notion-article')
+ const article =
+ typeof document !== 'undefined' &&
+ document.getElementById('notion-article')
if (!article) {
router.push('/').then(() => {
// console.log('找不到页面', router.asPath)
@@ -300,18 +336,18 @@ const Layout404 = props => {
}, 3000)
})
return (
- <>
-
- >
+ <>
+
+ >
)
}
@@ -324,24 +360,27 @@ const LayoutCategoryIndex = props => {
const { categoryOptions } = props
return (
- <>
-
-
-
-
- {categoryOptions?.map(e => {
- return (
-
-
- {e.name}({e.count})
-
-
- )
- })}
-
-
-
- >
+ <>
+
+
+
+ {categoryOptions?.map(e => {
+ return (
+
+
+ {e.name}({e.count})
+
+
+ )
+ })}
+
+
+
+ >
)
}
@@ -354,39 +393,39 @@ const LayoutTagIndex = props => {
const { tagOptions } = props
const { locale } = useGlobal()
return (
- <>
-
-
-
-
-
- {locale.COMMON.TAGS}
-
-
-
+ <>
+
+
+
+ {locale.COMMON.TAGS}
+
+
+
- >
+ )
+ })}
+
+
+
+ >
)
}
export {
- CONFIG as THEME_CONFIG,
+ Layout404,
+ LayoutArchive,
LayoutBase,
+ LayoutCategoryIndex,
LayoutIndex,
LayoutPostList,
LayoutSearch,
- LayoutArchive,
LayoutSlug,
- Layout404,
- LayoutCategoryIndex,
- LayoutTagIndex
+ LayoutTagIndex,
+ CONFIG as THEME_CONFIG
}