diff --git a/themes/commerce/components/BlogPostCard.js b/themes/commerce/components/BlogPostCard.js deleted file mode 100644 index f1febbdd..00000000 --- a/themes/commerce/components/BlogPostCard.js +++ /dev/null @@ -1,49 +0,0 @@ -import Link from 'next/link' -import React from 'react' -import CONFIG from '../config' -import { BlogPostCardInfo } from './BlogPostCardInfo' -import BLOG from '@/blog.config' -import LazyImage from '@/components/LazyImage' -// import Image from 'next/image' - -const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { - const showPreview = CONFIG.POST_LIST_PREVIEW && post.blockMap - if (post && !post.pageCoverThumbnail && CONFIG.POST_LIST_COVER_DEFAULT) { - post.pageCoverThumbnail = siteInfo?.pageCover - } - const showPageCover = CONFIG.POST_LIST_COVER && post?.pageCoverThumbnail && !showPreview - // const delay = (index % 2) * 200 - - return ( - -
-
- - {/* 文字内容 */} - - - {/* 图片封面 */} - {showPageCover && ( -
- - - -
- )} - -
- -
- - ) -} - -export default BlogPostCard diff --git a/themes/commerce/components/BlogPostListPage.js b/themes/commerce/components/BlogPostListPage.js index 92008f83..c185265c 100644 --- a/themes/commerce/components/BlogPostListPage.js +++ b/themes/commerce/components/BlogPostListPage.js @@ -1,4 +1,4 @@ -import BlogPostCard from './BlogPostCard' +import ProductCard from './ProductCard' import PaginationNumber from './PaginationNumber' import BLOG from '@/blog.config' import BlogPostListEmpty from './BlogPostListEmpty' @@ -22,7 +22,7 @@ const BlogPostListPage = ({ page = 1, posts = [], postCount, siteInfo }) => { {/* 文章列表 */}
{posts?.map(post => ( - + ))}
{showPagination && } diff --git a/themes/commerce/components/BlogPostListScroll.js b/themes/commerce/components/BlogPostListScroll.js index 7646b056..3f0729e9 100644 --- a/themes/commerce/components/BlogPostListScroll.js +++ b/themes/commerce/components/BlogPostListScroll.js @@ -1,5 +1,5 @@ import BLOG from '@/blog.config' -import BlogPostCard from './BlogPostCard' +import ProductCard from './ProductCard' import BlogPostListEmpty from './BlogPostListEmpty' import { useGlobal } from '@/lib/global' import React from 'react' @@ -59,7 +59,7 @@ const BlogPostListScroll = ({ posts = [], currentSearch, showSummary = CONFIG.PO {/* 文章列表 */}
{postsToShow.map(post => ( - + ))}
diff --git a/themes/commerce/components/Footer.js b/themes/commerce/components/Footer.js index d6034985..54689135 100644 --- a/themes/commerce/components/Footer.js +++ b/themes/commerce/components/Footer.js @@ -14,7 +14,7 @@ const Footer = (props) => { const copyrightDate = parseInt(since) < currentYear ? since + '-' + currentYear : currentYear const { categoryOptions, customMenu } = props - return