diff --git a/README.md b/README.md index d68c266..1131f35 100644 --- a/README.md +++ b/README.md @@ -58,11 +58,6 @@ Now enter [`localhost:1313`](http://localhost:1313/) in the address bar of your ## Feature Settings ### Dark Mode -Customize via `style` param in `params` section of config. -Options: -- `light-without-switcher` - light theme, without switcher (by default) -- `dark-without-switcher` - dark theme, without switcher -- `auto-without-switcher` - theme based on user system settings, without switcher - `light` - light theme by default, can be switched by user to dark theme and back. Theme settings are saved for user - `dark` - dark theme by default, can be switched by user to light theme and back. Theme settings are saved for user - `auto` - theme based on user system settings by default, can be switched by user to dark/light theme. Theme settings are saved for user (by default in example sites) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 52d8086..8a75685 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,7 +1,7 @@ {{ $dataTheme := "" }} -{{ if eq site.Params.style "dark-without-switcher" }} - {{ $dataTheme = "dark" }} +{{ if and (ne site.Params.colortheme "auto") (eq site.Params.colorthemeswitcher false) }} + {{ $dataTheme := site.Params.colortheme }} {{ end }}