Update head.html
This commit is contained in:
1 parent
d79a1d3771
commit
66931d511e
1 file changed
+9
-2
@@ -137,15 +137,22 @@
|
|||||||
|
|
||||||
{{- if and .Site.Params.style.enableBackgroundImage .Site.Params.style.backgroundImageUrl -}}
|
{{- if and .Site.Params.style.enableBackgroundImage .Site.Params.style.backgroundImageUrl -}}
|
||||||
<style>
|
<style>
|
||||||
body, [data-theme="dark"] body {
|
body {
|
||||||
background-image: url('{{ .Site.Params.style.backgroundImageUrl }}') !important;
|
background-image: url('{{ .Site.Params.style.backgroundImageUrl }}') !important;
|
||||||
background-size: {{ .Site.Params.style.backgroundSize | default "cover" }} !important;
|
background-size: {{ .Site.Params.style.backgroundSize | default "cover" }} !important;
|
||||||
background-repeat: {{ .Site.Params.style.backgroundRepeat | default "no-repeat" }} !important;
|
background-repeat: {{ .Site.Params.style.backgroundRepeat | default "no-repeat" }} !important;
|
||||||
background-position: {{ .Site.Params.style.backgroundPosition | default "center" }} !important;
|
background-position: {{ .Site.Params.style.backgroundPosition | default "center" }} !important;
|
||||||
background-attachment: {{ .Site.Params.style.backgroundAttachment | default "fixed" }} !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) {
|
@media (max-width: 768px) {
|
||||||
body, [data-theme="dark"] body {
|
body {
|
||||||
background-attachment: scroll !important;
|
background-attachment: scroll !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user