diff --git a/themes/matery/components/BlogPostListPage.js b/themes/matery/components/BlogPostListPage.js index 7f7c4b6f484..05478669793 100644 --- a/themes/matery/components/BlogPostListPage.js +++ b/themes/matery/components/BlogPostListPage.js @@ -1,5 +1,5 @@ -import BlogPostCard from './BlogPostCard' import { siteConfig } from '@/lib/config' +import BlogPostCard from './BlogPostCard' import BlogPostListEmpty from './BlogPostListEmpty' import PaginationSimple from './PaginationSimple' @@ -12,7 +12,9 @@ import PaginationSimple from './PaginationSimple' * @constructor */ const BlogPostListPage = ({ page = 1, posts = [], postCount, siteInfo }) => { - const totalPage = Math.ceil(postCount / parseInt(siteConfig('POSTS_PER_PAGE'))) + const totalPage = Math.ceil( + postCount / parseInt(siteConfig('POSTS_PER_PAGE')) + ) const showPagination = postCount >= parseInt(siteConfig('POSTS_PER_PAGE')) if (!posts || posts.length === 0 || page > totalPage) { return @@ -21,12 +23,17 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount, siteInfo }) => {
{/* 文章列表 */} -
- {posts?.map(post => ( -
+
+ {posts?.map((post, index) => ( +
+ {' '} + +
))}
- {showPagination && } + {showPagination && ( + + )}
) } diff --git a/themes/matery/components/Footer.js b/themes/matery/components/Footer.js index b75368b48f0..a2266cbbe75 100644 --- a/themes/matery/components/Footer.js +++ b/themes/matery/components/Footer.js @@ -3,31 +3,60 @@ import { siteConfig } from '@/lib/config' const Footer = ({ title }) => { const d = new Date() const currentYear = d.getFullYear() - const copyrightDate = (function() { - if (Number.isInteger(siteConfig('SINCE')) && siteConfig('SINCE') < currentYear) { + const copyrightDate = (function () { + if ( + Number.isInteger(siteConfig('SINCE')) && + siteConfig('SINCE') < currentYear + ) { return siteConfig('SINCE') + '-' + currentYear } return currentYear })() return ( -