diff --git a/config/_default/params.toml b/config/_default/params.toml index a51eb08..2aa9325 100644 --- a/config/_default/params.toml +++ b/config/_default/params.toml @@ -35,7 +35,7 @@ sourcecode = true mainMenu = ['about','news','events'] # in which section search for posts? -searchSections = ['news'] +searchSections = ['posts'] # category, which stands for your own things ownCategory = "Buha" diff --git a/content/posts/1996-03-16-Wie-soll-das-Cafe-heißen?-Namenssuche.../index.de.md b/content/posts/1996-03-16-Wie-soll-das-Cafe-heißen?-Namenssuche.../index.de.md index b06646f..93bbe61 100644 --- a/content/posts/1996-03-16-Wie-soll-das-Cafe-heißen?-Namenssuche.../index.de.md +++ b/content/posts/1996-03-16-Wie-soll-das-Cafe-heißen?-Namenssuche.../index.de.md @@ -1,5 +1,5 @@ --- title: "Wie soll das Cafe heißen? Namenssuche..." lastmod: 1996-03-26T14:00:00+02:00 -categories: ["Buha"] +news: ["Buha"] --- diff --git a/content/posts/1997-04-01-Programmflyer-April-Mai/index.de.md b/content/posts/1997-04-01-Programmflyer-April-Mai/index.de.md index a1e81a4..45edaa6 100644 --- a/content/posts/1997-04-01-Programmflyer-April-Mai/index.de.md +++ b/content/posts/1997-04-01-Programmflyer-April-Mai/index.de.md @@ -1,6 +1,6 @@ --- title: "Programmflyer April / Mai " lastmod: 1997-04-01T14:00:00+02:00 -categories: ["Buha"] +news: ["Buha"] tags: ["Programm"] --- diff --git a/content/posts/2000-06-01-Buntes-Haus-Aussenansicht/index.de.md b/content/posts/2000-06-01-Buntes-Haus-Aussenansicht/index.de.md index bf910bc..421eff3 100644 --- a/content/posts/2000-06-01-Buntes-Haus-Aussenansicht/index.de.md +++ b/content/posts/2000-06-01-Buntes-Haus-Aussenansicht/index.de.md @@ -1,6 +1,6 @@ --- title: "Buntes Haus Außenansicht - Jahr 2000" lastmod: 2000-06-01T14:00:00+02:00 -categories: ["Buha"] +news: ["Buha"] tags: ["Buntes Haus","Außenansicht","Geschichte des Bunten Hauses","Buntes Haus früher"] --- diff --git a/content/posts/2002-07-01-Buntes-Haus-Aussenansicht/index.de.md b/content/posts/2002-07-01-Buntes-Haus-Aussenansicht/index.de.md index e641ec1..fb4bf34 100644 --- a/content/posts/2002-07-01-Buntes-Haus-Aussenansicht/index.de.md +++ b/content/posts/2002-07-01-Buntes-Haus-Aussenansicht/index.de.md @@ -1,7 +1,7 @@ --- title: "Buntes Haus Außenansicht - Jahr 2002" lastmod: 2002-07-01T14:00:00+02:00 -categories: ["Buha"] +news: ["Buha"] tags: ["Außenansicht","Buntes Haus","Buntes Haus früher"] --- diff --git a/content/posts/2022-04-09-INK---Ein-Buntes-Haus-fuer-eine-tote-Stadt/index.de.md b/content/posts/2022-04-09-INK---Ein-Buntes-Haus-fuer-eine-tote-Stadt/index.de.md index fd03515..76d90e7 100644 --- a/content/posts/2022-04-09-INK---Ein-Buntes-Haus-fuer-eine-tote-Stadt/index.de.md +++ b/content/posts/2022-04-09-INK---Ein-Buntes-Haus-fuer-eine-tote-Stadt/index.de.md @@ -1,5 +1,5 @@ --- title: "INK - Ein Buntes Haus für eine tote Stadt" -categories: ["Buha"] +news: ["Buha"] lastmod: 1994-03-04T14:00:00+02:00 --- diff --git a/content/posts/2022-04-10-Matrix-Space/index.de.md b/content/posts/2022-04-10-Matrix-Space/index.de.md index e81d7ff..0d51ec3 100644 --- a/content/posts/2022-04-10-Matrix-Space/index.de.md +++ b/content/posts/2022-04-10-Matrix-Space/index.de.md @@ -1,7 +1,7 @@ --- title: "Matrix Space" date: "2022-04-11T20:37:00+02:00" -categories: ["Buha"] +news: ["Buha"] featured: true --- Wir betreiben einen Space im Matrix Netzwerk. diff --git a/content/posts/plenum/index.de.md b/content/posts/plenum/index.de.md index 7b81ca2..76aaf13 100644 --- a/content/posts/plenum/index.de.md +++ b/content/posts/plenum/index.de.md @@ -4,7 +4,7 @@ date: 1993-09-04T19:00:00+02:00 lastmod: 1993-09-04T19:00:00+02:00 when: "jeden Monat am ersten und dritten Donnerstag, 19:00Uhr" about: true -categories: ["Buha"] +news: ["Buha"] recurrent: true tags: [ "Plenum" ] covid: "3g" diff --git a/themes/buha/layouts/_default/taxonomy.html b/themes/buha/layouts/_default/taxonomy.html new file mode 100644 index 0000000..ad26e98 --- /dev/null +++ b/themes/buha/layouts/_default/taxonomy.html @@ -0,0 +1,12 @@ +{{ define "content" }} +
+ {{ if eq .Kind "taxonomy" }} + {{ range .Pages }} + {{ .Page.Title }} + {{ end }} + {{ else }} + {{- $pages := .Data.Pages -}} + {{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }} + {{ end }} +
+{{ end }} diff --git a/themes/buha/layouts/about/list.html b/themes/buha/layouts/about/list.html index 2710de0..f92dcad 100644 --- a/themes/buha/layouts/about/list.html +++ b/themes/buha/layouts/about/list.html @@ -6,11 +6,11 @@ {{ define "content" }} - {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} + {{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}} {{- $paginator := "" -}} {{- $partial := "gen_list" -}} {{- $paginate := true -}} - {{- $pages = (where $pages ".Params.about" "=" true) -}} + {{- $pages = where $pages ".Params.about" "=" true -}} {{ $partial = string (printf "news/%s" $partial) }} {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} diff --git a/themes/buha/layouts/events/list.html b/themes/buha/layouts/events/list.html index 1495f1d..163913b 100644 --- a/themes/buha/layouts/events/list.html +++ b/themes/buha/layouts/events/list.html @@ -5,18 +5,12 @@ {{ end }} {{ define "content" }} - {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} - {{- $paginator := "" -}} - {{- $partial := "gen_list" -}} - {{- $paginate := true -}} + {{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}} {{- $pages = where $pages ".Params.when" "ne" nil -}} - - {{ $partial = string (printf "news/%s" $partial) }} - {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} + {{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }} {{ end }} {{ define "sidebar" }} - {{ if gt .Site.Taxonomies.events 0 }} - {{ end }} {{ end }} diff --git a/themes/buha/layouts/news/list.html b/themes/buha/layouts/news/list.html index 1e56a30..c8426dc 100644 --- a/themes/buha/layouts/news/list.html +++ b/themes/buha/layouts/news/list.html @@ -5,21 +5,13 @@ {{ end }} {{ define "content" }} - {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}} - {{- $paginator := "" -}} - {{- $partial := "gen_list" -}} - {{- $paginate := true -}} - {{- $pages = where $pages ".Params.news" "ne" nil -}} - - {{ $partial = string (printf "news/%s" $partial) }} - {{ partial $partial (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" $paginate) }} + {{- $pages := where .Site.RegularPages "Section" "in" .Site.Params.searchSections -}} + {{ partial "news/gen_list" (dict "context" . "pages" $pages "content" .Content "type" .Type "paginate" true) }} {{ end }} {{ define "sidebar" }} - {{ if gt .Site.Taxonomies.news 0 }} - {{ end }} {{ end }} diff --git a/themes/buha/layouts/posts/single.html b/themes/buha/layouts/posts/single.html new file mode 100644 index 0000000..57b389e --- /dev/null +++ b/themes/buha/layouts/posts/single.html @@ -0,0 +1,147 @@ +{{ define "content" }} +
+ {{ $metas := dict "when" .Params.when "price" .Params.price "contact_mail" .Params.contact_mail "covid" .Params.covid "insta" .Params.insta }} + {{ $banner := slice }} + {{ $image := slice }} + {{ $thumb := "" }} + {{ if .Resources.GetMatch "banner*" }} + {{ $banner = slice (.Resources.GetMatch "banner*") }} + {{ end }} + {{ if .Resources.ByType "image" }} + {{ $image = .Resources.ByType "image" }} + {{ end }} + {{ $image = (index (complement $banner $image) 0) }} + {{ if $banner }} + {{ $image = (index $banner 0) }} + {{ end }} + {{ $image = .Resources.GetMatch (string $image) }} + {{ if ne $image nil }} + {{ $thumb1 := $image.Fill "1280x480 smart"}} + {{ $thumb = $image}} + {{ end }} + + + {{ partial "snippets/article_metadata" $metas }} + + {{- if .Description -}} +

{{ .Description }}

+ {{ end }} + + {{ $count_href := .TableOfContents | strings.Count "href" }} + {{ if ge $count_href 4 }} +
+ Inhaltsverzeichnis +
+ {{ .TableOfContents }} +
+
+ {{ end }} + + {{ $content := .Content }} + + {{ if or .Content (.Resources.ByType "image")}} +
+ {{- if .Content -}} + {{- $content -}} + {{ end }} + {{ if .Resources.ByType "image" }} + {{ range .Resources.ByType "image" }} + {{ $picname := . }} + {{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}} + + {{ . }}
+
+ {{ end }} + {{ end }} + {{ end }} +
+ {{ end }} +
+{{ end }} + +{{ define "sidebar" }} + {{ if ne .Type "tools" }} + + {{ end }} +{{ end }} + +{{ define "inner_footer" }} + {{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }} +
+ {{ with .Params.foundations }} +
Träger der Veranstaltung:
+
+ {{ range . }} + {{ $l := . }} + {{ $url := "" }} + {{ if isset site.Params.foundations $l }} + {{ $url = index site.Params.foundations $l }} + {{ end }} + + + {{- $res_im := resources.GetMatch (printf "/images/foundations/%s*" $l ) -}} + {{ if $res_im }} +
+ {{ if $url }}{{ end }} {{ if $url }}{{ end }} +
+ {{ else }} + {{ if eq hugo.Environment "development" }} +
+ assets/images/foundations/{{- $l -}} .* missing +
+ {{ else }} + picture missing. + {{ end }} + {{ end }} + {{ end }} +
+ {{ end }} +
+
+
{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}:
+
{{ .Date | time.Format ":date_full" }}
+
+ {{ if ne .Date .Lastmod }} +
+
{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}:
+
{{ .Lastmod | time.Format ":date_full" }}
+
+ {{ end }} +
+
+ {{ end }} +{{ end }}