import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import Link from 'next/link' import CONFIG from '../config' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' /** * 置顶头条文章 * @param {*} param0 * @returns */ const BlogPostCardTop = ({ post, showSummary }) => { const showPreview = siteConfig('MEDIUM_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap const { locale } = useGlobal() return (
{siteConfig('MEDIUM_POST_LIST_COVER', null, CONFIG) && (
)}
{siteConfig('MEDIUM_POST_LIST_CATEGORY', null, CONFIG) && ( )}
{siteConfig('MEDIUM_POST_LIST_TAG', null, CONFIG) && post?.tagItems?.map(tag => ( ))}

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

{(!showPreview || showSummary) && (
{post.summary}
)} {showPreview && (
{locale.COMMON.ARTICLE_DETAIL}
)}
{post.date?.start_date}
) } export default BlogPostCardTop