+ rel='next'
+ className={`${+showNext ? 'block' : 'invisible'} `}>
+
@@ -105,7 +101,7 @@ const PaginationNumber = ({ page, totalPage }) => {
{/* 移动端分页 */}
-
+
{/* 上一页 */}
{
: `${pagePrefix}/page/${currentPage - 1}`,
query: router.query.s ? { s: router.query.s } : {}
}}
- rel="prev"
- className={`${showPrev ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}
- >
+ rel='prev'
+ className={`${showPrev ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}>
{locale.PAGINATION.PREV}
- {showPrev && showNext &&
}
+ {showPrev && showNext &&
}
{/* 下一页 */}
{
pathname: `${pagePrefix}/page/${currentPage + 1}`,
query: router.query.s ? { s: router.query.s } : {}
}}
- rel="next"
- className={`${+showNext ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}
- >
+ rel='next'
+ className={`${+showNext ? 'block' : 'hidden'} dark:text-white relative w-full flex-1 h-14 flex items-center transition-all duration-200 justify-center py-2 px-2 bg-white dark:bg-[#1e1e1e] border rounded-xl cursor-pointer`}>
{locale.PAGINATION.NEXT}
@@ -161,8 +155,7 @@ function getPageElement(page, currentPage, pagePrefix) {
? 'bg-indigo-600 dark:bg-yellow-600 text-white '
: 'dark:bg-[#1e1e1e] bg-white') +
' hover:border-indigo-600 dark:hover:bg-yellow-600 dark:border-gray-600 px-4 border py-2 rounded-lg drop-shadow-sm duration-200 transition-colors'
- }
- >
+ }>
{page}
)
@@ -195,7 +188,7 @@ function generatePages(pagePrefix, page, currentPage, totalPage) {
}
if (startPage > 2) {
pages.push(
-
+
...{' '}
)
diff --git a/themes/heo/components/SideRight.js b/themes/heo/components/SideRight.js
index 775b9b76..1fcf9639 100644
--- a/themes/heo/components/SideRight.js
+++ b/themes/heo/components/SideRight.js
@@ -1,12 +1,12 @@
+import Live2D from '@/components/Live2D'
+import dynamic from 'next/dynamic'
+import { AnalyticsCard } from './AnalyticsCard'
import Card from './Card'
-import TagGroups from './TagGroups'
import Catalog from './Catalog'
import { InfoCard } from './InfoCard'
-import dynamic from 'next/dynamic'
-import Live2D from '@/components/Live2D'
-import { AnalyticsCard } from './AnalyticsCard'
-import TouchMeCard from './TouchMeCard'
import LatestPostsGroupMini from './LatestPostsGroupMini'
+import TagGroups from './TagGroups'
+import TouchMeCard from './TouchMeCard'
const FaceBookPage = dynamic(
() => {
@@ -27,46 +27,46 @@ const FaceBookPage = dynamic(
* @returns
*/
export default function SideRight(props) {
- const {
- post, tagOptions,
- currentTag, rightAreaSlot
- } = props
+ const { post, tagOptions, currentTag, rightAreaSlot } = props
+
+ // 只摘取标签的前60个,防止右侧过长
+ const sortedTags = tagOptions.slice(0, 60)
return (
-
+
+
-
+
+ {/* 文章页显示目录 */}
+ {post && post.toc && post.toc.length > 0 && (
+
+
+
+ )}
-
-
- {/* 文章页显示目录 */}
- {post && post.toc && post.toc.length > 0 && (
-
-
-
- )}
-
- {/* 联系交流群 */}
-
-
- {/* 最新文章列表 */}
-
-
-
-
- {rightAreaSlot}
-
-
-
-
- {/* 标签和成绩 */}
-
-
-
-
-
-
+ {/* 联系交流群 */}
+
+ {/* 最新文章列表 */}
+
+
+
+ {rightAreaSlot}
+
+
+
+
+ {/* 标签和成绩 */}
+
+
+
+
+
+
+
)
}
diff --git a/themes/heo/index.js b/themes/heo/index.js
index f7725939..bd2fb42b 100644
--- a/themes/heo/index.js
+++ b/themes/heo/index.js
@@ -56,7 +56,7 @@ const LayoutBase = props => {
const router = useRouter()
const headerSlot = (
-