diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js index 3f2ddbf1..23edfc8b 100644 --- a/themes/heo/components/Hero.js +++ b/themes/heo/components/Hero.js @@ -15,6 +15,7 @@ import CONFIG from '../config' * @returns */ const Hero = props => { + const HEO_HERO_REVERSE = siteConfig('HEO_HERO_REVERSE', false, CONFIG) return (
{ id="hero" style={{ zIndex: 1 }} className={ - 'animate__animated animate__fadeIn animate__fast recent-post-top rounded-[12px] 2xl:px-5 recent-top-post-group max-w-[86rem] overflow-x-scroll w-full mx-auto flex-row flex-nowrap flex xl:space-x-3 relative' + `animate__animated animate__fadeIn animate__fast + ${HEO_HERO_REVERSE ? 'xl:flex-row-reverse' : ''} + recent-post-top rounded-[12px] 2xl:px-5 recent-top-post-group max-w-[86rem] overflow-x-scroll w-full mx-auto flex-row flex-nowrap flex relative` } > {/* 左侧banner组 */} + {/* 中间留白 */} +
+ {/* 右侧置顶文章组 */}
diff --git a/themes/heo/config.js b/themes/heo/config.js index ee24656c..c8e730ea 100644 --- a/themes/heo/config.js +++ b/themes/heo/config.js @@ -9,6 +9,11 @@ const CONFIG = { { title: '访问文档中心获取更多帮助', url: 'https://docs.tangly1024.com' } ], + // 英雄区左右侧组件颠倒位置 + HEO_HERO_REVERSE: false, + // 博客主体区左右侧组件颠倒位置 + HEO_HERO_BODY_REVERSE: false, + // 英雄区(首页顶部大卡) HEO_HERO_TITLE_1: '分享编程', HEO_HERO_TITLE_2: '与思维认知', diff --git a/themes/heo/index.js b/themes/heo/index.js index d127a021..30a7eef1 100644 --- a/themes/heo/index.js +++ b/themes/heo/index.js @@ -61,6 +61,8 @@ const LayoutBase = props => { const { fullWidth } = useGlobal() const maxWidth = fullWidth ? 'max-w-[96rem] mx-auto' : 'max-w-[86rem]' // 普通最大宽度是86rem和顶部菜单栏对齐,留空则与窗口对齐 + const HEO_HERO_BODY_REVERSE = siteConfig('HEO_HERO_BODY_REVERSE', false, CONFIG) + return (
{
@@ -90,11 +92,14 @@ const LayoutBase = props => { {children}
+
+
{/* 主区快右侧 */} {slotRight}
+ {/* 页脚 */}