import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { formatDateFmt } from '@/lib/utils/formatDate' import Link from 'next/link' import CONFIG from '../config' import TagItemMini from './TagItemMini' /** * 博客列表:文章卡牌 * @param {*} param0 * @returns */ const BlogPostCard = ({ index, post, showSummary, siteInfo }) => { const showPreview = siteConfig('MATERY_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap // matery 主题默认强制显示图片 if (post && !post.pageCoverThumbnail) { post.pageCoverThumbnail = siteInfo?.pageCover } const showPageCover = siteConfig('MATERY_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail const delay = (index % 3) * 300 return (
{/* 固定高度 ,空白用图片拉升填充 */}
{/* 头部图片 填充卡片 */} {showPageCover && (

{siteConfig('POST_TITLE_ICON') && ( )} {post.title}

{/* 放在图片的阴影遮罩,便于突出文字 */}
)} {/* 文字描述 */}
{/* 描述 */}
{(!showPreview || showSummary) && post.summary && (

{post.summary}

)}
{post.date?.start_date || post.lastEditedDay}
{post.category}
{post?.tagItems && post?.tagItems.length > 0 && ( <>
{' '} {post.tagItems.map(tag => ( ))}
)}
) } export default BlogPostCard