压缩封面图

This commit is contained in:
tangly1024
2023-06-18 11:12:54 +08:00
parent 2cd67c1d82
commit 437f969115
17 changed files with 69 additions and 69 deletions

View File

@@ -9,10 +9,10 @@ import TwikooCommentCount from '@/components/TwikooCommentCount'
const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
const showPreview = CONFIG_MATERY.POST_LIST_PREVIEW && post.blockMap
// matery 主题默认强制显示图片
if (post && !post.page_cover) {
post.page_cover = siteInfo?.pageCover
if (post && !post.pageCoverThumbnail) {
post.pageCoverThumbnail = siteInfo?.pageCover
}
const showPageCover = CONFIG_MATERY.POST_LIST_COVER && post?.page_cover
const showPageCover = CONFIG_MATERY.POST_LIST_COVER && post?.pageCoverThumbnail
const delay = (index % 3) * 300
return (
<div
@@ -33,7 +33,7 @@ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => {
className="flex flex-grow w-full relative duration-200 bg-black rounded-t-md cursor-pointer transform overflow-hidden">
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={post?.page_cover}
src={post?.pageCoverThumbnail}
alt={post.title}
className="opacity-50 h-full w-full hover:scale-125 rounded-t-md transform object-cover duration-500"
/>