This commit is contained in:
tangly1024
2021-09-27 09:33:21 +08:00
parent 22ca7f6d63
commit dfc0f645d4
76 changed files with 3650 additions and 2 deletions

14
components/RightAside.js Normal file
View File

@@ -0,0 +1,14 @@
import React from 'react'
import Toc from '@/components/Toc'
const RightAside = ({ toc }) => {
// 无目录就直接返回空
if (toc.length < 1) return <></>
return <aside className='bg-gray-800 px-5 hidden lg:block py-5 hover:shadow-2xl duration-200'>
<div className='sticky top-8 w-60 overflow-x-auto'>
<Toc toc={toc}/>
</div>
</aside>
}
export default RightAside