mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2025-03-13 03:06:15 +00:00

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 }}
|