夜间模式适配,移除react-canvas-nest,CPU消耗有点高

This commit is contained in:
tangly1024
2021-11-01 14:48:52 +08:00
parent 2412bc65f9
commit 6562b6a341
6 changed files with 23 additions and 27 deletions

View File

@@ -8,7 +8,6 @@ import TopNav from '@/components/TopNav'
import Footer from '@/components/Footer'
import SideBar from '@/components/SideBar'
import JumpToTop from '@/components/JumpToTop'
import ReactCanvasNest from 'react-canvas-nest'
const BaseLayout = ({ children, layout, fullWidth, tags, meta, post, ...customMeta }) => {
let windowTop = 0
@@ -37,11 +36,10 @@ const BaseLayout = ({ children, layout, fullWidth, tags, meta, post, ...customMe
return (
<div id='wrapper' className={[BLOG.font, theme].join(' ')}>
<CommonHead meta={meta} />
<ReactCanvasNest style = {{ zIndex: 0, position: 'fixed' }} />
<TopNav tags={tags} post={post} />
{/* Middle Wrapper */}
<main className='flex bg-gray-100'>
<main className='flex dark:bg-gray-900'>
<SideBar tags={tags} post={post} />
<div className='flex flex-grow' ref={targetRef}>
{children}
@@ -50,7 +48,6 @@ const BaseLayout = ({ children, layout, fullWidth, tags, meta, post, ...customMe
</main>
<Footer />
</div>
)
}