diff options
author | Dmitry Kolosov <mitrichius@gmail.com> | 2020-06-21 23:23:07 +0300 |
---|---|---|
committer | Dmitry Kolosov <mitrichius@gmail.com> | 2020-06-24 23:00:36 +0300 |
commit | 32818dacf1ab051d70d99e1e0d2d91e5b0306da9 (patch) | |
tree | 934246213c326ad6c896e4c403e50278b8646977 /layouts/partials/head.html | |
parent | 193fbeca7c029c9715844f5c80b0d9f378224179 (diff) |
WIP: dark theme
Diffstat (limited to 'layouts/partials/head.html')
-rw-r--r-- | layouts/partials/head.html | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a799397..22758ef 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -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 }} |