diff --git a/config.toml b/config.toml index fe979051..e932de06 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 6fb36659..804bf0f4 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 ba475354..78756941 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 81eeabf4..561ef6fa 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 00000000..338976ee --- /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 00000000..2f8dcb43 --- /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 b6687eb9..331aa1d1 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 00000000..23bcfd8b --- /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 00000000..f0b3e55d --- /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 eb783ca7..534e0ef9 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 00000000..e45f3bd8 --- /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 9dca41f3..00000000 --- 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 00000000..c6006750 --- /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 f33cad99..0d71e630 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 00000000..658043e0 --- /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 deea30cf..458351a0 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 00000000..7afe29a0 --- /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 00000000..5b4116c3 --- /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 2f567189..55697de3 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 52a6422f..ca72b71c 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 5105020b..997dbb94 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 00000000..f28f6a54 --- /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 44fae329..5598f5a2 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 00000000..d32809c9 --- /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 00000000..86f60a96 --- /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 00000000..d32809c9 --- /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 066f09b1..156030af 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 }}
- {{ .Params.link }} + {{ .Params.link }} {{ .Title }}
{{ end }} diff --git a/themes/buha/layouts/partials/l1/media.html b/themes/buha/layouts/partials/l1/media.html new file mode 100644 index 00000000..9f89d962 --- /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 00000000..d32809c9 --- /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 20d08c98..00000000 --- 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 b0bea2e3..00000000 --- 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 2fa9d921..bffc4db2 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 363cc41a..d32809c9 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 00000000..9a16e2b1 --- /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 00000000..53d20ac6 Binary files /dev/null and b/themes/buha/layouts/partials/snippets/.single_chooser.html.kate-swp differ diff --git a/themes/buha/layouts/partials/snippets/article_metadata.html b/themes/buha/layouts/partials/snippets/article_metadata.html index 916668c7..77514389 100644 --- a/themes/buha/layouts/partials/snippets/article_metadata.html +++ b/themes/buha/layouts/partials/snippets/article_metadata.html @@ -12,7 +12,7 @@ {{ end }} {{ end }} {{ if .contact }} -
    {{ 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 d8b273c9..296bceb8 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 0e05f2bf..8f2ba07f 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) }}