gitbook 布局交互优化

This commit is contained in:
tangly1024.com
2024-06-03 18:02:23 +08:00
parent 1f5b77406a
commit 71106860bd
14 changed files with 195 additions and 124 deletions

View File

@@ -0,0 +1,27 @@
import { useNavGlobal } from '@/themes/nav'
/**
* 移动端悬浮目录按钮
*/
export default function FloatButtonCatalog() {
const { tocVisible, changeTocVisible } = useNavGlobal()
const toggleToc = () => {
changeTocVisible(!tocVisible)
}
return (
<div
onClick={toggleToc}
className={
'text-black flex justify-center items-center dark:text-gray-200 dark:bg-hexo-black-gray py-2 px-2'
}>
<a
id='toc-button'
className={
'fa-list-ol cursor-pointer fas hover:scale-150 transform duration-200'
}
/>
</div>
)
}

View File

@@ -1,25 +0,0 @@
import { useNavGlobal } from '@/themes/nav'
/**
* 移动端悬浮目录按钮
*/
export default function FloatTocButton () {
const { tocVisible, changeTocVisible } = useNavGlobal()
const toggleToc = () => {
changeTocVisible(!tocVisible)
}
return (
<div
onClick={toggleToc}
className={ 'text-black flex justify-center items-center dark:text-gray-200 dark:bg-hexo-black-gray py-2 px-2'
}
>
<a
id="toc-button"
className={'fa-list-ol cursor-pointer fas hover:scale-150 transform duration-200'}
/>
</div>
)
}