import { HashTag } from '@/components/HeroIcons' import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import WordCount from '@/components/WordCount' import { siteConfig } from '@/lib/config' import { formatDateFmt } from '@/lib/utils/formatDate' import Link from 'next/link' import WavesArea from './WavesArea' /** * 文章页头 * @param {*} param0 * @returns */ export default function PostHeader({ post, siteInfo, isDarkMode }) { if (!post) { return <> } // 文章头图 const headerImage = post?.pageCover ? post.pageCover : siteInfo?.pageCover const ANALYTICS_BUSUANZI_ENABLE = siteConfig('ANALYTICS_BUSUANZI_ENABLE') return (
{/* 文章背景图 */}
{/* 文章文字描述 */}
{/* 分类+标签 */}
{post.category && ( <>
{post.category}
)} {post.tagItems && (
{post.tagItems.map((tag, index) => (
{' '} {tag.name + (tag.count ? `(${tag.count})` : '')}{' '}
))}
)}
{/* 文章Title */}
{siteConfig('POST_TITLE_ICON') && ( )} {post.title}
{/* 标题底部补充信息 */}
{post?.type !== 'Page' && ( <> {' '} {post?.publishDay} )}
{' '} {post.lastEditedDay}
{/* 阅读统计 */} {ANALYTICS_BUSUANZI_ENABLE && (
{' '}
)}
) }