This commit is contained in:
tangly1024
2023-07-30 11:52:14 +08:00
parent 1353acf8c7
commit d1dfd32af2
11 changed files with 37 additions and 14 deletions

View File

@@ -30,6 +30,7 @@ import NotionPage from '@/components/NotionPage'
import { ArticleLock } from './components/ArticleLock'
import { Transition } from '@headlessui/react'
import { Style } from './style'
import CommonHead from '@/components/CommonHead'
// 主题全局变量
const ThemeGlobalGitbook = createContext()
@@ -42,7 +43,7 @@ export const useGitBookGlobal = () => useContext(ThemeGlobalGitbook)
* @constructor
*/
const LayoutBase = (props) => {
const { children, post, allNavPages, slotLeft, slotRight, slotTop } = props
const { children, post, allNavPages, slotLeft, slotRight, slotTop, meta } = props
const { onLoading } = useGlobal()
const router = useRouter()
const [tocVisible, changeTocVisible] = useState(false)
@@ -58,6 +59,7 @@ const LayoutBase = (props) => {
return (
<ThemeGlobalGitbook.Provider value={{ tocVisible, changeTocVisible, filteredNavPages, setFilteredNavPages, allNavPages, pageNavVisible, changePageNavVisible }}>
<CommonHead meta={meta}/>
<Style/>
<div id='theme-gitbook' className='bg-white dark:bg-hexo-black-gray w-full h-full min-h-screen justify-center dark:text-gray-300'>