From 055236d941a521ba7201951a59ed8c70169b976f Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 29 Apr 2024 10:08:39 +0800 Subject: [PATCH] =?UTF-8?q?matery=20=E4=B8=BB=E9=A2=98=E4=B8=80=E9=97=AA?= =?UTF-8?q?=E8=80=8C=E8=BF=87=E7=9A=84title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/matery/components/Hero.js | 6 +++--- themes/matery/components/Logo.js | 13 +++++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/themes/matery/components/Hero.js b/themes/matery/components/Hero.js index 35260f9a..65975a0f 100644 --- a/themes/matery/components/Hero.js +++ b/themes/matery/components/Hero.js @@ -9,7 +9,8 @@ import CONFIG from '../config' let wrapperTop = 0 /** - * + * 首页英雄区 + * 是一张大图,带个居中按钮 * @returns 头图 */ const Hero = props => { @@ -17,7 +18,6 @@ const Hero = props => { const { siteInfo } = props const { locale } = useGlobal() const GREETING_WORDS = siteConfig('GREETING_WORDS').split(',') - useEffect(() => { updateHeaderHeight() if (!typed && window && document.getElementById('typed')) { @@ -61,7 +61,7 @@ const Hero = props => {
{/* 站点标题 */}
- {siteConfig('TITLE')} + {siteInfo?.title || siteConfig('TITLE')}
{/* 站点欢迎语 */}
diff --git a/themes/matery/components/Logo.js b/themes/matery/components/Logo.js index 3e6542f4..a1082ae3 100644 --- a/themes/matery/components/Logo.js +++ b/themes/matery/components/Logo.js @@ -1,11 +1,20 @@ import { siteConfig } from '@/lib/config' import Link from 'next/link' - +/** + * 站点logo + * 这里默认只支持纯文字 + * @param {*} props + * @returns + */ const Logo = props => { + const { siteInfo } = props return (
-
{siteConfig('TITLE') }
+
+ {' '} + {siteInfo?.title || siteConfig('TITLE')} +
)