import LayoutBase from './LayoutBase' import { useGlobal } from '@/lib/global' import React from 'react' import Catalog from './components/Catalog' import { ArticleLock } from './components/ArticleLock' import formatDate from '@/lib/formatDate' import BLOG from '@/blog.config' import Link from 'next/link' import NotionPage from '@/components/NotionPage' import CONFIG_MEDIUM from './config_medium' import Comment from '@/components/Comment' import ArticleAround from './components/ArticleAround' import TocDrawer from './components/TocDrawer' import CategoryItem from './components/CategoryItem' import TagItemMini from './components/TagItemMini' export const LayoutSlug = props => { const { post, prev, next, siteInfo, lock, validPassword } = props const { locale } = useGlobal() const date = formatDate( post?.date?.start_date || post?.createdTime, locale.LOCALE ) if (!post) { return } const slotRight = post?.toc && post?.toc?.length > 3 && (
{/* */}
) return ( {/* 文章锁 */} {lock && } {!lock &&
{/* title */}

{post?.title}

{/* meta */}
{date} | {post.lastEditedTime}
{/* eslint-disable-next-line @next/next/no-img-element */} {BLOG.AUTHOR}
{BLOG.AUTHOR}
{/* Notion文章主体 */}
{post && ()}
{/* 文章内嵌广告 */}
{CONFIG_MEDIUM.POST_DETAIL_CATEGORY && post.category && }
{CONFIG_MEDIUM.POST_DETAIL_TAG && post?.tagItems?.map(tag => )}
{post.type === 'Post' && }
}
) }