From 42d025f7646cc2026a789945aca7087ae69b6054 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 31 Oct 2024 21:35:57 +0800 Subject: [PATCH] =?UTF-8?q?starter=20=E5=8A=A0=E5=BF=AB=E9=A6=96=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/starter/components/Hero.js | 54 ++++++++++++++++++++++--------- themes/starter/index.js | 26 +++++++-------- 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/themes/starter/components/Hero.js b/themes/starter/components/Hero.js index b0fed7a9..00a43a06 100644 --- a/themes/starter/components/Hero.js +++ b/themes/starter/components/Hero.js @@ -4,7 +4,8 @@ import { siteConfig } from '@/lib/config' /** * 英雄大图区块 */ -export const Hero = () => { +export const Hero = props => { + const CONFIG = props?.NOTION_CONFIG || CONFIG return ( <> {/* */} @@ -19,37 +20,49 @@ export const Hero = () => { data-wow-delay='.2s'> {/* 主标题 */}

- {siteConfig('STARTER_HERO_TITLE_1')} + {siteConfig('STARTER_HERO_TITLE_1', null, CONFIG)}

{/* 次标题 */}

- {siteConfig('STARTER_HERO_TITLE_2')} + {siteConfig('STARTER_HERO_TITLE_2', null, CONFIG)}

{/* 按钮组 */}