feat 支持侧栏布局反转 左变右,右变左, 通过 blog.config.js 内的 LAYOUT_SIDEBAR_REVERSE 控制

已支持主题: hexo next medium fukasawa example
This commit is contained in:
xloong
2023-01-03 20:01:26 +08:00
parent 42586992b0
commit 7a115a6d46
8 changed files with 15 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import { Footer } from './components/Footer'
import { Title } from './components/Title'
import { SideBar } from './components/SideBar'
import JumpToTopButton from './components/JumpToTopButton'
import BLOG from '@/blog.config'
/**
* 基础布局 采用左右两侧布局,移动端使用顶部导航栏
@@ -28,7 +29,7 @@ const LayoutBase = props => {
<Title {...props} />
<div className="container mx-auto justify-center md:flex items-start py-8 px-2">
<div className={(BLOG.LAYOUT_SIDEBAR_REVERSE ? 'flex-row-reverse' : '') + ' container mx-auto justify-center md:flex items-start py-8 px-2'}>
<div className='w-full max-w-3xl xl:px-14 lg:px-4 '>{children}</div>