forked from tangly1024/NotionNext
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96d5e2e
commit c33ec22
Showing
11 changed files
with
171 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
import { useGitBookGlobal } from '@/themes/gitbook' | ||
import JumpToTopButton from './JumpToTopButton' | ||
import MobileButtonCatalog from './MobileButtonCatalog' | ||
import MobileButtonPageNav from './MobileButtonPageNav' | ||
|
||
/** | ||
* 移动端底部导航 | ||
* @param {*} param0 | ||
* @returns | ||
*/ | ||
export default function BottomMenuBar({ post, className }) { | ||
const { pageNavVisible, changePageNavVisible } = useGitBookGlobal() | ||
|
||
const togglePageNavVisible = () => { | ||
changePageNavVisible(!pageNavVisible) | ||
} | ||
const showTocButton = post?.toc?.length > 1 | ||
|
||
return ( | ||
<div className={'sticky z-10 bottom-0 w-full h-12 bg-white dark:bg-hexo-black-gray ' + className}> | ||
<div className='flex justify-between h-full shadow-card'> | ||
<div onClick={togglePageNavVisible} className='flex w-full items-center justify-center cursor-pointer'> | ||
<i className="fa-solid fa-book"></i> | ||
</div> | ||
<div className='flex w-full items-center justify-center cursor-pointer'> | ||
<JumpToTopButton /> | ||
</div> | ||
</div> | ||
<> | ||
{/* 移动端底部导航按钮 */} | ||
<div className='bottom-button-group md:hidden w-screen h-14 px-4 fixed flex items-center justify-between right-left bottom-0 z-30 bg-white border-t dark:border-gray-800'> | ||
<div className='w-full'> | ||
<MobileButtonPageNav /> | ||
</div> | ||
{showTocButton && ( | ||
<div className='w-full'> | ||
<MobileButtonCatalog /> | ||
</div> | ||
)} | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.