import Card from './Card' import CategoryGroup from './CategoryGroup' import LatestPostsGroup from './LatestPostsGroup' import TagGroups from './TagGroups' import Catalog from './Catalog' import { InfoCard } from './InfoCard' import { AnalyticsCard } from './AnalyticsCard' import CONFIG from '../config' import dynamic from 'next/dynamic' import Announcement from './Announcement' import { useGlobal } from '@/lib/global' import Live2D from '@/components/Live2D' import { siteConfig } from '@/lib/config' const HexoRecentComments = dynamic(() => import('./HexoRecentComments')) const FaceBookPage = dynamic( () => { let facebook = <> try { facebook = import('@/components/FacebookPage') } catch (err) { console.error(err) } return facebook }, { ssr: false } ) /** * Hexo主题右侧栏 * @param {*} props * @returns */ export default function SideRight(props) { const { post, currentCategory, categories, latestPosts, tags, currentTag, showCategory, showTag, rightAreaSlot, notice, className } = props const { locale } = useGlobal() // 文章全屏处理 if (post && post?.fullWidth) { return null } return (
{siteConfig('HEXO_WIDGET_ANALYTICS', null, CONFIG) && } {showCategory && (
{locale.COMMON.CATEGORY}
)} {showTag && ( )} {siteConfig('HEXO_WIDGET_LATEST_POSTS', null, CONFIG) && latestPosts && latestPosts.length > 0 && } {siteConfig('COMMENT_WALINE_SERVER_URL') && siteConfig('COMMENT_WALINE_RECENT') && }
{post && post.toc && post.toc.length > 1 && } {rightAreaSlot}
) }