diff --git a/themes/gitbook/components/TocDrawer.js b/themes/gitbook/components/TocDrawer.js
deleted file mode 100644
index 7b07044a..00000000
--- a/themes/gitbook/components/TocDrawer.js
+++ /dev/null
@@ -1,34 +0,0 @@
-import { useGitBookGlobal } from '@/themes/gitbook'
-import Catalog from './Catalog'
-
-/**
- * 悬浮抽屉目录
- * @param toc
- * @param post
- * @returns {JSX.Element}
- * @constructor
- */
-const TocDrawer = ({ post, cRef }) => {
- const { tocVisible, changeTocVisible } = useGitBookGlobal()
- const switchVisible = () => {
- changeTocVisible(!tocVisible)
- }
- return <>
-
- >
-}
-export default TocDrawer
diff --git a/themes/gitbook/index.js b/themes/gitbook/index.js
index 34c4f05d..9fe1682e 100644
--- a/themes/gitbook/index.js
+++ b/themes/gitbook/index.js
@@ -20,18 +20,19 @@ import ArticleInfo from './components/ArticleInfo'
import { ArticleLock } from './components/ArticleLock'
import BlogArchiveItem from './components/BlogArchiveItem'
import Catalog from './components/Catalog'
+import CatalogDrawerWrapper from './components/CatalogDrawerWrapper'
import CategoryItem from './components/CategoryItem'
-import FloatTocButton from './components/FloatTocButton'
import Footer from './components/Footer'
import Header from './components/Header'
import InfoCard from './components/InfoCard'
import JumpToTopButton from './components/JumpToTopButton'
+import MobileButtonCatalog from './components/MobileButtonCatalog'
+import MobileButtonPageNav from './components/MobileButtonPageNav'
import NavPostList from './components/NavPostList'
import PageNavDrawer from './components/PageNavDrawer'
import RevolverMaps from './components/RevolverMaps'
import SearchInput from './components/SearchInput'
import TagItemMini from './components/TagItemMini'
-import TocDrawer from './components/TocDrawer'
import CONFIG from './config'
import { Style } from './style'
@@ -211,6 +212,7 @@ const LayoutBase = props => {
+ {/* 桌面端目录 */}
{slotRight}
{router.route === '/' && (
@@ -235,12 +237,17 @@ const LayoutBase = props => {
)}
- {/* 移动端悬浮目录按钮 */}
- {showTocButton && !tocVisible && (
-
-
+ {/* 移动端底部按钮 */}
+
+
+
- )}
+ {showTocButton && (
+
+
+
+ )}
+
{/* 移动端导航抽屉 */}
@@ -366,7 +373,8 @@ const LayoutSlug = props => {
)}
-
+ {/* 文章目录 */}
+
)}
>
diff --git a/themes/gitbook/style.js b/themes/gitbook/style.js
index 5e8eaa5a..904da2a7 100644
--- a/themes/gitbook/style.js
+++ b/themes/gitbook/style.js
@@ -5,14 +5,18 @@
* @returns
*/
const Style = () => {
- return
+ .bottom-button-group {
+ box-shadow: 0px -3px 10px 0px rgba(0, 0, 0, 0.1);
+ }
+ `}
+ )
}
export { Style }
diff --git a/themes/nav/components/FloatButtonCatalog.js b/themes/nav/components/FloatButtonCatalog.js
new file mode 100644
index 00000000..753451da
--- /dev/null
+++ b/themes/nav/components/FloatButtonCatalog.js
@@ -0,0 +1,27 @@
+import { useNavGlobal } from '@/themes/nav'
+
+/**
+ * 移动端悬浮目录按钮
+ */
+export default function FloatButtonCatalog() {
+ const { tocVisible, changeTocVisible } = useNavGlobal()
+
+ const toggleToc = () => {
+ changeTocVisible(!tocVisible)
+ }
+
+ return (
+
+ )
+}
diff --git a/themes/nav/components/FloatTocButton.js b/themes/nav/components/FloatTocButton.js
deleted file mode 100755
index d4ff317d..00000000
--- a/themes/nav/components/FloatTocButton.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { useNavGlobal } from '@/themes/nav'
-
-/**
- * 移动端悬浮目录按钮
- */
-export default function FloatTocButton () {
- const { tocVisible, changeTocVisible } = useNavGlobal()
-
- const toggleToc = () => {
- changeTocVisible(!tocVisible)
- }
-
- return (
-
- )
-}
diff --git a/themes/nav/index.js b/themes/nav/index.js
index 54cea4b8..4a9bd724 100755
--- a/themes/nav/index.js
+++ b/themes/nav/index.js
@@ -25,7 +25,7 @@ import BlogArchiveItem from './components/BlogArchiveItem'
import BlogPostCard from './components/BlogPostCard'
import BlogPostListAll from './components/BlogPostListAll'
import CategoryItem from './components/CategoryItem'
-import FloatTocButton from './components/FloatTocButton'
+import FloatButtonCatalog from './components/FloatButtonCatalog'
import Footer from './components/Footer'
import JumpToTopButton from './components/JumpToTopButton'
import LogoBar from './components/LogoBar'
@@ -187,7 +187,7 @@ const LayoutBase = props => {
{/* 移动端悬浮目录按钮 */}
{showTocButton && !tocVisible && (
-
+
)}