perf: update card backdrop background to utilize dynamic logo image

This commit is contained in:
Cell
2025-12-25 16:57:34 +08:00
parent 06273f725d
commit dcc5e32cba
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
bottom: 0.75rem; bottom: 0.75rem;
left: 0; left: 0;
right: 0; right: 0;
background-image: var(--cl-bg-url); background-image: var(#{$rootPrefix}logo-img);
background-repeat: no-repeat; background-repeat: no-repeat;
filter: blur(0.5rem); filter: blur(0.5rem);
opacity: 0.5; opacity: 0.5;
+2
View File
@@ -1,3 +1,4 @@
{{- $logo := resources.Get "images/fixit.svg" | minify -}}
{{- $loading := resources.Get "images/loading.svg" | minify -}} {{- $loading := resources.Get "images/loading.svg" | minify -}}
@charset "utf-8"; @charset "utf-8";
@@ -7,5 +8,6 @@ $base: "{{ relURL "" }}" !default;
:root { :root {
#{$rootPrefix}base: "#{$base}"; #{$rootPrefix}base: "#{$base}";
#{$rootPrefix}logo-img: url("{{ $logo.RelPermalink }}");
#{$rootPrefix}loading-img: url("{{ $loading.RelPermalink }}"); #{$rootPrefix}loading-img: url("{{ $loading.RelPermalink }}");
} }
+1 -1
View File
@@ -1,4 +1,4 @@
{{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251225084220-e5014773" -}} {{- hugo.Store.Set "version" "v0.4.0-alpha.3-20251225085735-06273f72" -}}
{{- .Store.Set "this" dict -}} {{- .Store.Set "this" dict -}}
{{- partial "init/detection-env.html" . -}} {{- partial "init/detection-env.html" . -}}
+1 -3
View File
@@ -50,9 +50,7 @@
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{- $attrs := `class="cl-backdrop"` -}} <span class="cl-backdrop"></span>
{{- $attrs = printf ` style="--cl-bg-url: url(%v);"` (resources.Get "images/fixit.svg" | minify).RelPermalink | add $attrs -}}
<span {{ $attrs | safeHTMLAttr }}></span>
<span class="cl-content"> <span class="cl-content">
<span class="cl-text"> <span class="cl-text">
<span class="cl-title"> <span class="cl-title">