From 722a701944904554797512c88515f17383b6833f Mon Sep 17 00:00:00 2001 From: teldra Date: Sun, 10 Apr 2022 00:53:31 +0200 Subject: [PATCH] first batch of restructure --- config.toml | 2 +- content/about/_index.de.md | 1 + content/archive/_index.de.md | 5 +- content/contact/_index.de.md | 3 +- content/events/_index.de.md | 4 ++ content/featured/_index.de.md | 4 ++ content/imprint/_index.de.md | 3 +- content/links/_index.de.md | 4 ++ .../Buntes.Haus.Celle.Logo.1.jpg | Bin .../Buntes.Haus.Celle.Logo.2.jpg | Bin .../Buntes.Haus.Celle.Logo.3.jpg | Bin .../Buntes.Haus.Celle.Logo.4.jpg | Bin .../Buntes.Haus.Celle.Logo.5.jpg | Bin .../Buntes.Haus.Celle.Logo.5.png | Bin .../Buntes.Haus.Celle.Zeichnung.jpg | Bin content/media/_index.de.md | 4 ++ content/{misc/medien => media}/index.de.md | 4 -- content/misc/_index.de.md | 4 ++ content/misc/_index.md | 3 -- content/news/_index.de.md | 4 ++ content/newsletter/_index.de.md | 1 + content/tools/_index.de.md | 4 ++ themes/buha/assets/css/layout.css | 5 +- .../_default/_markup/render-heading.html | 7 +++ .../_default/_markup/render-image.html | 35 +++++++++++++ themes/buha/layouts/_default/list.html | 48 ++++++++++-------- themes/buha/layouts/_default/single.html | 13 ++++- themes/buha/layouts/index.html | 4 +- themes/buha/layouts/partials/l1/archive.html | 15 ++++++ .../{layout/lists => l1}/article_list.html | 2 +- themes/buha/layouts/partials/l1/contact.html | 33 ++++++++++++ .../buha/layouts/partials/l1/easy_list.html | 6 +++ themes/buha/layouts/partials/l1/imprint.html | 33 ++++++++++++ .../partials/{layout/single => l1}/links.html | 2 +- themes/buha/layouts/partials/l1/media.html | 5 ++ .../buha/layouts/partials/l1/newsletter.html | 33 ++++++++++++ .../section_list.html => l1/section_list} | 0 .../layout/lists/taxonomies_list.html | 3 -- .../partials/layout/lists/term_list.html | 4 -- .../partials/layout/single/article.html | 4 +- .../layout/single/content_single.html | 4 +- .../partials/layout/single/nottranslated.html | 25 +++++++++ .../snippets/.single_chooser.html.kate-swp | Bin 0 -> 259 bytes .../partials/snippets/article_metadata.html | 2 +- .../layouts/partials/snippets/contact.html | 2 +- .../partials/snippets/single_chooser.html | 16 ++---- 46 files changed, 285 insertions(+), 66 deletions(-) create mode 100644 content/events/_index.de.md create mode 100644 content/featured/_index.de.md create mode 100644 content/links/_index.de.md rename content/{misc/medien => media}/Buntes.Haus.Celle.Logo.1.jpg (100%) rename content/{misc/medien => media}/Buntes.Haus.Celle.Logo.2.jpg (100%) rename content/{misc/medien => media}/Buntes.Haus.Celle.Logo.3.jpg (100%) rename content/{misc/medien => media}/Buntes.Haus.Celle.Logo.4.jpg (100%) rename content/{misc/medien => media}/Buntes.Haus.Celle.Logo.5.jpg (100%) rename content/{misc/medien => media}/Buntes.Haus.Celle.Logo.5.png (100%) rename content/{misc/medien => media}/Buntes.Haus.Celle.Zeichnung.jpg (100%) create mode 100644 content/media/_index.de.md rename content/{misc/medien => media}/index.de.md (52%) create mode 100644 content/misc/_index.de.md delete mode 100644 content/misc/_index.md create mode 100644 content/news/_index.de.md create mode 100644 content/tools/_index.de.md create mode 100644 themes/buha/layouts/_default/_markup/render-heading.html create mode 100644 themes/buha/layouts/_default/_markup/render-image.html create mode 100644 themes/buha/layouts/partials/l1/archive.html rename themes/buha/layouts/partials/{layout/lists => l1}/article_list.html (92%) create mode 100644 themes/buha/layouts/partials/l1/contact.html create mode 100644 themes/buha/layouts/partials/l1/easy_list.html create mode 100644 themes/buha/layouts/partials/l1/imprint.html rename themes/buha/layouts/partials/{layout/single => l1}/links.html (50%) create mode 100644 themes/buha/layouts/partials/l1/media.html create mode 100644 themes/buha/layouts/partials/l1/newsletter.html rename themes/buha/layouts/partials/{layout/lists/section_list.html => l1/section_list} (100%) delete mode 100644 themes/buha/layouts/partials/layout/lists/taxonomies_list.html delete mode 100644 themes/buha/layouts/partials/layout/lists/term_list.html create mode 100644 themes/buha/layouts/partials/layout/single/nottranslated.html create mode 100644 themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp diff --git a/config.toml b/config.toml index fe97905..e932de0 100644 --- a/config.toml +++ b/config.toml @@ -27,7 +27,7 @@ featured = 'featured' [params] # keywords for seo keywords = "buntes haus celle, buntes haus, bunteshaus, celle, buntes haus e.V., www.bunteshaus.de, celle, punk, reggae, ska, konzerte, partys, soziokultur, soziokulturelles zentrum celle, elektro, electroe, jugendzentrum, celle, dum n bass, konzert, musik, politik, kultur, alternativ, cd kaserne celle, cd kaserne, plenum, celle, antifa, antira, anti akw, anti atom celle, veranstaltungen, infoladen, proberaum celle, archiv für neue soziale bewegungen in celle, hartz 4 IV beratung celle, skaten, graffiti, sprayen, kunst, fahrradwerkstatt, deka dance celle, dekadance, Revista, probably the friendliest Place on Earth" - debug = true + debug = false #do you want a contact page? contact = true diff --git a/content/about/_index.de.md b/content/about/_index.de.md index 6fb3665..804bf0f 100644 --- a/content/about/_index.de.md +++ b/content/about/_index.de.md @@ -1,5 +1,6 @@ --- title: "Über uns" +layout: "article_list" --- Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle. Wir leben vom mitmachen und so. diff --git a/content/archive/_index.de.md b/content/archive/_index.de.md index ba47535..7875694 100644 --- a/content/archive/_index.de.md +++ b/content/archive/_index.de.md @@ -1,3 +1,4 @@ --- -type: "archive" ---- \ No newline at end of file +title: "Archiv" +layout: "archive" +--- diff --git a/content/contact/_index.de.md b/content/contact/_index.de.md index 81eeabf..561ef6f 100644 --- a/content/contact/_index.de.md +++ b/content/contact/_index.de.md @@ -1,4 +1,5 @@ --- +title: "Kontakt" layout: "contact" --- -Konzerte: konzerte@bunteshaus.de \ No newline at end of file +Konzerte: konzerte@bunteshaus.de diff --git a/content/events/_index.de.md b/content/events/_index.de.md new file mode 100644 index 0000000..338976e --- /dev/null +++ b/content/events/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "EVENE" +layout: "article_list" +--- diff --git a/content/featured/_index.de.md b/content/featured/_index.de.md new file mode 100644 index 0000000..2f8dcb4 --- /dev/null +++ b/content/featured/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "featureds" +layout: "article_list" +--- diff --git a/content/imprint/_index.de.md b/content/imprint/_index.de.md index b6687eb..331aa1d 100644 --- a/content/imprint/_index.de.md +++ b/content/imprint/_index.de.md @@ -1,4 +1,5 @@ --- +title: "Impressum" layout: "imprint" --- Angaben gemäß § 5 TMG @@ -35,4 +36,4 @@ Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unt Die Nutzung unserer Webseite ist in der Regel ohne Angabe personenbezogener Daten möglich. Soweit auf unseren Seiten personenbezogene Daten (beispielsweise Name, Anschrift oder eMail-Adressen) erhoben werden, erfolgt dies, soweit möglich, stets auf freiwilliger Basis. Diese Daten werden ohne Ihre ausdrückliche Zustimmung nicht an Dritte weitergegeben. Wir weisen darauf hin, dass die Datenübertragung im Internet (z.B. bei der Kommunikation per E-Mail) Sicherheitslücken aufweisen kann. Ein lückenloser Schutz der Daten vor dem Zugriff durch Dritte ist nicht möglich. -Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen. Die Betreiber der Seiten behalten sich ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa durch Spam-Mails, vor. \ No newline at end of file +Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen. Die Betreiber der Seiten behalten sich ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa durch Spam-Mails, vor. diff --git a/content/links/_index.de.md b/content/links/_index.de.md new file mode 100644 index 0000000..23bcfd8 --- /dev/null +++ b/content/links/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Links" +layout: "links" +--- diff --git a/content/misc/medien/Buntes.Haus.Celle.Logo.1.jpg b/content/media/Buntes.Haus.Celle.Logo.1.jpg similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Logo.1.jpg rename to content/media/Buntes.Haus.Celle.Logo.1.jpg diff --git a/content/misc/medien/Buntes.Haus.Celle.Logo.2.jpg b/content/media/Buntes.Haus.Celle.Logo.2.jpg similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Logo.2.jpg rename to content/media/Buntes.Haus.Celle.Logo.2.jpg diff --git a/content/misc/medien/Buntes.Haus.Celle.Logo.3.jpg b/content/media/Buntes.Haus.Celle.Logo.3.jpg similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Logo.3.jpg rename to content/media/Buntes.Haus.Celle.Logo.3.jpg diff --git a/content/misc/medien/Buntes.Haus.Celle.Logo.4.jpg b/content/media/Buntes.Haus.Celle.Logo.4.jpg similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Logo.4.jpg rename to content/media/Buntes.Haus.Celle.Logo.4.jpg diff --git a/content/misc/medien/Buntes.Haus.Celle.Logo.5.jpg b/content/media/Buntes.Haus.Celle.Logo.5.jpg similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Logo.5.jpg rename to content/media/Buntes.Haus.Celle.Logo.5.jpg diff --git a/content/misc/medien/Buntes.Haus.Celle.Logo.5.png b/content/media/Buntes.Haus.Celle.Logo.5.png similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Logo.5.png rename to content/media/Buntes.Haus.Celle.Logo.5.png diff --git a/content/misc/medien/Buntes.Haus.Celle.Zeichnung.jpg b/content/media/Buntes.Haus.Celle.Zeichnung.jpg similarity index 100% rename from content/misc/medien/Buntes.Haus.Celle.Zeichnung.jpg rename to content/media/Buntes.Haus.Celle.Zeichnung.jpg diff --git a/content/media/_index.de.md b/content/media/_index.de.md new file mode 100644 index 0000000..f0b3e55 --- /dev/null +++ b/content/media/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Medien" +layout: "media" +--- diff --git a/content/misc/medien/index.de.md b/content/media/index.de.md similarity index 52% rename from content/misc/medien/index.de.md rename to content/media/index.de.md index eb783ca..534e0ef 100644 --- a/content/misc/medien/index.de.md +++ b/content/media/index.de.md @@ -1,7 +1,3 @@ ---- -title: "Medien" -date: 2021-06-22T23:00:00+02:00 ---- ![](0) ![](1) ![](2) diff --git a/content/misc/_index.de.md b/content/misc/_index.de.md new file mode 100644 index 0000000..e45f3bd --- /dev/null +++ b/content/misc/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Verschiedenes" +layout: "section_list" +--- diff --git a/content/misc/_index.md b/content/misc/_index.md deleted file mode 100644 index 9dca41f..0000000 --- a/content/misc/_index.md +++ /dev/null @@ -1,3 +0,0 @@ ---- -type: "misc" ---- diff --git a/content/news/_index.de.md b/content/news/_index.de.md new file mode 100644 index 0000000..c600675 --- /dev/null +++ b/content/news/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Neues" +layout: "article_list" +--- diff --git a/content/newsletter/_index.de.md b/content/newsletter/_index.de.md index f33cad9..0d71e63 100644 --- a/content/newsletter/_index.de.md +++ b/content/newsletter/_index.de.md @@ -1,5 +1,6 @@ --- title: "Newsletter" +layout: "newsletter" --- Wenn ihr in unseren Newsletter aufgenommen werden wollt, schickt uns eine email! diff --git a/content/tools/_index.de.md b/content/tools/_index.de.md new file mode 100644 index 0000000..658043e --- /dev/null +++ b/content/tools/_index.de.md @@ -0,0 +1,4 @@ +--- +title: "Tools" +layout: "section_list" +--- diff --git a/themes/buha/assets/css/layout.css b/themes/buha/assets/css/layout.css index deea30c..458351a 100644 --- a/themes/buha/assets/css/layout.css +++ b/themes/buha/assets/css/layout.css @@ -121,7 +121,6 @@ article { #articletext img { - border-radius: 15px; width: 80%; } @@ -209,6 +208,10 @@ input, textarea { border-radius: 15px; } +.borderrad4px { + border-radius: 4px; +} + .minmax { width: auto; max-width: auto; diff --git a/themes/buha/layouts/_default/_markup/render-heading.html b/themes/buha/layouts/_default/_markup/render-heading.html new file mode 100644 index 0000000..7afe29a --- /dev/null +++ b/themes/buha/layouts/_default/_markup/render-heading.html @@ -0,0 +1,7 @@ + {{ $url := (printf "%s#%s" .Page.Permalink .Anchor) | safeURL }} + + + + {{ .Text | safeHTML }} + + diff --git a/themes/buha/layouts/_default/_markup/render-image.html b/themes/buha/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..5b4116c --- /dev/null +++ b/themes/buha/layouts/_default/_markup/render-image.html @@ -0,0 +1,35 @@ +{{- if strings.HasPrefix .Destination "http" -}} + + {{ .Text }} +
{{ .Text }}
+
+{{- else -}} + {{ if .Page.Resources.ByType "image" }} + {{ $nr := .Destination }} + {{- $pic := index (.Page.Resources.ByType "image") (int $nr) -}} + {{- $image := .Page.Resources.GetMatch (printf "%s" ($pic | safeURL)) -}} +
+ + {{- $permalink := "" -}} + + {{- if ne $image nil -}} + {{- $permalink = $image.RelPermalink -}} + {{- else -}} + {{- $image = imageConfig (printf "static/%s" (.Destination | safeURL)) -}} + {{- $permalink = (printf "/%s" (.Destination | safeURL)) -}} + {{- end -}} + +
{{ .Text }}
+
{{ .Text }}
+
+
+ {{ end }} +{{- end -}} diff --git a/themes/buha/layouts/_default/list.html b/themes/buha/layouts/_default/list.html index 2f56718..55697de 100644 --- a/themes/buha/layouts/_default/list.html +++ b/themes/buha/layouts/_default/list.html @@ -4,32 +4,36 @@ {{ define "content" }} {{ partial "debug" (dict "context" . "caller" "list.html")}} - {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} - - {{ $partial := "layout/lists/article_list" }} + {{ $partial := "" }} {{ $title := "" }} {{ $pic := "true" }} - {{ if eq .Section "news" }} - {{- $pages = .Data.Pages -}} - {{ else if eq .Section "events" }} - {{- $pages = where $pages ".Params.when" "ne" nil -}} - {{ else if eq .Section "about" }} - {{- $pages = where $pages ".Params.about" "=" true -}} - {{ else if eq .Section "featured" }} - {{- $pages = where $pages ".Params.featured" "=" true -}} - {{ else if or (eq .Section "misc") (eq .Section "tools") }} - {{ $partial = "layout/lists/section_list" }} - {{ else if or (eq .Section "tags") (eq .Section "categories")}} - {{ $partial = "layout/lists/taxonomies_list" }} + {{ $pre := "l1" }} + {{ $part := .Layout }} + {{ $partial_before := "" }} + {{ if eq .Layout "article_list" }} + {{ if eq .Section "events" }} + {{- $pages = where $pages ".Params.when" "ne" nil -}} + {{ else if eq .Type "about" }} + {{- $pages = where $pages ".Params.about" "=" true -}} + {{ else if eq .Section "news" }} + {{- $pages = .Data.Pages -}} + {{ else if eq .Section "featured" }} + {{- $pages = where $pages ".Params.featured" "=" true -}} + {{ end }} + {{ else if or (eq .Layout "contact") (eq .Layout "imprint") }} + {{ $partial_before = "snippets/contact" }} {{ else }} - {{ $partial = "snippets/single_chooser" }} - {{ $pic = "false" }} + {{ if eq .Kind "term" }} + {{- $pages = .Data.Pages -}} + {{ $part = "easy_list" }} + {{ else if eq .Kind "taxonomy" }} + {{- $pages = .Data.Terms.Alphabetical -}} + {{ $part = "easy_list" }} + {{ end }} {{ end }} - {{ if eq .Kind "term" }} - {{- $pages = .Data.Pages -}} - {{ $partial = "layout/lists/term_list" }} + {{ if and $pre $part }} + {{ $partial := string (printf "%s/%s" $pre $part) }} + {{ partial $partial (dict "context" . "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic "type" .Type "partial_before" $partial_before) }} {{ end }} - {{ $partial := string $partial }} - {{ partial $partial (dict "context" . "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic) }} {{ end }} diff --git a/themes/buha/layouts/_default/single.html b/themes/buha/layouts/_default/single.html index 52a6422..ca72b71 100644 --- a/themes/buha/layouts/_default/single.html +++ b/themes/buha/layouts/_default/single.html @@ -3,5 +3,16 @@ {{ end }} {{ define "content" }} - {{ partial "snippets/single_chooser" (dict "context" . "pic" "true") }} + {{ partial "debug" (dict "context" . "caller" "single_chooser.html")}} + {{ $partial_before := "" }} + {{ $partial := "layout/single/article" }} + {{ $pic := "true" }} + {{ if eq .Params.tool "generator" }} + {{ $partial = "layout/single/generator" }} + {{ else if eq .Params.tool "nottranslated" }} + {{ $partial = "layout/single/nottranslated" }} + {{ end }} +
+ {{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before) }} +
{{ end }} diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index 5105020..997dbb9 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -13,10 +13,10 @@ {{ if ne .Content "" }} {{ partial "snippets/content" (dict "content" .Content) }} {{ end }} - {{ partial "layout/lists/article_list" (dict "context" . "pages" $featured "amount" "3" "title" "Featured") }} + {{ partial "l1/article_list" (dict "context" . "pages" $featured "amount" "3" "title" "Featured") }} {{ end }} {{ if gt (len $posts) 1 }} - {{ partial "layout/lists/article_list" (dict "context" . "paginator" $paginator "amount" "5" "title" "News") }} + {{ partial "l1/article_list" (dict "context" . "paginator" $paginator "amount" "5" "title" "News") }}
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
diff --git a/themes/buha/layouts/partials/l1/archive.html b/themes/buha/layouts/partials/l1/archive.html new file mode 100644 index 0000000..f28f6a5 --- /dev/null +++ b/themes/buha/layouts/partials/l1/archive.html @@ -0,0 +1,15 @@ +
+{{ partial "debug" (dict "context" . "caller" "archive.html" )}} +{{ $prev := 3000}} +{{range where site.RegularPages "Type" "in" site.Params.searchSections }} + {{ $date := .Date }} + {{ if gt $prev ($date.Format "2006") }} +

