From 32818dacf1ab051d70d99e1e0d2d91e5b0306da9 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Sun, 21 Jun 2020 23:23:07 +0300 Subject: [PATCH] WIP: dark theme --- layouts/_default/baseof.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- layouts/partials/head.html | 11 +++ layouts/partials/header.html | 2 +- layouts/partials/postSummary.html | 2 +- static/css/dark.css | 129 ++++++++++++++++++++++++++++++ static/css/light.css | 128 +++++++++++++++++++++++++++++ static/css/style.css | 60 ++------------ 9 files changed, 279 insertions(+), 59 deletions(-) create mode 100644 static/css/dark.css create mode 100644 static/css/light.css diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 9f295e8..1b7946e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ {{ i18n "skipToContent" | humanize }}
-
+
{{ block "header" . }} {{ partial "header.html" . }} {{ end }} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index c40d9da..89fec15 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -7,7 +7,7 @@ {{ $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} {{ range $pages }}
-
+

{{ trim .Title " " }}

{{ partial "postInfo.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6f61195..8d1e3b7 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,7 +8,7 @@ {{ end }}
-
+

{{ trim .Title " " }}

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 @@ +{{- $style := "light" -}} +{{- if and (isset site.Params "style") (ne site.Params.style "") -}} +{{- $style = site.Params.style | lower -}} +{{- end -}} + +{{- if eq $style "dark" -}} + +{{- else -}} + +{{- end -}} + {{ range .Site.Params.customCSS -}} {{- end }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 5b84493..2b29c7e 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,4 +1,4 @@ -

+

{{ .Site.Title }}