WIP: dark theme

This commit is contained in:
Dmitry Kolosov 2020-06-21 23:23:07 +03:00
parent 193fbeca7c
commit 32818dacf1
9 changed files with 279 additions and 59 deletions

View file

@ -16,6 +16,17 @@
<link rel="stylesheet" href="{{ "css/style.css" | absURL }}?rnd={{ now.Unix }}" />
{{- $style := "light" -}}
{{- if and (isset site.Params "style") (ne site.Params.style "") -}}
{{- $style = site.Params.style | lower -}}
{{- end -}}
{{- if eq $style "dark" -}}
<link rel="stylesheet" href="{{ "css/dark.css" | absURL }}?rnd={{ now.Unix }}" />
{{- else -}}
<link rel="stylesheet" href="{{ "css/light.css" | absURL }}?rnd={{ now.Unix }}" />
{{- end -}}
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | absURL }}?rnd={{ now.Unix }}">
{{- end }}