From 2e983e48769c6753166bcc44c1ed1fd4900bd492 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 15 Jun 2024 10:33:54 +0800 Subject: [PATCH] =?UTF-8?q?heo=20=E9=85=8D=E7=BD=AE=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/config.js | 2 ++ themes/heo/components/Hero.js | 19 +++++++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/config.js b/lib/config.js index bdb574dc..19287d8a 100644 --- a/lib/config.js +++ b/lib/config.js @@ -32,6 +32,8 @@ export const siteConfig = (key, defaultVal = null, extendConfig = {}) => { case 'POST_LIST_STYLE': case 'POST_LIST_PREVIEW': case 'POST_URL_PREFIX_MAPPING_CATEGORY': + case 'IS_TAG_COLOR_DISTINGUISHED': + case 'TAG_SORT_BY_COUNT': return convertVal(extendConfig[key] || defaultVal || BLOG[key]) default: } diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js index 7e999ebe..e8d98023 100644 --- a/themes/heo/components/Hero.js +++ b/themes/heo/components/Hero.js @@ -162,13 +162,20 @@ function TagsGroupBar() { * @returns */ function GroupMenu() { + const url_1 = siteConfig('HEO_HERO_CATEGORY_1', {}, CONFIG)?.url || '' + const title_1 = siteConfig('HEO_HERO_CATEGORY_1', {}, CONFIG)?.title || '' + const url_2 = siteConfig('HEO_HERO_CATEGORY_2', {}, CONFIG)?.url || '' + const title_2 = siteConfig('HEO_HERO_CATEGORY_2', {}, CONFIG)?.title || '' + const url_3 = siteConfig('HEO_HERO_CATEGORY_3', {}, CONFIG)?.url || '' + const title_3 = siteConfig('HEO_HERO_CATEGORY_3', {}, CONFIG)?.title || '' + return (
- {siteConfig('HEO_HERO_CATEGORY_1', null, CONFIG)?.title} + {title_1}
@@ -176,10 +183,10 @@ function GroupMenu() {
- {siteConfig('HEO_HERO_CATEGORY_2', null, CONFIG)?.title} + {title_2}
@@ -188,10 +195,10 @@ function GroupMenu() { {/* 第三个标签在小屏上不显示 */}
- {siteConfig('HEO_HERO_CATEGORY_3', null, CONFIG)?.title} + {title_3}