diff --git a/themes/Empty/LayoutArchive.js b/themes/Empty/LayoutArchive.js
index e46502fc..bf9ebdc5 100644
--- a/themes/Empty/LayoutArchive.js
+++ b/themes/Empty/LayoutArchive.js
@@ -1,5 +1,6 @@
-export const LayoutArchive = ({ posts, tags, categories, postCount }) => {
- return
+export const LayoutArchive = (props) => {
+ // const { posts, tags, categories, postCount } = props
+ return
Archive Page
}
diff --git a/themes/Empty/LayoutBase.js b/themes/Empty/LayoutBase.js
index d302c580..f906fef4 100644
--- a/themes/Empty/LayoutBase.js
+++ b/themes/Empty/LayoutBase.js
@@ -2,39 +2,18 @@ import CommonHead from '@/components/CommonHead'
/**
* 基础布局 采用左右两侧布局,移动端使用顶部导航栏
- * @param children
- * @param layout
- * @param tags
- * @param meta
- * @param post
- * @param currentSearch
- * @param currentCategory
- * @param currentTag
- * @param categories
+
* @returns {JSX.Element}
* @constructor
*/
-const LayoutBase = ({
- children,
- headerSlot,
- tags,
- meta,
- post,
- postCount,
- sideBarSlot,
- floatSlot,
- rightAreaSlot,
- currentSearch,
- currentCategory,
- currentTag,
- categories
-}) => {
- return (<>
+const LayoutBase = (props) => {
+ const { children, meta } = props
+ return
{children}
- >)
+
}
export default LayoutBase
diff --git a/themes/Empty/LayoutCategory.js b/themes/Empty/LayoutCategory.js
index 60e0d11a..3a4bb0e9 100644
--- a/themes/Empty/LayoutCategory.js
+++ b/themes/Empty/LayoutCategory.js
@@ -1,5 +1,8 @@
-export const LayoutCategory = ({ tags, posts, category, categories, latestPosts, postCount }) => {
- return
+import LayoutBase from './LayoutBase'
+
+export const LayoutCategory = (props) => {
+ const { category } = props
+ return
Category - {category}
-
+
}
diff --git a/themes/Empty/LayoutCategoryIndex.js b/themes/Empty/LayoutCategoryIndex.js
index 467bde1c..fcde0a08 100644
--- a/themes/Empty/LayoutCategoryIndex.js
+++ b/themes/Empty/LayoutCategoryIndex.js
@@ -1,11 +1,8 @@
-export const LayoutCategoryIndex = ({
- tags,
- allPosts,
- categories,
- postCount,
- latestPosts
-}) => {
- return
+import LayoutBase from './LayoutBase'
+
+export const LayoutCategoryIndex = (props) => {
+ // const { tags, allPosts, categories, postCount, latestPosts } = props
+ return
CategoryIndex
-
+
}
diff --git a/themes/Empty/LayoutIndex.js b/themes/Empty/LayoutIndex.js
index 986951c3..9408f97a 100644
--- a/themes/Empty/LayoutIndex.js
+++ b/themes/Empty/LayoutIndex.js
@@ -1,3 +1,6 @@
-export const LayoutIndex = ({ posts, tags, meta, categories, postCount, latestPosts }) => {
- return
Index
+import LayoutBase from './LayoutBase'
+
+export const LayoutIndex = (props) => {
+ // const { posts, tags, meta, categories, postCount, latestPosts } = props
+ return
Index
}
diff --git a/themes/Empty/LayoutPage.js b/themes/Empty/LayoutPage.js
index c025ff3c..d4355d46 100644
--- a/themes/Empty/LayoutPage.js
+++ b/themes/Empty/LayoutPage.js
@@ -1,5 +1,8 @@
-export const LayoutPage = ({ page, posts, tags, meta, categories, postCount, latestPosts }) => {
- return
+import LayoutBase from '../Hexo/LayoutBase'
+
+export const LayoutPage = (props) => {
+ const { page } = props
+ return
Page - {page}
-
+
}
diff --git a/themes/Empty/LayoutSearch.js b/themes/Empty/LayoutSearch.js
index 76e4867c..c7469a60 100644
--- a/themes/Empty/LayoutSearch.js
+++ b/themes/Empty/LayoutSearch.js
@@ -1,11 +1,8 @@
import { useRouter } from 'next/router'
+import LayoutBase from './LayoutBase'
-export const LayoutSearch = ({
- posts,
- tags,
- categories,
- postCount
-}) => {
+export const LayoutSearch = (props) => {
+ const { posts } = props
let filteredPosts
const searchKey = getSearchKey()
if (searchKey) {
@@ -20,9 +17,9 @@ export const LayoutSearch = ({
console.log(filteredPosts)
- return
+ return
Search {searchKey}
-
+
}
function getSearchKey () {
diff --git a/themes/Empty/LayoutSlug.js b/themes/Empty/LayoutSlug.js
index 9335af67..cb5844df 100644
--- a/themes/Empty/LayoutSlug.js
+++ b/themes/Empty/LayoutSlug.js
@@ -4,18 +4,33 @@ import 'prismjs/components/prism-javascript'
import 'prismjs/components/prism-markup'
import 'prismjs/components/prism-python'
import 'prismjs/components/prism-typescript'
+import { Code, Collection, CollectionRow, Equation, NotionRenderer } from 'react-notion-x'
-export const LayoutSlug = ({
- post,
- tags,
- prev,
- next,
- recommendPosts,
- categories,
- postCount,
- latestPosts
-}) => {
+const mapPageUrl = id => {
+ return 'https://www.notion.so/' + id.replace(/-/g, '')
+}
+
+export const LayoutSlug = (props) => {
+ const { post } = props
return
- Slug
+
Slug - {post?.title}
+
+ {/* Notion文章主体 */}
+
+ {post.blockMap && (
+
+ )}
+
+
+
}
diff --git a/themes/Empty/LayoutTag.js b/themes/Empty/LayoutTag.js
index cae36f38..5cfacb20 100644
--- a/themes/Empty/LayoutTag.js
+++ b/themes/Empty/LayoutTag.js
@@ -1,5 +1,8 @@
-export const LayoutTag = ({ tags, posts, tag, categories, postCount, latestPosts }) => {
- return
+import LayoutBase from './LayoutBase'
+
+export const LayoutTag = (props) => {
+ const { tag } = props
+ return
Tag - {tag}
-
+
}
diff --git a/themes/Empty/LayoutTagIndex.js b/themes/Empty/LayoutTagIndex.js
index deb76f8e..01a16e62 100644
--- a/themes/Empty/LayoutTagIndex.js
+++ b/themes/Empty/LayoutTagIndex.js
@@ -1,5 +1,8 @@
-export const LayoutTagIndex = ({ tags, categories, postCount, latestPosts }) => {
- return
+import LayoutBase from './LayoutBase'
+
+export const LayoutTagIndex = (props) => {
+ // const { tags, categories, postCount, latestPosts } = props
+ return
TagIndex
-
+
}