{{ $date.Format "2006" }}

+ {{end}} +
+ +
{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}

+
+ {{ $prev = $date.Format "2006"}} +{{end}} +
diff --git a/themes/buha/layouts/partials/layout/lists/article_list.html b/themes/buha/layouts/partials/l1/article_list.html similarity index 92% rename from themes/buha/layouts/partials/layout/lists/article_list.html rename to themes/buha/layouts/partials/l1/article_list.html index 44fae32..5598f5a 100644 --- a/themes/buha/layouts/partials/layout/lists/article_list.html +++ b/themes/buha/layouts/partials/l1/article_list.html @@ -10,7 +10,7 @@ {{ partial "snippets/content" (dict "content" .content) }} {{ end }} {{- if gt (len $pages) 0 -}} - {{ if .title }}

{{ .title }}

{{ end }} + {{ if .title }}

{{ .title }}

{{ end }} {{- range first $amount $pages -}}
diff --git a/themes/buha/layouts/partials/l1/contact.html b/themes/buha/layouts/partials/l1/contact.html new file mode 100644 index 0000000..d32809c --- /dev/null +++ b/themes/buha/layouts/partials/l1/contact.html @@ -0,0 +1,33 @@ +{{ $small := "solo" }} +{{ $big := "solo" }} +{{ $img := "" }} +{{ $thumb := "" }} +{{- if .context.Resources.ByType "image" -}} + {{- $img = index (.context.Resources.ByType "image") 0 -}} + {{- $thumb = $img.Resize "1024x" }} + {{ if .content }} + {{- $thumb = $img.Resize "500x" }} + {{ end }} +{{ end }} +{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}} + {{ $small = "multiple_small" }} + {{ $big = "multiple_big" }} +{{ else }} + {{ $small = "multiple_big"}} +{{ end }} +
+ {{ if and (ne $img "") (eq .pic true)}} + + {{ end }} +
+ {{ if .partial_before }} + {{ partial .partial_before (dict "context" .context "pic" .pic) }} + {{ end }} + {{ .content }} +
+
diff --git a/themes/buha/layouts/partials/l1/easy_list.html b/themes/buha/layouts/partials/l1/easy_list.html new file mode 100644 index 0000000..86f60a9 --- /dev/null +++ b/themes/buha/layouts/partials/l1/easy_list.html @@ -0,0 +1,6 @@ +
+{{ $type := .type }} +{{ range .pages }} + {{ .Page.Title }} {{ if eq $type "taxonomy"}}{{ .Count }}{{ end }} +{{ end }} +
diff --git a/themes/buha/layouts/partials/l1/imprint.html b/themes/buha/layouts/partials/l1/imprint.html new file mode 100644 index 0000000..d32809c --- /dev/null +++ b/themes/buha/layouts/partials/l1/imprint.html @@ -0,0 +1,33 @@ +{{ $small := "solo" }} +{{ $big := "solo" }} +{{ $img := "" }} +{{ $thumb := "" }} +{{- if .context.Resources.ByType "image" -}} + {{- $img = index (.context.Resources.ByType "image") 0 -}} + {{- $thumb = $img.Resize "1024x" }} + {{ if .content }} + {{- $thumb = $img.Resize "500x" }} + {{ end }} +{{ end }} +{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}} + {{ $small = "multiple_small" }} + {{ $big = "multiple_big" }} +{{ else }} + {{ $small = "multiple_big"}} +{{ end }} +
+ {{ if and (ne $img "") (eq .pic true)}} +
+ {{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} + + {{ if ne .type "list" }}{{ end }} + {{ if eq .type "article" }}{{ end }} +
+ {{ end }} +
+ {{ if .partial_before }} + {{ partial .partial_before (dict "context" .context "pic" .pic) }} + {{ end }} + {{ .content }} +
+
diff --git a/themes/buha/layouts/partials/layout/single/links.html b/themes/buha/layouts/partials/l1/links.html similarity index 50% rename from themes/buha/layouts/partials/layout/single/links.html rename to themes/buha/layouts/partials/l1/links.html index 066f09b..156030a 100644 --- a/themes/buha/layouts/partials/layout/single/links.html +++ b/themes/buha/layouts/partials/l1/links.html @@ -1,6 +1,6 @@ {{ range .context.Pages }} {{ end }} diff --git a/themes/buha/layouts/partials/l1/media.html b/themes/buha/layouts/partials/l1/media.html new file mode 100644 index 0000000..9f89d96 --- /dev/null +++ b/themes/buha/layouts/partials/l1/media.html @@ -0,0 +1,5 @@ +
+{{ range .context.Resources.ByType "image" }} + +{{ end }} +
diff --git a/themes/buha/layouts/partials/l1/newsletter.html b/themes/buha/layouts/partials/l1/newsletter.html new file mode 100644 index 0000000..d32809c --- /dev/null +++ b/themes/buha/layouts/partials/l1/newsletter.html @@ -0,0 +1,33 @@ +{{ $small := "solo" }} +{{ $big := "solo" }} +{{ $img := "" }} +{{ $thumb := "" }} +{{- if .context.Resources.ByType "image" -}} + {{- $img = index (.context.Resources.ByType "image") 0 -}} + {{- $thumb = $img.Resize "1024x" }} + {{ if .content }} + {{- $thumb = $img.Resize "500x" }} + {{ end }} +{{ end }} +{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}} + {{ $small = "multiple_small" }} + {{ $big = "multiple_big" }} +{{ else }} + {{ $small = "multiple_big"}} +{{ end }} +
+ {{ if and (ne $img "") (eq .pic true)}} +
+ {{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} + + {{ if ne .type "list" }}{{ end }} + {{ if eq .type "article" }}{{ end }} +
+ {{ end }} +
+ {{ if .partial_before }} + {{ partial .partial_before (dict "context" .context "pic" .pic) }} + {{ end }} + {{ .content }} +
+
diff --git a/themes/buha/layouts/partials/layout/lists/section_list.html b/themes/buha/layouts/partials/l1/section_list similarity index 100% rename from themes/buha/layouts/partials/layout/lists/section_list.html rename to themes/buha/layouts/partials/l1/section_list diff --git a/themes/buha/layouts/partials/layout/lists/taxonomies_list.html b/themes/buha/layouts/partials/layout/lists/taxonomies_list.html deleted file mode 100644 index 20d08c9..0000000 --- a/themes/buha/layouts/partials/layout/lists/taxonomies_list.html +++ /dev/null @@ -1,3 +0,0 @@ -{{ range .context.Data.Terms.Alphabetical }} -
  • {{ .Page.Title }} {{ .Count }}
  • -{{ end }} diff --git a/themes/buha/layouts/partials/layout/lists/term_list.html b/themes/buha/layouts/partials/layout/lists/term_list.html deleted file mode 100644 index b0bea2e..0000000 --- a/themes/buha/layouts/partials/layout/lists/term_list.html +++ /dev/null @@ -1,4 +0,0 @@ -{{ range .context.Pages }} - {{ .Title }}
    -{{ end }} - diff --git a/themes/buha/layouts/partials/layout/single/article.html b/themes/buha/layouts/partials/layout/single/article.html index 2fa9d92..bffc4db 100644 --- a/themes/buha/layouts/partials/layout/single/article.html +++ b/themes/buha/layouts/partials/layout/single/article.html @@ -29,9 +29,9 @@ {{ partial "snippets/article_metadata" $metas }}
    {{ if and (ne $img "") (eq .pic "true")}} -
    +
    {{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} - + {{ if ne .type "list" }}{{ end }} {{ if eq .type "article" }}{{ end }}
    diff --git a/themes/buha/layouts/partials/layout/single/content_single.html b/themes/buha/layouts/partials/layout/single/content_single.html index 363cc41..d32809c 100644 --- a/themes/buha/layouts/partials/layout/single/content_single.html +++ b/themes/buha/layouts/partials/layout/single/content_single.html @@ -17,9 +17,9 @@ {{ end }}
    {{ if and (ne $img "") (eq .pic true)}} -
    +
    {{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} - + {{ if ne .type "list" }}{{ end }} {{ if eq .type "article" }}{{ end }}
    diff --git a/themes/buha/layouts/partials/layout/single/nottranslated.html b/themes/buha/layouts/partials/layout/single/nottranslated.html new file mode 100644 index 0000000..9a16e2b --- /dev/null +++ b/themes/buha/layouts/partials/layout/single/nottranslated.html @@ -0,0 +1,25 @@ +{{ $l1 := slice }} +{{ $l2 := slice }} +{{ range $.Site.Home.Translations }} + {{ $l1 = $l1 | append .Language }} +{{ end }} + +{{ $all_lang := $.Site.Home.Translations }} +{{ range where site.RegularPages "Type" "in" site.Params.searchSections }} + {{ $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 }} diff --git a/themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp b/themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp new file mode 100644 index 0000000000000000000000000000000000000000..53d20ac60de3175383dda515abdcb32a1ae270ba GIT binary patch literal 259 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?Vn>DOLRpU-znd!F{OYvwcf%0{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
    +
    {{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
    {{ end }} {{ if .covid }}
    Covid: {{ .covid }}
    diff --git a/themes/buha/layouts/partials/snippets/contact.html b/themes/buha/layouts/partials/snippets/contact.html index d8b273c..296bceb 100644 --- a/themes/buha/layouts/partials/snippets/contact.html +++ b/themes/buha/layouts/partials/snippets/contact.html @@ -2,5 +2,5 @@ {{ site.Params.imprintdata.street }}
    {{ if i18n "pobox" }}{{ i18n "pobox" }}{{ else }}{{ "Po.Box" }}{{ end }} {{ site.Params.imprintdata.pobox }}
    {{ site.Params.imprintdata.city }}
    -{{ if site.Params.imprintdata.tel }}

    {{ if i18n "phone" }}{{ i18n "phone" }}{{ else }}{{ "phone" }}{{ end }}: {{ site.Params.imprintdata.tel }}

    {{ end }} +{{ if site.Params.imprintdata.tel }}

    {{ if i18n "phone" }}{{ i18n "phone" }}{{ else }}{{ "phone" }}{{ end }}: {{ site.Params.imprintdata.tel }}

    {{ end }} {{ if site.Params.imprintdata.mail }}

    {{ if i18n "mail" }}{{ i18n "mail" }}{{ else }}{{ "mail" }}{{ end }}: {{ site.Params.imprintdata.mail | markdownify }}{{ end }}

    diff --git a/themes/buha/layouts/partials/snippets/single_chooser.html b/themes/buha/layouts/partials/snippets/single_chooser.html index 0e05f2b..8f2ba07 100644 --- a/themes/buha/layouts/partials/snippets/single_chooser.html +++ b/themes/buha/layouts/partials/snippets/single_chooser.html @@ -2,20 +2,10 @@ {{ $partial_before := "" }} {{ $partial := "layout/single/article" }} {{ $pic := .pic }} - {{ if eq (lower .context.Section) "imprint" }} - {{ $partial_before = "snippets/contact" }} - {{ $partial = "layout/single/content_single" }} - {{ $pic = false }} - {{ else if eq (lower .context.Section) "contact" }} - {{ $partial_before = "snippets/contact" }} - {{ $partial = "layout/single/content_single" }} - {{ $pic = true }} - {{ else if eq (lower .context.Section) "links" }} - {{ $partial = "layout/single/links" }} - {{ else if eq (lower .context.Section) "archive" }} - {{ $partial = "layout/single/archive" }} - {{ else if eq .context.Title "Generator" }} + {{ if eq .context.Params.tool "generator" }} {{ $partial = "layout/single/generator" }} + {{ else if eq .context.Params.tool "nottranslated" }} + {{ $partial = "layout/single/nottranslated" }} {{ end }}
    {{ partial $partial (dict "context" .context "pic" $pic "content" .context.Content "partial_before" $partial_before) }}