import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import CONFIG from '../config' /** * 标题栏 */ export default function TitleBar(props) { const { post } = props const { fullWidth, siteInfo } = useGlobal() const title = post?.title || siteConfig('TITLE') const description = post?.description || siteConfig('AUTHOR') const headerImage = post?.pageCoverThumbnail ? post.pageCoverThumbnail : siteInfo?.pageCover const TITLE_BG = siteConfig('EXAMPLE_TITLE_IMAGE', false, CONFIG) return ( <> {/* 标题栏 */} {!fullWidth && (

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

{description}

{TITLE_BG && ( <> {/* eslint-disable-next-line @next/next/no-img-element */} )}
)} ) }