mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
51 lines
1.3 KiB
JavaScript
51 lines
1.3 KiB
JavaScript
import CommonHead from '@/components/CommonHead'
|
|
import React from 'react'
|
|
import { Header } from './components/Header'
|
|
import { Nav } from './components/Nav'
|
|
import { Footer } from './components/Footer'
|
|
import { Title } from './components/Title'
|
|
import { SideBar } from './components/SideBar'
|
|
import JumpToTopButton from './components/JumpToTopButton'
|
|
/**
|
|
* 基础布局 采用左右两侧布局,移动端使用顶部导航栏
|
|
|
|
* @returns {JSX.Element}
|
|
* @constructor
|
|
*/
|
|
const LayoutBase = props => {
|
|
const { children, meta } = props
|
|
return (
|
|
<div className='dark:text-gray-300'>
|
|
<CommonHead meta={meta} />
|
|
{/* 顶栏LOGO */}
|
|
<Header {...props} />
|
|
|
|
{/* 菜单 */}
|
|
<Nav {...props} />
|
|
|
|
{/* 主体 */}
|
|
<div className="w-full bg-white">
|
|
|
|
<Title {...props} />
|
|
|
|
<div className="container max-w-3xl mx-auto justify-center md:flex items-start py-8 px-2 md:px-4">
|
|
|
|
<div className='w-full'>{children}</div>
|
|
|
|
<SideBar {...props} />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Footer {...props} />
|
|
|
|
<div className='fixed right-4 bottom-4'>
|
|
<JumpToTopButton />
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default LayoutBase
|