From f28f4a39efaed6290781d4a0d88411d230deca5b Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 24 Jun 2023 12:39:48 +0800 Subject: [PATCH] mobile-darkmode --- themes/gitbook/LayoutIndex.js | 2 +- themes/gitbook/components/PageNavDrawer.js | 1 - themes/gitbook/components/TopNavBar.js | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/themes/gitbook/LayoutIndex.js b/themes/gitbook/LayoutIndex.js index 01cd5942..e259a80a 100644 --- a/themes/gitbook/LayoutIndex.js +++ b/themes/gitbook/LayoutIndex.js @@ -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') diff --git a/themes/gitbook/components/PageNavDrawer.js b/themes/gitbook/components/PageNavDrawer.js index ca0c2452..062629cc 100644 --- a/themes/gitbook/components/PageNavDrawer.js +++ b/themes/gitbook/components/PageNavDrawer.js @@ -14,7 +14,6 @@ const PageNavDrawer = ({ post, cRef }) => { changePageNavVisible(!pageNavVisible) } - console.log('page', pageNavVisible) return <>
{/* 侧边菜单 */} diff --git a/themes/gitbook/components/TopNavBar.js b/themes/gitbook/components/TopNavBar.js index 2e6d38c1..c683e880 100644 --- a/themes/gitbook/components/TopNavBar.js +++ b/themes/gitbook/components/TopNavBar.js @@ -43,7 +43,7 @@ export default function TopNavBar(props) { } return ( -
+
{/* 移动端折叠菜单 */} @@ -60,6 +60,8 @@ export default function TopNavBar(props) { {/* 折叠按钮、仅移动端显示 */}
+ +
{isOpen ? : }
@@ -67,7 +69,7 @@ export default function TopNavBar(props) { {/* 桌面端顶部菜单 */}
- {links && links?.map(link => )} + {links && links?.map(link => )}