From 21bf48d34ef818d7b3a9fc43b464eb903ba39e0c Mon Sep 17 00:00:00 2001
From: nanhaoluo <3075912108@qq.com>
Date: Mon, 12 Jan 2026 10:03:42 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8D=A1=E7=89=87=E6=95=88=E6=9E=9C?=
=?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=AB=99=E9=95=BF=E8=87=AA=E5=AE=9A=E4=B9=89?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=8C=E7=BB=9F=E4=B8=80=E5=85=A8=E5=B1=80?=
=?UTF-8?q?=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增毛玻璃饱和度设置 (argon_card_saturate),默认 180%
- 更新默认值为最优设置:
- 卡片透明度: 0.7 (原 1)
- 毛玻璃模糊: 20px (原 8px)
- 毛玻璃饱和度: 180%
- CSS 使用变量 --card-opacity, --card-blur, --card-saturate
- 玻璃风格样式改用 CSS 变量,跟随站长设置
- 所有页面(首页/文章页/页面模板)统一应用相同设置
- 设置页预览支持饱和度实时预览
- 暗色模式卡片背景色统一为 rgba(66,66,66,opacity)
---
header.php | 98 +++++++++++++++++++++++++---------------------------
settings.php | 46 +++++++++++++++++-------
style.css | 35 ++++++++++---------
3 files changed, 100 insertions(+), 79 deletions(-)
diff --git a/header.php b/header.php
index 84de056..7c9e365 100644
--- a/header.php
+++ b/header.php
@@ -614,6 +614,26 @@
+
+
+
+
- /* 文章背景透明度 - 包含文章和评论区 */
+ /* 卡片透明度和毛玻璃效果 - 使用 CSS 变量 */
0 && ($post_bg_opacity == '' || $post_bg_opacity == '1')) {
- $post_bg_opacity = max(0.75, 0.92 - $card_blur * 0.008);
+ // 如果透明度为空或为1,使用推荐默认值
+ if ($post_bg_opacity_inline == '' || $post_bg_opacity_inline == '1') {
+ $post_bg_opacity_inline = '0.7';
}
-
- if ($post_bg_opacity != '' && $post_bg_opacity != '1') {
?>
article.post.card,
#comments.card,
@@ -1183,7 +1202,9 @@ if ($animation_style == 'apple') {
.post-navigation.card,
.related-posts.card,
.card.bg-white {
- background-color: rgba(255, 255, 255, ) !important;
+ background-color: rgba(255, 255, 255, ) !important;
+ backdrop-filter: blur(px) saturate(%);
+ -webkit-backdrop-filter: blur(px) saturate(%);
}
html.darkmode article.post.card,
html.darkmode #comments.card,
@@ -1191,49 +1212,34 @@ if ($animation_style == 'apple') {
html.darkmode .post-navigation.card,
html.darkmode .related-posts.card,
html.darkmode .card.bg-white {
- background-color: rgba(23, 25, 35, ) !important;
+ background-color: rgba(66, 66, 66, ) !important;
}
-
-
- /* 卡片毛玻璃效果 */
- 0) {
- $blur_value = $card_blur . 'px';
- ?>
- article.post.card,
- #comments.card,
- #post_comment.card,
- .post-navigation.card,
- .related-posts.card,
#leftbar .card,
#leftbar_part1,
- #leftbar_part2,
- .card.bg-white {
- backdrop-filter: blur() saturate(120%);
- -webkit-backdrop-filter: blur() saturate(120%);
+ #leftbar_part2 {
+ backdrop-filter: blur(px) saturate(%);
+ -webkit-backdrop-filter: blur(px) saturate(%);
}
-
-
+
0):
- // 如果开启了毛玻璃但没设置透明度,自动应用推荐透明度
+if (apply_filters('argon_page_background_url', get_option('argon_page_background_url')) == ''):
+ // 如果透明度为空或为1,使用推荐默认值
if ($post_bg_opacity_standalone == '' || $post_bg_opacity_standalone == '1') {
- $post_bg_opacity_standalone = max(0.75, 0.92 - $card_blur_standalone * 0.008);
+ $post_bg_opacity_standalone = '0.7';
}
- $blur_value_standalone = $card_blur_standalone . 'px';
?>
-