Update head.html
This commit is contained in:
1 parent
7cd977b791
commit
6aa9dff831
1 file changed
+9
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user