)
}
diff --git a/themes/Fukasawa/components/Card.js b/themes/Fukasawa/components/Card.js
index d24c046e..890aadf9 100644
--- a/themes/Fukasawa/components/Card.js
+++ b/themes/Fukasawa/components/Card.js
@@ -1,7 +1,7 @@
const Card = ({ children, headerSlot, className }) => {
return
diff --git a/themes/Fukasawa/components/GroupCategory.js b/themes/Fukasawa/components/GroupCategory.js
index 42bc28cb..8e17fd5e 100644
--- a/themes/Fukasawa/components/GroupCategory.js
+++ b/themes/Fukasawa/components/GroupCategory.js
@@ -4,6 +4,10 @@ import Link from 'next/link'
import React from 'react'
function GroupCategory ({ currentCategory, categories }) {
+ if (!categories) {
+ return <>>
+ }
+
return <>
{Object.keys(categories).map(category => {
diff --git a/themes/Fukasawa/components/PaginationNumber.js b/themes/Fukasawa/components/PaginationNumber.js
deleted file mode 100644
index 36de638b..00000000
--- a/themes/Fukasawa/components/PaginationNumber.js
+++ /dev/null
@@ -1,94 +0,0 @@
-import BLOG from '@/blog.config'
-import Link from 'next/link'
-import { useRouter } from 'next/router'
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
-import { faAngleLeft, faAngleRight } from '@fortawesome/free-solid-svg-icons'
-
-/**
- * 数字翻页插件
- * @param page 当前页码
- * @param showNext 是否有下一页
- * @returns {JSX.Element}
- * @constructor
- */
-const PaginationNumber = ({ page, totalPage }) => {
- const router = useRouter()
- const currentPage = +page
- const showNext = page !== totalPage
- const pages = generatePages(page, currentPage, totalPage)
-
- return (
-
-
- {/* 上一页 */}
-
-
-
-
-
-
- {pages}
-
- {/* 下一页 */}
-
-
-
-
-
-
- )
-}
-
-function getPageElement (page, currentPage) {
- return
-
- {page}
-
-
-}
-function generatePages (page, currentPage, totalPage) {
- const pages = []
- const groupCount = 7 // 最多显示页签数
- if (totalPage <= groupCount) {
- for (let i = 1; i <= totalPage; i++) {
- pages.push(getPageElement(i, page))
- }
- } else {
- pages.push(getPageElement(1, page))
- const dynamicGroupCount = groupCount - 2
- let startPage = currentPage - 2
- if (startPage <= 1) {
- startPage = 2
- }
- if (startPage + dynamicGroupCount > totalPage) {
- startPage = totalPage - dynamicGroupCount
- }
- if (startPage > 2) {
- pages.push(
...
)
- }
-
- for (let i = 0; i < dynamicGroupCount; i++) {
- if (startPage + i < totalPage) {
- pages.push(getPageElement(startPage + i, page))
- }
- }
-
- if (startPage + dynamicGroupCount < totalPage) {
- pages.push(
...
)
- }
-
- pages.push(getPageElement(totalPage, page))
- }
- return pages
-}
-export default PaginationNumber
diff --git a/themes/Fukasawa/components/PaginationSimple.js b/themes/Fukasawa/components/PaginationSimple.js
new file mode 100644
index 00000000..8d45021b
--- /dev/null
+++ b/themes/Fukasawa/components/PaginationSimple.js
@@ -0,0 +1,42 @@
+import BLOG from '@/blog.config'
+import Link from 'next/link'
+import { useRouter } from 'next/router'
+import { useGlobal } from '@/lib/global'
+
+/**
+ * 简易翻页插件
+ * @param page 当前页码
+ * @param showNext 是否有下一页
+ * @returns {JSX.Element}
+ * @constructor
+ */
+const PaginationSimple = ({ page, showNext }) => {
+ const { locale } = useGlobal()
+ const router = useRouter()
+ const currentPage = +page
+ return (
+
+ )
+}
+
+export default PaginationSimple
diff --git a/themes/index.js b/themes/index.js
index de2f713d..2a223d56 100644
--- a/themes/index.js
+++ b/themes/index.js
@@ -1,5 +1,5 @@
/**
- * 直接将./NEXT 替换成对应的主题路径
+ * 修改 from 后面的路径,实现主题切换
*/
// export * from './NEXT' // 切换主题