mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
60 lines
1.6 KiB
JavaScript
60 lines
1.6 KiB
JavaScript
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_HEXO from '../config_hexo'
|
|
import WalineRecentComment from '@/components/WalineRecentsComments'
|
|
import BLOG from '@/blog.config'
|
|
|
|
/**
|
|
* Hexo主题右侧栏
|
|
* @param {*} props
|
|
* @returns
|
|
*/
|
|
export default function SideRight(props) {
|
|
const {
|
|
post, currentCategory, categories, latestPosts, tags,
|
|
currentTag, showCategory, showTag, slot
|
|
} = props
|
|
|
|
return (
|
|
<div className={'space-y-4 lg:w-80 lg:pt-0 px-2 pt-4'}>
|
|
<InfoCard {...props} />
|
|
{CONFIG_HEXO.WIDGET_ANALYTICS && <AnalyticsCard {...props} />}
|
|
|
|
{showCategory && (
|
|
<Card>
|
|
<div className='ml-2 mb-1 font-sans'>
|
|
<i className='fas fa-th' /> 分类
|
|
</div>
|
|
<CategoryGroup
|
|
currentCategory={currentCategory}
|
|
categories={categories}
|
|
/>
|
|
</Card>
|
|
)}
|
|
{showTag && (
|
|
<Card>
|
|
<TagGroups tags={tags} currentTag={currentTag} />
|
|
</Card>
|
|
)}
|
|
{CONFIG_HEXO.WIDGET_LATEST_POSTS && latestPosts && latestPosts.length > 0 && <Card>
|
|
<LatestPostsGroup {...props} />
|
|
</Card>}
|
|
|
|
{BLOG.COMMENT_WALINE_SERVER_URL && <WalineRecentComment/>}
|
|
|
|
<div className='sticky top-20'>
|
|
{post && post.toc && post.toc.length > 1 && <Card>
|
|
<Catalog toc={post.toc} />
|
|
</Card>}
|
|
{slot}
|
|
</div>
|
|
|
|
</div>
|
|
)
|
|
}
|