mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 07:26:50 +00:00
starter主题新增lite模式,隐藏页头页脚便于嵌入
This commit is contained in:
@@ -31,6 +31,7 @@ export function GlobalContextProvider(props) {
|
||||
) // 默认语言
|
||||
const [theme, setTheme] = useState(NOTION_CONFIG?.THEME || THEME) // 默认博客主题
|
||||
const [THEME_CONFIG, SET_THEME_CONFIG] = useState(null) // 主题配置
|
||||
const [isLiteMode,setLiteMode] = useState(false)
|
||||
|
||||
const defaultDarkMode = NOTION_CONFIG?.APPEARANCE || APPEARANCE
|
||||
const [isDarkMode, updateDarkMode] = useState(defaultDarkMode === 'dark') // 默认深色模式
|
||||
@@ -107,6 +108,9 @@ export function GlobalContextProvider(props) {
|
||||
const newUrl = `${url}${url.includes('?') ? '&' : '?'}theme=${themeStr}`
|
||||
router.push(newUrl)
|
||||
}
|
||||
if (router.query.lite && router.query.lite==='true') {
|
||||
setLiteMode(true)
|
||||
}
|
||||
if (!onLoading) {
|
||||
setOnLoading(true)
|
||||
}
|
||||
@@ -134,6 +138,7 @@ export function GlobalContextProvider(props) {
|
||||
return (
|
||||
<GlobalContext.Provider
|
||||
value={{
|
||||
isLiteMode,
|
||||
isLoaded,
|
||||
isSignedIn,
|
||||
user,
|
||||
|
||||
Reference in New Issue
Block a user