File size: 2,055 Bytes
1b72d7e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import Card from './Card'
import TagGroups from './TagGroups'
import Catalog from './Catalog'
import { InfoCard } from './InfoCard'
import dynamic from 'next/dynamic'
import Live2D from '@/components/Live2D'
import { AnalyticsCard } from './AnalyticsCard'
import TouchMeCard from './TouchMeCard'
import LatestPostsGroupMini from './LatestPostsGroupMini'

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, tagOptions,
    currentTag, rightAreaSlot
  } = props

  return (
        <div id='sideRight' className='hidden xl:block w-72 space-y-4 h-full'>

            <InfoCard {...props} className='w-72' />

            <div className='sticky top-20 space-y-4'>

                {/* 文章页显示目录 */}
                {post && post.toc && post.toc.length > 0 && (
                    <Card className='bg-white dark:bg-[#1e1e1e]'>
                        <Catalog toc={post.toc} />
                    </Card>
                )}

                {/* 联系交流群 */}
                <TouchMeCard />

                {/* 最新文章列表 */}
                <div className={'border dark:border-gray-700 dark:bg-[#1e1e1e] dark:text-white rounded-xl lg:p-6 p-4 hidden lg:block bg-white'}>
                    <LatestPostsGroupMini {...props} />
                </div>

                {rightAreaSlot}

                <FaceBookPage />
                <Live2D />

                {/* 标签和成绩 */}
                <Card className={'bg-white dark:bg-[#1e1e1e] dark:text-white'}>
                    <TagGroups tags={tagOptions} currentTag={currentTag} />
                    <hr className='mx-1 flex border-dashed relative my-4' />
                    <AnalyticsCard {...props} />
                </Card>
            </div>

        </div>
  )
}