Skip to content

Commit

Permalink
gitbook 主题添加loadingcover
Browse files Browse the repository at this point in the history
  • Loading branch information
tangly1024 committed Sep 4, 2024
1 parent 57160f3 commit 6c4dd0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions themes/gitbook/components/LoadingCover.js

This file was deleted.

8 changes: 8 additions & 0 deletions themes/gitbook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import Comment from '@/components/Comment'
import { AdSlot } from '@/components/GoogleAdsense'
import Live2D from '@/components/Live2D'
import LoadingCover from '@/components/LoadingCover'
import NotionIcon from '@/components/NotionIcon'
import NotionPage from '@/components/NotionPage'
import ShareBar from '@/components/ShareBar'
Expand Down Expand Up @@ -113,6 +114,11 @@ const LayoutBase = props => {
setFilteredNavPages(getNavPagesWithLatest(allNavPages, latestPosts, post))
}, [router])

const GITBOOK_LOADING_COVER = siteConfig(
'GITBOOK_LOADING_COVER',
true,
CONFIG
)
return (
<ThemeGlobalGitbook.Provider
value={{
Expand Down Expand Up @@ -237,6 +243,8 @@ const LayoutBase = props => {
)}
</main>

{GITBOOK_LOADING_COVER && <LoadingCover />}

{/* 移动端导航抽屉 */}
<PageNavDrawer {...props} filteredNavPages={filteredNavPages} />

Expand Down

0 comments on commit 6c4dd0c

Please sign in to comment.