mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-14 08:59:45 +00:00
1ee72fb667
The background rendered properly if dark mode was specified explicitly in the config.toml, but not if the config.toml specified auto mode and then dark mode was chosen by the client.
32 lines
763 B
Sass
32 lines
763 B
Sass
{{ $themeStyle := .Site.Params.themeStyle | default "light" }}
|
|
|
|
{{ if eq $themeStyle "auto" }}
|
|
@import "fonts"
|
|
@import "light-variables"
|
|
@import "base-variables"
|
|
@import "bulma-import"
|
|
@import "fontawesome-import"
|
|
@import "academicons-import"
|
|
@import "base"
|
|
@import "light-style"
|
|
|
|
@media (prefers-color-scheme: dark)
|
|
@import "fonts"
|
|
@import "dark-variables"
|
|
@import "base-variables"
|
|
@import "bulma-import"
|
|
@import "fontawesome-import"
|
|
@import "academicons-import"
|
|
@import "base"
|
|
@import "dark-style"
|
|
|
|
{{ else }}
|
|
@import "fonts"
|
|
@import "{{ $themeStyle }}-variables"
|
|
@import "base-variables"
|
|
@import "bulma-import"
|
|
@import "fontawesome-import"
|
|
@import "academicons-import"
|
|
@import "base"
|
|
@import "{{ $themeStyle }}-style"
|
|
{{ end }}
|