diff --git a/themes/buha/layouts/_default/contact.html b/themes/buha/layouts/_default/contact.html index a704d79f..2bc9513f 100644 --- a/themes/buha/layouts/_default/contact.html +++ b/themes/buha/layouts/_default/contact.html @@ -7,19 +7,44 @@ {{ end }} {{ define "main" }} -
- {{- if ne .Section .Site.Params.hiddenfolder -}} - {{- if .Resources.ByType "image" -}} -
+{{- $pic := index (.Resources.ByType "image") 0 -}} + +
+
+ {{ partial "structure/article_meta" (dict "context" . "visible" "all") }} + {{ $small := "solo" }} + {{ $big := "solo" }} + {{ $placeholder := "/images/placeholder_article.jpg" }} + {{ $img := resources.Get $placeholder }} + {{- if or (.Resources.ByType "image") (.Content) ($img) -}} + {{ $small = "multiple_small" }} + {{ $big = "multiple_big" }} + {{ else }} + {{ $small = "multiple_big"}} + {{ end }} +
+ {{- if .Resources.ByType "image" -}} {{- $pic := index (.Resources.ByType "image") 0 -}} - {{- $thumb := $pic.Resize "1024x" }} - -
- {{- end }} -
- {{ partial "contact.html" }} - {{ .Content }} + {{- $thumb := $pic.Resize "2048x" }} + {{ if ne .Content "" }} + {{- $thumb = $pic.Resize "1024x" }} + {{ end }} +
+ +
+ {{ else if $img }} + {{- $img = $img.Resize "1024x" }} +
+ +
+ {{ end }} + {{- if .Content -}} +
+ {{ partial "contact.html" }} + {{- .Content -}} +
+ {{- end }}
- {{- end -}} +
{{ end }} \ No newline at end of file diff --git a/themes/buha/layouts/_default/single.html b/themes/buha/layouts/_default/single.html index 9791b265..c99133e1 100644 --- a/themes/buha/layouts/_default/single.html +++ b/themes/buha/layouts/_default/single.html @@ -1,3 +1,6 @@ + + + {{ define "main" }} {{ if eq .Description "nottranslated" }} {{ partial "orga/nottranslated.html" . }} diff --git a/themes/buha/layouts/partials/orga/generator.html b/themes/buha/layouts/partials/orga/generator.html index 86affc20..a636d7b2 100644 --- a/themes/buha/layouts/partials/orga/generator.html +++ b/themes/buha/layouts/partials/orga/generator.html @@ -1,7 +1,6 @@ {{ define "css" }} {{ end }} -

Artikelgenerator

{{ .Content }} diff --git a/themes/buha/layouts/partials/orga/nottranslated.html b/themes/buha/layouts/partials/orga/nottranslated.html index 7e2d9e53..656ffa44 100644 --- a/themes/buha/layouts/partials/orga/nottranslated.html +++ b/themes/buha/layouts/partials/orga/nottranslated.html @@ -1,18 +1,27 @@ +
+ {{ $l1 := slice }} + {{ $l2 := slice }} + {{ range $.Site.Home.Translations }} + {{ $l1 = $l1 | append .Language }} + {{ end }} + {{ $all_lang := $.Site.Home.Translations }} - {{ range site.RegularPages }} - {{ .Name }}: - {{ if .Translations }} - {{ range .Translations }} - {{ $t1 := .Language }} - {{ range $all_lang }} - {{- $a := .Language -}} - {{- $b := $.Site.Language.Lang -}} - {{ if ne $t1 .Language }} - missing: {{ .Language }}
- {{ end }} - {{ end }} - {{ end }} - {{ else }} - missing: all
- {{ end }} + {{ range site.RegularPages }} + {{ $missing := slice}} + {{ if .Translations }} + {{ range .Translations }} + {{ $l2 = $l2 | append .Language }} {{ end }} + {{ $final := $l1 | complement $l2 }} + {{ range $final }} + {{ $missing = $missing | append . }} + {{ end }} + {{ else }} + {{ $missing = $missing | append "all translations" }} + {{ end }} + {{ if $missing }} + {{ .Name }}: +
missing: {{ index $missing 0 }}
+ {{ end }} + {{ end }} +
\ No newline at end of file diff --git a/themes/buha/layouts/partials/single/article.html b/themes/buha/layouts/partials/single/article.html index e3ed240d..86c9566f 100644 --- a/themes/buha/layouts/partials/single/article.html +++ b/themes/buha/layouts/partials/single/article.html @@ -1,6 +1,11 @@ -
-

{{- .Title -}}

-
+{{ define "title" }} + {{ $name := .Title }} + {{ if lower $name | i18n }} + {{ $name = lower $name | i18n }} + {{ end }} +

{{ $name }}

+{{ end }} + {{- $pic := index (.Resources.ByType "image") 0 -}}
@@ -8,9 +13,7 @@ {{ partial "structure/article_meta" (dict "context" . "visible" "all") }} {{ $small := "solo" }} {{ $big := "solo" }} - {{ $placeholder := "/images/placeholder_article.jpg" }} - {{ $img := resources.Get $placeholder }} - {{- if or (.Resources.ByType "image") (.Content) ($img) -}} + {{- if or (.Resources.ByType "image") (.Content) -}} {{ $small = "multiple_small" }} {{ $big = "multiple_big" }} {{ else }} @@ -26,11 +29,6 @@
- {{ else if $img }} - {{- $img = $img.Resize "1024x" }} -
- -
{{ end }} {{- if .Content -}}