mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-08 15:10:37 +00:00
gitbook主题深色模式微调
This commit is contained in:
@@ -8,7 +8,7 @@ import NavPostList from './NavPostList'
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
const PageNavDrawer = (props) => {
|
||||
const PageNavDrawer = props => {
|
||||
const { pageNavVisible, changePageNavVisible } = useGitBookGlobal()
|
||||
const { filteredNavPages } = props
|
||||
|
||||
@@ -16,21 +16,29 @@ const PageNavDrawer = (props) => {
|
||||
changePageNavVisible(!pageNavVisible)
|
||||
}
|
||||
|
||||
return <>
|
||||
<div id='gitbook-left-float' className='fixed top-0 left-0 z-40 md:hidden'>
|
||||
{/* 侧边菜单 */}
|
||||
<div
|
||||
className={(pageNavVisible ? 'animate__slideInLeft ' : '-ml-80 animate__slideOutLeft') +
|
||||
' overflow-y-hidden shadow-card w-72 duration-200 fixed left-1 top-16 rounded py-2 bg-white dark:bg-gray-600'}>
|
||||
<div className='dark:text-gray-400 text-gray-600 h-96 overflow-y-scroll p-3'>
|
||||
{/* 所有文章列表 */}
|
||||
<NavPostList filteredNavPages={filteredNavPages} />
|
||||
</div>
|
||||
</div>
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
id='gitbook-left-float'
|
||||
className='fixed top-0 left-0 z-40 md:hidden'>
|
||||
{/* 侧边菜单 */}
|
||||
<div
|
||||
className={`${pageNavVisible ? 'animate__slideInLeft ' : '-ml-80 animate__slideOutLeft'}
|
||||
overflow-y-hidden shadow-card w-72 duration-200 fixed left-1 top-16 rounded py-2 bg-white dark:bg-hexo-black-gray`}>
|
||||
{/* 所有文章列表 */}
|
||||
<div className='dark:text-gray-400 text-gray-600 h-96 overflow-y-scroll p-3'>
|
||||
<NavPostList filteredNavPages={filteredNavPages} />
|
||||
</div>
|
||||
</div>
|
||||
{/* 背景蒙版 */}
|
||||
<div id='left-drawer-background' className={(pageNavVisible ? 'block' : 'hidden') + ' fixed top-0 left-0 z-30 w-full h-full'}
|
||||
onClick={switchVisible} />
|
||||
</div>
|
||||
|
||||
{/* 背景蒙版 */}
|
||||
<div
|
||||
id='left-drawer-background'
|
||||
className={`${pageNavVisible ? 'block' : 'hidden'} fixed top-0 left-0 z-30 w-full h-full`}
|
||||
onClick={switchVisible}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
}
|
||||
export default PageNavDrawer
|
||||
|
||||
Reference in New Issue
Block a user