mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
mobile-darkmode
This commit is contained in:
@@ -13,7 +13,7 @@ export const LayoutIndex = (props) => {
|
||||
// 直接显示指定页面
|
||||
useEffect(() => {
|
||||
router.push(CONFIG_GITBOOK.INDEX_PAGE).then(() => {
|
||||
console.log('跳转到指定首页', CONFIG_GITBOOK.INDEX_PAGE)
|
||||
// console.log('跳转到指定首页', CONFIG_GITBOOK.INDEX_PAGE)
|
||||
setTimeout(() => {
|
||||
if (isBrowser()) {
|
||||
const article = document.getElementById('notion-article')
|
||||
|
||||
@@ -14,7 +14,6 @@ const PageNavDrawer = ({ post, cRef }) => {
|
||||
changePageNavVisible(!pageNavVisible)
|
||||
}
|
||||
|
||||
console.log('page', pageNavVisible)
|
||||
return <>
|
||||
<div id='gitbook-left-float' className='fixed top-0 left-0 z-40'>
|
||||
{/* 侧边菜单 */}
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function TopNavBar(props) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div id='top-nav' className={'fixed top-0 w-full z-40 ' + className}>
|
||||
<div id='top-nav' className={'fixed top-0 w-full z-40 ' + className}>
|
||||
|
||||
{/* 移动端折叠菜单 */}
|
||||
<Collapse type='vertical' collapseRef={collapseRef} isOpen={isOpen} className='md:hidden'>
|
||||
@@ -60,6 +60,8 @@ export default function TopNavBar(props) {
|
||||
|
||||
{/* 折叠按钮、仅移动端显示 */}
|
||||
<div className='mr-1 flex md:hidden justify-end items-center text-sm space-x-4 font-serif dark:text-gray-200'>
|
||||
<DarkModeButton className='text-sm flex items-center h-full' />
|
||||
|
||||
<div onClick={toggleMenuOpen} className='cursor-pointer'>
|
||||
{isOpen ? <i className='fas fa-times' /> : <i className='fas fa-bars' />}
|
||||
</div>
|
||||
@@ -67,7 +69,7 @@ export default function TopNavBar(props) {
|
||||
|
||||
{/* 桌面端顶部菜单 */}
|
||||
<div className='hidden md:flex'>
|
||||
{links && links?.map(link => <MenuItemDrop key={link?.id} link={link}/>)}
|
||||
{links && links?.map(link => <MenuItemDrop key={link?.id} link={link} />)}
|
||||
<DarkModeButton className='text-sm flex items-center h-full' />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user