diff --git a/layouts/partials/paige/style.html b/layouts/partials/paige/style.html index f0c15388..4b78cacb 100644 --- a/layouts/partials/paige/style.html +++ b/layouts/partials/paige/style.html @@ -95,6 +95,14 @@ body, html { margin-bottom: 1rem; } +@media (prefers-color-scheme: dark) { + {{ partial "paige/dark.css" $page | safeCSS }} +} + +@media (prefers-color-scheme: light) { + {{ partial "paige/light.css" $page | safeCSS }} +} + @media (prefers-reduced-motion: reduce) { .paige-header-link { transition: none; @@ -107,24 +115,6 @@ body, html { } {{ end }} -{{ with $page.Param "paige.color_scheme" }} - {{ if eq . "dark" }} - {{ partial "paige/dark.css" . | safeCSS }} - {{ else if eq . "light" }} - {{ partial "paige/light.css" . | safeCSS }} - {{ else }} - {{ errorf "paige/style: invalid color scheme: %q" . }} - {{ end }} -{{ else }} - @media (prefers-color-scheme: dark) { - {{ partial "paige/dark.css" $page | safeCSS }} - } - - @media (prefers-color-scheme: light) { - {{ partial "paige/light.css" $page | safeCSS }} - } -{{ end }} - {{ with $page.Param "paige.style" }} {{ . | safeCSS }} {{ end }}