import { useGlobal } from '@/lib/global' import { formatDateFmt } from '@/lib/utils/formatDate' import Link from 'next/link' /** * 文章页脚 * @param {*} props * @returns */ export default function ArticleFooter(props) { const { post } = props const { locale } = useGlobal() return ( <> {/* 分类和标签部分 */}
{/* 分类标签(如果文章不是“页面”类型) */} {post?.type !== 'Page' && ( <> {post?.category} )} {/* 标签部分(若文章有标签) */}
{post?.tags?.length > 0 && ( <> {locale.COMMON.TAGS} : )} {/* 显示所有标签 */} {post?.tags?.map(tag => { return ( {tag} ) })}
{/* 发布日期信息 */} {/* 将发布日期移至文章底部并设置样式 */}
{post?.publishDay}
) }