import { useRef } from 'react' import { ArticleLock } from './components/ArticleLock' import HeaderArticle from './components/HeaderArticle' import JumpToCommentButton from './components/JumpToCommentButton' import TocDrawer from './components/TocDrawer' import TocDrawerButton from './components/TocDrawerButton' import LayoutBase from './LayoutBase' import Comment from '@/components/Comment' import NotionPage from '@/components/NotionPage' import ArticleAdjacent from './components/ArticleAdjacent' import ArticleCopyright from './components/ArticleCopyright' import ArticleRecommend from './components/ArticleRecommend' import { isBrowser } from '@/lib/utils' export const LayoutSlug = props => { const { post, lock, validPassword } = props const drawerRight = useRef(null) if (!post) { return } {...props} showCategory={false} showTag={false} > } const targetRef = isBrowser() ? document.getElementById('container') : null const floatSlot = <> {post?.toc?.length > 1 &&
{ drawerRight?.current?.handleSwitchVisible() }} />
} return ( } {...props} showCategory={false} showTag={false} floatSlot={floatSlot} >
{lock && } {!lock &&
{/* Notion文章主体 */}
{post && }
{/* 文章内嵌广告 */}
{post.type === 'Post' && } {post.type === 'Post' && } {post.type === 'Post' && }

{/* 评论互动 */}
}
) }