mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 15:09:40 +00:00
夜间模式适配
This commit is contained in:
@@ -3,6 +3,8 @@ import React, { useCallback, useEffect } from 'react'
|
||||
import CommonHead from '@/components/CommonHead'
|
||||
import TopNav from '@/components/TopNav'
|
||||
import throttle from 'lodash.throttle'
|
||||
import BLOG from '@/blog.config'
|
||||
import { useTheme } from '@/lib/theme'
|
||||
|
||||
const Container = ({ children, layout, fullWidth, tags, meta, ...customMeta }) => {
|
||||
let windowTop = 0
|
||||
@@ -28,12 +30,13 @@ const Container = ({ children, layout, fullWidth, tags, meta, ...customMeta }) =
|
||||
window.removeEventListener('scroll', scrollTrigger)
|
||||
}
|
||||
})
|
||||
const { theme } = useTheme()
|
||||
return (
|
||||
<>
|
||||
<div className={[BLOG.font, theme].join(' ')}>
|
||||
<CommonHead meta={meta} />
|
||||
<TopNav tags={tags}/>
|
||||
{children}
|
||||
</>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user