From 7cdbcb539e1b9576f1363810b5ecafd9ecacda68 Mon Sep 17 00:00:00 2001 From: shiran <2488252513@qq.com> Date: Fri, 20 Feb 2026 13:16:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E6=B7=BB=E5=8A=A0=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E8=83=8C=E6=99=AF=E5=9B=BE=E7=89=87=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在设置中新增 home_bg_image 配置选项 - 实现主题 SCSS 中的背景图片样式逻辑 - 添加对首页背景图片的条件渲染支持 - 集成上传功能以支持自定义背景图片 - 设置默认值为空字符串以避免初始加载问题 - 添加中文描述文档以便用户理解功能用途 --- scss/topic-cards.scss | 8 ++++++++ settings.yml | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/scss/topic-cards.scss b/scss/topic-cards.scss index 3302a12..b4cc560 100644 --- a/scss/topic-cards.scss +++ b/scss/topic-cards.scss @@ -765,6 +765,14 @@ body.user-messages-page { position: relative; } +#main-outlet { + @if $home_bg_image != "" { + background-image: url($home_bg_image); + background-size: cover; + background-position: center; + } +} + .container.list-container{ position: relative; } diff --git a/settings.yml b/settings.yml index 343fd3b..0886dc5 100644 --- a/settings.yml +++ b/settings.yml @@ -9,3 +9,9 @@ search_experience: - search_field - search_icon description: "Overrides the core `search experience` site setting" + +home_bg_image: + type: upload + default: "" + description: "首页背景图" +