From e3e9ce62d29b253026b466e14ab97dea083e2782 Mon Sep 17 00:00:00 2001 From: Dmitry Kolosov Date: Sun, 19 Dec 2021 14:10:10 +0300 Subject: [PATCH] remove lang switcher from reader view #14 --- assets/css/main.css | 16 +++++++----- layouts/_default/list.html | 10 +++++--- layouts/_default/single.html | 10 +++++--- layouts/partials/post-language-switcher.html | 26 +++++++++++--------- layouts/partials/post-summary.html | 8 +++--- 5 files changed, 41 insertions(+), 29 deletions(-) diff --git a/assets/css/main.css b/assets/css/main.css index 1d94953..23df334 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -281,6 +281,16 @@ main h1 { /* Articles */ +.post-header { + margin-top: 1em; + line-height: 1.1em; + margin-bottom: 1em; +} + +.post-header header { + display: inline; +} + .post-navigation { background: var(--nav-bg-color); text-align: center; @@ -331,12 +341,6 @@ article:not(:last-of-type) { padding-bottom: 2em; } -article header { - margin-top: 1em; - line-height: 1.1em; - margin-bottom: 1em; -} - article header h1 { font-size: 1.35em; diff --git a/layouts/_default/list.html b/layouts/_default/list.html index cb1b757..02500a2 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,10 +8,12 @@ {{ $pages := where .Pages "Type" "in" site.Params.mainSections }} {{ range $pages }}
-
-

{{ trim .Title " " }}

- {{ partial "post-language-switcher.html" . }} -
+
+
+

{{ trim .Title " " }}

+ {{ partial "post-language-switcher.html" . }} +
+
{{ partial "post-info.html" . }}
{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 94a711e..44cf703 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,11 +8,13 @@ {{ end }}
-
-

{{ trim .Title " " }}

+
+
+

{{ trim .Title " " }}

- {{ partial "post-language-switcher.html" . }} -
+ {{ partial "post-language-switcher.html" . }} +
+
{{ .Content }}
diff --git a/layouts/partials/post-language-switcher.html b/layouts/partials/post-language-switcher.html index 162cdf3..3ed363e 100644 --- a/layouts/partials/post-language-switcher.html +++ b/layouts/partials/post-language-switcher.html @@ -1,16 +1,18 @@ {{ if .IsTranslated }} {{ $pageLang := .Page.Lang}} - + {{ end }} \ No newline at end of file diff --git a/layouts/partials/post-summary.html b/layouts/partials/post-summary.html index 7961f62..618c280 100644 --- a/layouts/partials/post-summary.html +++ b/layouts/partials/post-summary.html @@ -1,8 +1,10 @@