-
- {showArticleInfo && <>
-
- {/* 分享 */}
-
-
- {/* 版权声明 */}
- {post?.type === 'Post' &&
}
-
- {/* 推荐文章 */}
- {post?.type === 'Post' &&
-
+
+
+ {showArticleInfo && (
+
+ )}
+
+ {/* Notion内容主体 */}
+
+
+ {post && }
+
+
+
+ {showArticleInfo && (
+ <>
+ {/* 分享 */}
+
+
+ {/* 版权声明 */}
+ {post?.type === 'Post' && (
+
+ )}
+
+ {/* 推荐文章 */}
+ {post?.type === 'Post' && (
+
+ )}
+
+
+ {/* 分类 */}
+ {post.category && (
+ <>
+
+ >
+ )}
+
+ {/* 标签列表 */}
+ {post?.type === 'Post' && (
+ <>
+ {post.tagItems && (
+
+
+ {locale.COMMON.TAGS}:
+
+ {post.tagItems.map(tag => (
+
+ ))}
+
+ )}
+ >
+ )}
+
+ {post?.type === 'Post' &&
}
+ >
+ )}
+
+ {/* 评论互动 */}
+
+
+
+
)
}
diff --git a/themes/next/components/PaginationNumber.js b/themes/next/components/PaginationNumber.js
index af72c797da3..02c61693fb0 100644
--- a/themes/next/components/PaginationNumber.js
+++ b/themes/next/components/PaginationNumber.js
@@ -16,6 +16,8 @@ const PaginationNumber = ({ page, totalPage }) => {
.split('?')[0]
.replace(/\/page\/[1-9]\d*/, '')
.replace(/\/$/, '')
+ .replace('.html', '')
+
const pages = generatePages(pagePrefix, page, currentPage, totalPage)
return (
@@ -67,22 +69,14 @@ const PaginationNumber = ({ page, totalPage }) => {
)
}
-function getPageElement(pagePrefix, page, currentPage) {
- return (
-
- {page}
-
- )
-}
+/**
+ * 生成分页按钮组
+ * @param {*} pagePrefix
+ * @param {*} page
+ * @param {*} currentPage
+ * @param {*} totalPage
+ * @returns
+ */
function generatePages(pagePrefix, page, currentPage, totalPage) {
const pages = []
const groupCount = 7 // 最多显示页签数
@@ -126,4 +120,28 @@ function generatePages(pagePrefix, page, currentPage, totalPage) {
}
return pages
}
+/**
+ * 生成分页按钮对象
+ * @param {*} pagePrefix
+ * @param {*} page
+ * @param {*} currentPage
+ * @returns
+ */
+function getPageElement(pagePrefix, page, currentPage) {
+ return (
+
+ {page}
+
+ )
+}
+
export default PaginationNumber
diff --git a/themes/next/style.js b/themes/next/style.js
index daf6af46ab0..41746f9affe 100644
--- a/themes/next/style.js
+++ b/themes/next/style.js
@@ -5,35 +5,31 @@
* @returns
*/
const Style = () => {
- return
+ // 菜单下划线动画
+ #theme-next .menu-link {
+ text-decoration: none;
+ background-image: linear-gradient(#4e80ee, #4e80ee);
+ background-repeat: no-repeat;
+ background-position: bottom center;
+ background-size: 0 2px;
+ transition: background-size 100ms ease-in-out;
+ }
+ #theme-next .menu-link:hover {
+ background-size: 100% 2px;
+ color: #4e80ee;
+ }
+ `}
+ )
}
export { Style }
diff --git a/themes/nobelium/components/BlogListPage.js b/themes/nobelium/components/BlogListPage.js
index 0c313ba4fc1..6998c522e74 100644
--- a/themes/nobelium/components/BlogListPage.js
+++ b/themes/nobelium/components/BlogListPage.js
@@ -19,6 +19,7 @@ export const BlogListPage = props => {
.split('?')[0]
.replace(/\/page\/[1-9]\d*/, '')
.replace(/\/$/, '')
+ .replace('.html', '')
return (
diff --git a/themes/plog/components/BlogListPage.js b/themes/plog/components/BlogListPage.js
index 68790295974..9224c16b90c 100644
--- a/themes/plog/components/BlogListPage.js
+++ b/themes/plog/components/BlogListPage.js
@@ -20,6 +20,7 @@ export const BlogListPage = props => {
.split('?')[0]
.replace(/\/page\/[1-9]\d*/, '')
.replace(/\/$/, '')
+ .replace('.html', '')
const blogPostRefs = useRef([])
diff --git a/themes/simple/components/BlogListPage.js b/themes/simple/components/BlogListPage.js
index 0345185bf0b..1219aac77a6 100644
--- a/themes/simple/components/BlogListPage.js
+++ b/themes/simple/components/BlogListPage.js
@@ -32,6 +32,7 @@ export default function BlogListPage(props) {
.split('?')[0]
.replace(/\/page\/[1-9]\d*/, '')
.replace(/\/$/, '')
+ .replace('.html', '')
return (