diff --git a/themes/hexo/LayoutBase.js b/themes/hexo/LayoutBase.js index 27c8e1a9..21f2cffd 100644 --- a/themes/hexo/LayoutBase.js +++ b/themes/hexo/LayoutBase.js @@ -12,6 +12,7 @@ import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' import dynamic from 'next/dynamic' import { isBrowser, loadExternalResource } from '@/lib/utils' +import CONFIG_HEXO from './config_hexo' const FacebookPage = dynamic( () => { @@ -65,6 +66,8 @@ const LayoutBase = props => { if (isBrowser()) { loadExternalResource('/css/theme-hexo.css', 'css') } + + const fixStyleObject = !CONFIG_HEXO.HOME_BANNER_ENABLE ? { paddingTop: '4rem' }:{} return (
@@ -73,7 +76,7 @@ const LayoutBase = props => { {headerSlot} -
+
{onLoading ? : children} diff --git a/themes/matery/LayoutBase.js b/themes/matery/LayoutBase.js index 5e699117..6dbac0d6 100644 --- a/themes/matery/LayoutBase.js +++ b/themes/matery/LayoutBase.js @@ -12,6 +12,7 @@ import FloatDarkModeButton from './components/FloatDarkModeButton' import throttle from 'lodash.throttle' import { isBrowser, loadExternalResource } from '@/lib/utils' import SocialButton from './components/SocialButton' +import CONFIG_MATERY from './config_matery' /** * 基础布局 采用左右两侧布局,移动端使用顶部导航栏 @@ -41,6 +42,7 @@ const LayoutBase = props => { if (isBrowser()) { loadExternalResource('/css/theme-matery.css', 'css') } + const fixStyleObject = !CONFIG_MATERY.HOME_BANNER_ENABLE ? { paddingTop: '4rem' } : {} return (
@@ -51,7 +53,7 @@ const LayoutBase = props => { {headerSlot} -
+
{/* 嵌入区域 */}
{props.containerSlot}