Update head.html

This commit is contained in:
Vaica committed 2026-06-22 17:43:52 +08:00
1 parent d79a1d3771
commit 66931d511e
1 file changed
+9 -2
+9 -2
View File
@@ -137,15 +137,22 @@
{{- if and .Site.Params.style.enableBackgroundImage .Site.Params.style.backgroundImageUrl -}}
<style>
body, [data-theme="dark"] body {
body {
background-image: url('{{ .Site.Params.style.backgroundImageUrl }}') !important;
background-size: {{ .Site.Params.style.backgroundSize | default "cover" }} !important;
background-repeat: {{ .Site.Params.style.backgroundRepeat | default "no-repeat" }} !important;
background-position: {{ .Site.Params.style.backgroundPosition | default "center" }} !important;
background-attachment: {{ .Site.Params.style.backgroundAttachment | default "fixed" }} !important;
}
[data-theme="dark"] body {
background-image: none !important;
background-size: initial !important;
background-repeat: initial !important;
background-position: initial !important;
background-attachment: initial !important;
}
@media (max-width: 768px) {
body, [data-theme="dark"] body {
body {
background-attachment: scroll !important;
}
}