From b6e54e3cbddc0641efc3464f7773466861165876 Mon Sep 17 00:00:00 2001 From: shiran <2488252513@qq.com> Date: Thu, 26 Feb 2026 15:37:57 +0800 Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=85=89=E6=A0=87=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 SCSS 中实现条件编译以支持自定义光标 - 添加 $custom_cursor 变量控制光标样式 - 在 settings.yml 中增加 custom_cursor 配置项 - 支持上传 SVG 文件作为自定义光标 - 默认值设为空字符串以保持向后兼容性 --- scss/self.scss | 7 ++++--- settings.yml | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/scss/self.scss b/scss/self.scss index 7855cbc..47c9d9c 100644 --- a/scss/self.scss +++ b/scss/self.scss @@ -82,7 +82,8 @@ display: none; } -// 使用自定义指针 -* { - cursor: url(../../../assets/point.svg) 1 1, auto; +@if $custom_cursor != "" { + * { + cursor: url($custom_cursor) 1 1, auto; + } } diff --git a/settings.yml b/settings.yml index 0886dc5..74b3025 100644 --- a/settings.yml +++ b/settings.yml @@ -15,3 +15,8 @@ home_bg_image: default: "" description: "首页背景图" +custom_cursor: + type: upload + default: "" + description: "自定义光标 SVG 文件" +