gittbook 样式优化

This commit is contained in:
tangly1024
2023-06-24 19:39:56 +08:00
parent 449c33d824
commit ea76e94463
3 changed files with 6 additions and 6 deletions

View File

@@ -81,8 +81,8 @@ const LayoutBase = (props) => {
data-aos-duration="300"
data-aos-once="false"
data-aos-anchor-placement="top-center"
className='fixed xl:right-80 right-2 mr-10 bottom-24 hidden lg:block z-20'>
<i className='fas fa-chevron-up cursor-pointer p-2 rounded-full border' onClick={() => { window.scrollTo({ top: 0, behavior: 'smooth' }) }} />
className='fixed xl:right-80 right-2 mr-10 bottom-24 hidden lg:block z-20 '>
<i className='fas fa-chevron-up cursor-pointer p-2 rounded-full border bg-white dark:bg-black dark:border-gray-800' onClick={() => { window.scrollTo({ top: 0, behavior: 'smooth' }) }} />
</div>
</div>
@@ -112,7 +112,7 @@ const LayoutBase = (props) => {
</main>
{showTocButton && !tocVisible && <div className='fixed right-0 bottom-52 z-30 bg-white border-l border-t border-b rounded'>
{showTocButton && !tocVisible && <div className='fixed right-0 bottom-52 z-30 bg-white border-l border-t border-b dark:border-gray-800 rounded'>
<FloatTocButton {...props}/>
</div>}

View File

@@ -10,7 +10,7 @@ export default function FloatTocButton () {
return (
<div
onClick={toggleToc}
className={ 'text-black dark:border-gray-500 flex justify-center items-center dark:text-gray-200 py-2 px-2'
className={ 'text-black flex justify-center items-center dark:text-gray-200 dark:bg-hexo-black-gray py-2 px-2'
}
>
<a

View File

@@ -14,11 +14,11 @@ const TocDrawer = ({ post, cRef }) => {
changeTocVisible(!tocVisible)
}
return <>
<div id='medium-toc-float' className='fixed top-0 right-0 z-40'>
<div id='gitbook-toc-float' className='fixed top-0 right-0 z-40'>
{/* 侧边菜单 */}
<div
className={(tocVisible ? 'animate__slideInRight ' : ' -mr-72 animate__slideOutRight') +
' overflow-y-hidden shadow-card w-60 duration-200 fixed right-1 bottom-16 rounded py-2 bg-white dark:bg-gray-600'}>
' overflow-y-hidden shadow-card w-60 duration-200 fixed right-1 bottom-16 rounded py-2 bg-white dark:bg-gray-900'}>
{post && <>
<div className='dark:text-gray-400 text-gray-600 h-56 p-3'>
<Catalog post={post}/>