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'; ?> -