theme-gitbook

This commit is contained in:
tangly1024.com
2023-07-04 18:17:33 +08:00
parent 900d1c847b
commit 77c13a4448
24 changed files with 280 additions and 468 deletions

View File

@@ -1,10 +1,10 @@
import Link from 'next/link'
import React from 'react'
import { useGitBookGlobal } from '../LayoutBase'
import { useMediumGlobal } from '../LayoutBase'
import JumpToTopButton from './JumpToTopButton'
export default function BottomMenuBar ({ post, className }) {
const { tocVisible, changeTocVisible } = useGitBookGlobal()
const { tocVisible, changeTocVisible } = useMediumGlobal()
const showTocBotton = post?.toc?.length > 0
const toggleToc = () => {

View File

@@ -1,5 +1,5 @@
import Catalog from './Catalog'
import { useGitBookGlobal } from '../LayoutBase'
import { useMediumGlobal } from '../LayoutBase'
/**
* 悬浮抽屉目录
@@ -9,7 +9,7 @@ import { useGitBookGlobal } from '../LayoutBase'
* @constructor
*/
const TocDrawer = ({ post, cRef }) => {
const { tocVisible, changeTocVisible } = useGitBookGlobal()
const { tocVisible, changeTocVisible } = useMediumGlobal()
const switchVisible = () => {
changeTocVisible(!tocVisible)
}