fixed 自定义背景图

This commit is contained in:
Vaica committed 2026-01-22 22:33:35 +08:00
1 parent 5efe7ded8e
commit 38fe480db6
7 files changed
+41 -9

No files matched your search

+16
View File
@@ -55,6 +55,9 @@
} catch (e) {}
})();
</script>
<!-- Preload Fonts -->
<link rel="preload" href="{{ "font/zql.woff2" | relURL }}" as="font" type="font/woff2" crossorigin>
<!-- Stylesheets -->
{{ $normalize := resources.Get "css/normalize.css" }}
{{ $remixicon := resources.Get "css/remixicon.css" }}
@@ -65,6 +68,19 @@
{{ $style := slice $normalize $remixicon $uikit $nprogress $artalk $main | resources.Concat "css/style.css" | resources.Minify | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{- if and .Site.Params.style.enableBackgroundImage .Site.Params.style.backgroundImageUrl -}}
<style>
body, [data-theme="dark"] 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;
}
</style>
{{- end -}}
<style>
@media only screen and (max-width: 768px) {
.items {