import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import Link from 'next/link' import CONFIG from '../config' import TagItemMini from './TagItemMini' /** * 文章列表卡片 * @param {*} param0 * @returns */ const BlogCard = ({ index, post, showSummary, siteInfo }) => { const showPreview = siteConfig('FUKASAWA_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap // fukasawa 强制显示图片 if ( siteConfig('FUKASAWA_POST_LIST_COVER_FORCE', null, CONFIG) && post && !post.pageCover ) { post.pageCoverThumbnail = siteInfo?.pageCover } const showPageCover = siteConfig('FUKASAWA_POST_LIST_COVER', null, CONFIG) && post?.pageCoverThumbnail const FUKASAWA_POST_LIST_ANIMATION = siteConfig( 'FUKASAWA_POST_LIST_ANIMATION', null, CONFIG ) // 动画样式 首屏卡片不用,后面翻出来的加动画 const aosProps = FUKASAWA_POST_LIST_ANIMATION ? { 'data-aos': 'fade-up', 'data-aos-duration': '300', 'data-aos-once': 'true', 'data-aos-anchor-placement': 'top-bottom' } : {} return (
{/* 封面图 */} {showPageCover && (
)} {/* 文字部分 */}

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

{(!showPreview || showSummary) && (
{post.summary}
)} {/* 分类标签 */}
{post.category && ( {post.category} )}
{post.tagItems?.map(tag => ( ))}
) } export default BlogCard