import BlogAround from './BlogAround' import Comment from '@/components/Comment' import RecommendPosts from './RecommendPosts' import ShareBar from '@/components/ShareBar' import TagItem from './TagItem' import { useGlobal } from '@/lib/global' import Link from 'next/link' import { useRouter } from 'next/router' import ArticleCopyright from './ArticleCopyright' import WordCount from './WordCount' import NotionPage from '@/components/NotionPage' import CONFIG from '../config' import NotionIcon from '@/components/NotionIcon' import LazyImage from '@/components/LazyImage' import { formatDateFmt } from '@/lib/formatDate' import { siteConfig } from '@/lib/config' import WWAds from '@/components/WWAds' /** * * @param {*} param0 * @returns */ export default function ArticleDetail(props) { const { post, recommendPosts, prev, next } = props const url = siteConfig('LINK') + useRouter().asPath const { locale } = useGlobal() const showArticleInfo = siteConfig('NEXT_ARTICLE_INFO', null, CONFIG) // 动画样式 首屏卡片不用,后面翻出来的加动画 const aosProps = { 'data-aos': 'fade-down', 'data-aos-duration': '400', 'data-aos-once': 'true', 'data-aos-anchor-placement': 'top-bottom' } return (
{showArticleInfo &&
{/* 头图 */} {siteConfig('NEXT_POST_HEADER_IMAGE_VISIBLE', null, CONFIG) && post?.type && !post?.type !== 'Page' && post?.pageCover && (
)} {/* title */}
{post.title}
{/* meta */}
{post?.type !== 'Page' && (<>
{post?.publishDay}
| {post.lastEditedDay}
)}
} {/* Notion内容主体 */}
{post && ()}
{showArticleInfo && <> {/* 分享 */} {/* 版权声明 */} {post?.type === 'Post' && } {/* 推荐文章 */} {post?.type === 'Post' && }
{/* 分类 */} {post.category && <> } {/* 标签列表 */} {post?.type === 'Post' && ( <> {post.tagItems && (
{locale.COMMON.TAGS}: 
{post.tagItems.map(tag => ( ))}
)} )}
{post?.type === 'Post' && } } {/* 评论互动 */}
) }