From bbce50b0532e5c887aa2136c79f27733c348a9cd Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 31 Oct 2023 15:27:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?HEO=E4=B8=BB=E9=A2=98=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E5=8C=BA=E9=BB=98=E8=AE=A4=E5=B0=81=E9=9D=A2=E5=9B=BE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/heo/components/Hero.js | 3 +-- themes/heo/config.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js index 14cad8b0..7f21c474 100644 --- a/themes/heo/components/Hero.js +++ b/themes/heo/components/Hero.js @@ -378,8 +378,7 @@ function TodayCard({ cRef }) { isCoverUp ? '' : ' pointer-events-none' } cursor-pointer today-card-cover absolute w-full h-full top-0`} style={{ - background: - "url('https://bu.dusays.com/2023/03/12/640dcd3a1b146.png') no-repeat center /cover" + background: `url('${CONFIG.HERO_RECOMMEND_COVER}') no-repeat center /cover` }} > diff --git a/themes/heo/config.js b/themes/heo/config.js index f62be177..1d336dc2 100644 --- a/themes/heo/config.js +++ b/themes/heo/config.js @@ -25,6 +25,7 @@ const CONFIG = { // 英雄区右侧推荐文章标签, 例如 [推荐] , 最多六篇文章; 若留空白'',则推荐最近更新文章 HERO_RECOMMEND_POST_TAG: '推荐', HERO_RECOMMEND_POST_SORT_BY_UPDATE_TIME: false, // 推荐文章排序,为`true`时将强制按最后修改时间倒序 + HERO_RECOMMEND_COVER: 'https://cdn.pixabay.com/photo/2015/10/30/20/13/sunrise-1014712_1280.jpg', // 英雄区右侧图片 // 右侧个人资料卡牌欢迎语,点击可自动切换 INFOCARD_GREETINGS: [ From 2f5aa8c69b24e46290395b4c718e1e8037015d1d Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 31 Oct 2023 15:29:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?HEO=E4=B8=BB=E9=A2=98=E8=8B=B1=E9=9B=84?= =?UTF-8?q?=E5=8C=BA=E5=B0=81=E9=9D=A2=E9=BB=98=E8=AE=A4=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=AF=BB=E5=8F=96Notion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/heo/components/Hero.js | 6 +++--- themes/heo/config.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/heo/components/Hero.js b/themes/heo/components/Hero.js index 7f21c474..a0ff3f73 100644 --- a/themes/heo/components/Hero.js +++ b/themes/heo/components/Hero.js @@ -253,7 +253,7 @@ function TopGroup(props) { ) })} - + ) } @@ -301,7 +301,7 @@ function getTopPosts({ latestPosts, allNavPages }) { * 英雄区右侧,今日卡牌 * @returns */ -function TodayCard({ cRef }) { +function TodayCard({ cRef, siteInfo }) { const router = useRouter() // 卡牌是否盖住下层 const [isCoverUp, setIsCoverUp] = useState(true) @@ -378,7 +378,7 @@ function TodayCard({ cRef }) { isCoverUp ? '' : ' pointer-events-none' } cursor-pointer today-card-cover absolute w-full h-full top-0`} style={{ - background: `url('${CONFIG.HERO_RECOMMEND_COVER}') no-repeat center /cover` + background: `url('${siteInfo?.pageCover}') no-repeat center /cover` }} > diff --git a/themes/heo/config.js b/themes/heo/config.js index 1d336dc2..a979621c 100644 --- a/themes/heo/config.js +++ b/themes/heo/config.js @@ -25,7 +25,7 @@ const CONFIG = { // 英雄区右侧推荐文章标签, 例如 [推荐] , 最多六篇文章; 若留空白'',则推荐最近更新文章 HERO_RECOMMEND_POST_TAG: '推荐', HERO_RECOMMEND_POST_SORT_BY_UPDATE_TIME: false, // 推荐文章排序,为`true`时将强制按最后修改时间倒序 - HERO_RECOMMEND_COVER: 'https://cdn.pixabay.com/photo/2015/10/30/20/13/sunrise-1014712_1280.jpg', // 英雄区右侧图片 + // HERO_RECOMMEND_COVER: 'https://cdn.pixabay.com/photo/2015/10/30/20/13/sunrise-1014712_1280.jpg', // 英雄区右侧图片 // 右侧个人资料卡牌欢迎语,点击可自动切换 INFOCARD_GREETINGS: [