From ed197255c71cd0cea116510ab03397135426924a Mon Sep 17 00:00:00 2001 From: teldra Date: Sun, 27 Mar 2022 14:24:21 +0200 Subject: [PATCH] small fixes --- config.toml | 2 +- content/_index.de.md | 5 -- content/about/_index.de.md | 10 ++++ .../{bunteshaus => about}/cafe/index.de.md | 0 .../cafe/offenes_cafe.jpeg | Bin .../finanzen/index.de.md | 0 .../finanzen/ueberuns_finanzen.jpg | Bin .../{bunteshaus => about}/foodsaving/1.jpg | Bin .../{bunteshaus => about}/foodsaving/2.jpg | Bin .../foodsaving/index.de.md | 0 .../geschichte/index.de.md | 0 .../geschichte/ueberuns_naafi_aussen.jpg | Bin content/{bunteshaus => about}/homepage/1.jpg | Bin content/{bunteshaus => about}/homepage/2.jpg | Bin .../homepage/index.de.md | 0 content/{bunteshaus => about}/plenum/1.jpg | Bin .../{bunteshaus => about}/plenum/index.de.md | 0 .../{bunteshaus => about}/plenum/index.ku.md | 0 .../{bunteshaus => about}/revista/index.de.md | 0 .../{bunteshaus => about}/revista/logo.png | Bin .../index.de.md | 0 .../ueberuns_kaospilot.jpg | Bin .../soziokultur/index.de.md | 0 .../soziokultur/ueberuns_naafi_ge.jpg | Bin .../umsonstladen/index.de.md | 0 .../events/01.08.2021-Saubermachen/index.md | 2 +- content/featured/_index.de.md | 3 + content/recurrent/_index.de.md | 3 + themes/buha/assets/css/layout.css | 2 + themes/buha/i18n/de.toml | 8 ++- themes/buha/layouts/_default/categories.html | 1 + themes/buha/layouts/_default/list.html | 25 ++++++-- themes/buha/layouts/index.html | 56 +++++++++++++++++- themes/buha/layouts/partials/header.html | 2 + themes/buha/layouts/partials/sidebar.html | 34 ++++------- 35 files changed, 114 insertions(+), 39 deletions(-) create mode 100644 content/about/_index.de.md rename content/{bunteshaus => about}/cafe/index.de.md (100%) rename content/{bunteshaus => about}/cafe/offenes_cafe.jpeg (100%) rename content/{bunteshaus => about}/finanzen/index.de.md (100%) rename content/{bunteshaus => about}/finanzen/ueberuns_finanzen.jpg (100%) rename content/{bunteshaus => about}/foodsaving/1.jpg (100%) rename content/{bunteshaus => about}/foodsaving/2.jpg (100%) rename content/{bunteshaus => about}/foodsaving/index.de.md (100%) rename content/{bunteshaus => about}/geschichte/index.de.md (100%) rename content/{bunteshaus => about}/geschichte/ueberuns_naafi_aussen.jpg (100%) rename content/{bunteshaus => about}/homepage/1.jpg (100%) rename content/{bunteshaus => about}/homepage/2.jpg (100%) rename content/{bunteshaus => about}/homepage/index.de.md (100%) rename content/{bunteshaus => about}/plenum/1.jpg (100%) rename content/{bunteshaus => about}/plenum/index.de.md (100%) rename content/{bunteshaus => about}/plenum/index.ku.md (100%) rename content/{bunteshaus => about}/revista/index.de.md (100%) rename content/{bunteshaus => about}/revista/logo.png (100%) rename content/{bunteshaus => about}/selbstbestimmung-selbstverwaltung/index.de.md (100%) rename content/{bunteshaus => about}/selbstbestimmung-selbstverwaltung/ueberuns_kaospilot.jpg (100%) rename content/{bunteshaus => about}/soziokultur/index.de.md (100%) rename content/{bunteshaus => about}/soziokultur/ueberuns_naafi_ge.jpg (100%) rename content/{bunteshaus => about}/umsonstladen/index.de.md (100%) create mode 100644 content/featured/_index.de.md create mode 100644 content/recurrent/_index.de.md create mode 100644 themes/buha/layouts/_default/categories.html diff --git a/config.toml b/config.toml index 26fd355a..65e3cec2 100644 --- a/config.toml +++ b/config.toml @@ -21,7 +21,7 @@ copyright = "bunteshaus.de" # do you want an imprint? imprint = true - mainSections = ['bunteshaus','events','news'] + mainSections = ['about','events','news'] # data for your imprint and contact page [params.imprintdata] diff --git a/content/_index.de.md b/content/_index.de.md index f861ef9e..83068edd 100644 --- a/content/_index.de.md +++ b/content/_index.de.md @@ -1,8 +1,3 @@ --- title: "Willkommen" --- -Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle. -Wir leben vom mitmachen und so. -Lerne unsere [Projekte](/bunteshaus/) kennen und schau, was wir unter [Selbstbestimmung](/bunteshaus/selbstbestimmung-selbstverwaltung) verstehen oder wie wir uns [organisieren](/bunteshaus/plenum). - -Wir machen Dinge und andere Dinge. Dabei verteilen wir Essen, organisieren Partys und machen Musik. \ No newline at end of file diff --git a/content/about/_index.de.md b/content/about/_index.de.md new file mode 100644 index 00000000..c6ffb69a --- /dev/null +++ b/content/about/_index.de.md @@ -0,0 +1,10 @@ +--- +title: "About" +--- +Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle. +Wir leben vom mitmachen und so. +Lerne unsere [Projekte](/bunteshaus/) kennen und schau, was wir unter [Selbstbestimmung](/bunteshaus/selbstbestimmung-selbstverwaltung) verstehen oder wie wir uns [organisieren](/bunteshaus/plenum). + +Wir machen Dinge und andere Dinge. Dabei verteilen wir Essen, organisieren Partys und machen Musik. + +## Hier sind Details aller Projekte: \ No newline at end of file diff --git a/content/bunteshaus/cafe/index.de.md b/content/about/cafe/index.de.md similarity index 100% rename from content/bunteshaus/cafe/index.de.md rename to content/about/cafe/index.de.md diff --git a/content/bunteshaus/cafe/offenes_cafe.jpeg b/content/about/cafe/offenes_cafe.jpeg similarity index 100% rename from content/bunteshaus/cafe/offenes_cafe.jpeg rename to content/about/cafe/offenes_cafe.jpeg diff --git a/content/bunteshaus/finanzen/index.de.md b/content/about/finanzen/index.de.md similarity index 100% rename from content/bunteshaus/finanzen/index.de.md rename to content/about/finanzen/index.de.md diff --git a/content/bunteshaus/finanzen/ueberuns_finanzen.jpg b/content/about/finanzen/ueberuns_finanzen.jpg similarity index 100% rename from content/bunteshaus/finanzen/ueberuns_finanzen.jpg rename to content/about/finanzen/ueberuns_finanzen.jpg diff --git a/content/bunteshaus/foodsaving/1.jpg b/content/about/foodsaving/1.jpg similarity index 100% rename from content/bunteshaus/foodsaving/1.jpg rename to content/about/foodsaving/1.jpg diff --git a/content/bunteshaus/foodsaving/2.jpg b/content/about/foodsaving/2.jpg similarity index 100% rename from content/bunteshaus/foodsaving/2.jpg rename to content/about/foodsaving/2.jpg diff --git a/content/bunteshaus/foodsaving/index.de.md b/content/about/foodsaving/index.de.md similarity index 100% rename from content/bunteshaus/foodsaving/index.de.md rename to content/about/foodsaving/index.de.md diff --git a/content/bunteshaus/geschichte/index.de.md b/content/about/geschichte/index.de.md similarity index 100% rename from content/bunteshaus/geschichte/index.de.md rename to content/about/geschichte/index.de.md diff --git a/content/bunteshaus/geschichte/ueberuns_naafi_aussen.jpg b/content/about/geschichte/ueberuns_naafi_aussen.jpg similarity index 100% rename from content/bunteshaus/geschichte/ueberuns_naafi_aussen.jpg rename to content/about/geschichte/ueberuns_naafi_aussen.jpg diff --git a/content/bunteshaus/homepage/1.jpg b/content/about/homepage/1.jpg similarity index 100% rename from content/bunteshaus/homepage/1.jpg rename to content/about/homepage/1.jpg diff --git a/content/bunteshaus/homepage/2.jpg b/content/about/homepage/2.jpg similarity index 100% rename from content/bunteshaus/homepage/2.jpg rename to content/about/homepage/2.jpg diff --git a/content/bunteshaus/homepage/index.de.md b/content/about/homepage/index.de.md similarity index 100% rename from content/bunteshaus/homepage/index.de.md rename to content/about/homepage/index.de.md diff --git a/content/bunteshaus/plenum/1.jpg b/content/about/plenum/1.jpg similarity index 100% rename from content/bunteshaus/plenum/1.jpg rename to content/about/plenum/1.jpg diff --git a/content/bunteshaus/plenum/index.de.md b/content/about/plenum/index.de.md similarity index 100% rename from content/bunteshaus/plenum/index.de.md rename to content/about/plenum/index.de.md diff --git a/content/bunteshaus/plenum/index.ku.md b/content/about/plenum/index.ku.md similarity index 100% rename from content/bunteshaus/plenum/index.ku.md rename to content/about/plenum/index.ku.md diff --git a/content/bunteshaus/revista/index.de.md b/content/about/revista/index.de.md similarity index 100% rename from content/bunteshaus/revista/index.de.md rename to content/about/revista/index.de.md diff --git a/content/bunteshaus/revista/logo.png b/content/about/revista/logo.png similarity index 100% rename from content/bunteshaus/revista/logo.png rename to content/about/revista/logo.png diff --git a/content/bunteshaus/selbstbestimmung-selbstverwaltung/index.de.md b/content/about/selbstbestimmung-selbstverwaltung/index.de.md similarity index 100% rename from content/bunteshaus/selbstbestimmung-selbstverwaltung/index.de.md rename to content/about/selbstbestimmung-selbstverwaltung/index.de.md diff --git a/content/bunteshaus/selbstbestimmung-selbstverwaltung/ueberuns_kaospilot.jpg b/content/about/selbstbestimmung-selbstverwaltung/ueberuns_kaospilot.jpg similarity index 100% rename from content/bunteshaus/selbstbestimmung-selbstverwaltung/ueberuns_kaospilot.jpg rename to content/about/selbstbestimmung-selbstverwaltung/ueberuns_kaospilot.jpg diff --git a/content/bunteshaus/soziokultur/index.de.md b/content/about/soziokultur/index.de.md similarity index 100% rename from content/bunteshaus/soziokultur/index.de.md rename to content/about/soziokultur/index.de.md diff --git a/content/bunteshaus/soziokultur/ueberuns_naafi_ge.jpg b/content/about/soziokultur/ueberuns_naafi_ge.jpg similarity index 100% rename from content/bunteshaus/soziokultur/ueberuns_naafi_ge.jpg rename to content/about/soziokultur/ueberuns_naafi_ge.jpg diff --git a/content/bunteshaus/umsonstladen/index.de.md b/content/about/umsonstladen/index.de.md similarity index 100% rename from content/bunteshaus/umsonstladen/index.de.md rename to content/about/umsonstladen/index.de.md diff --git a/content/events/01.08.2021-Saubermachen/index.md b/content/events/01.08.2021-Saubermachen/index.md index 21c3ce16..4c5016fb 100644 --- a/content/events/01.08.2021-Saubermachen/index.md +++ b/content/events/01.08.2021-Saubermachen/index.md @@ -6,6 +6,6 @@ recurrent: false price: "free" covid: "" register: "" -categories: "Party" +categories: ["Party"] tags: ["",] --- diff --git a/content/featured/_index.de.md b/content/featured/_index.de.md new file mode 100644 index 00000000..187e6943 --- /dev/null +++ b/content/featured/_index.de.md @@ -0,0 +1,3 @@ +--- +title: "featured" +--- diff --git a/content/recurrent/_index.de.md b/content/recurrent/_index.de.md new file mode 100644 index 00000000..0c0479ee --- /dev/null +++ b/content/recurrent/_index.de.md @@ -0,0 +1,3 @@ +--- +title: "recurrent" +--- diff --git a/themes/buha/assets/css/layout.css b/themes/buha/assets/css/layout.css index 32dbaa4c..1a03db5e 100644 --- a/themes/buha/assets/css/layout.css +++ b/themes/buha/assets/css/layout.css @@ -184,6 +184,8 @@ article h3 { flex-direction: column; min-width: 15%; min-height: 100vh; + margin-top: 1rem; + margin-right: .5rem; } footer { diff --git a/themes/buha/i18n/de.toml b/themes/buha/i18n/de.toml index fe492752..c0e7c0f8 100644 --- a/themes/buha/i18n/de.toml +++ b/themes/buha/i18n/de.toml @@ -227,4 +227,10 @@ other = "Eintritt ist kostenlos." other = "Anstehende Events" [readmore] -other = "weiterlesen" \ No newline at end of file +other = "weiterlesen" + +[about] +other = "Über uns" + +[featured] +other = "wichtig" \ No newline at end of file diff --git a/themes/buha/layouts/_default/categories.html b/themes/buha/layouts/_default/categories.html new file mode 100644 index 00000000..9118d6c9 --- /dev/null +++ b/themes/buha/layouts/_default/categories.html @@ -0,0 +1 @@ +asdasd \ No newline at end of file diff --git a/themes/buha/layouts/_default/list.html b/themes/buha/layouts/_default/list.html index 7c838ccf..8ed0ff77 100644 --- a/themes/buha/layouts/_default/list.html +++ b/themes/buha/layouts/_default/list.html @@ -1,17 +1,32 @@ {{- define "title" -}} - {{- $name := .Name -}} - {{- if lower $name | i18n -}} - {{- $name = lower $name | i18n -}} - {{- end -}} - {{- $name | humanize -}} + {{- $name := .Name | lower -}} + {{ if ne .Section "events" }} + {{ $name = $name | singularize }} + {{ end }} + {{ if ne ($name | i18n) "" }} + {{ $name = $name | i18n }} + {{ end }} + {{ $name = $name | humanize }} + {{ $name }} {{- end -}} {{- define "main" -}} + {{ $s := .Site.Params }} + {{ if ne .Content "" }} +
+ {{ .Content }} +
+ {{ end }} {{- $paginator := slice -}} + {{- $posts := where .Site.RegularPages "Type" "in" $s.mainSections }} {{- if eq .Section "events" -}} {{- $paginator = .Paginate (where site.RegularPages.ByLastmod.Reverse ".Params.when" "ne" nil) -}} {{- else if eq .Section "news" }} {{- $paginator = .Paginate (where (where .Site.RegularPages.ByLastmod.Reverse "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.mainSections) }} + {{- else if eq .Section "featured" }} + {{- $paginator = .Paginate (where $posts "Params.featured" true) -}} + {{- else if eq .Section "recurrent" }} + {{- $paginator = .Paginate (where .Site.RegularPages "Params.recurrent" true) -}} {{- else -}} {{- $paginator = .Paginate .RegularPagesRecursive.ByLastmod.Reverse -}} {{- end -}} diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index bfbe3397..5d10814b 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -3,12 +3,64 @@ {{ end }} {{ define "main" }} +{{ if ne .Content "" }}
{{ .Content }}
-

{{ "news" | T }}

+{{ end }} +

{{ "featured" | T | humanize }}

+{{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "=" true) }} +
+
+

{{- .Title -}}

+
+
+
+ {{ if and (ne .Params.when "") (ne .Params.when nil) }} +
{{ .Params.when }}
+ {{ end }} + {{ if and (ne .Params.price "") (ne .Params.price nil) }} + {{ if eq .Params.price "free" }} +
Der Eintritt ist frei.
+ {{ else }} +
Eintritt: {{ .Params.price }}
+ {{ end }} + {{ end }} +
+
+
+ {{- if .Resources.ByType "image" -}} + {{- $pic := index (.Resources.ByType "image") 0 -}} + {{ $thumb := "" }} + {{ if eq .Content "" }} +
+ {{- $thumb = $pic.Resize "1024x" }} + {{ else }} +
+ {{- $thumb = $pic.Resize "2048x" }} + {{ end }} + + +
+ {{- end }} +
+ {{- if .Params.description -}} + {{- .Params.description -}} + {{- else -}} + {{- .Summary -}} + {{- end }} + {{ if .Truncated }} +
{{- i18n "readmore" -}}..
+ {{ end }} +
+
+
+
+
+{{ end }} +

{{ "news" | T }}

{{ $s := .Site.Params }} - {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }} + {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }} {{- $paginator := slice -}} {{- $paginator = .Paginate $posts.ByLastmod.Reverse -}} {{- range first 5 $paginator.Pages -}} diff --git a/themes/buha/layouts/partials/header.html b/themes/buha/layouts/partials/header.html index 4be9c6ec..319b1377 100644 --- a/themes/buha/layouts/partials/header.html +++ b/themes/buha/layouts/partials/header.html @@ -4,11 +4,13 @@ diff --git a/themes/buha/layouts/partials/sidebar.html b/themes/buha/layouts/partials/sidebar.html index baafc287..ed4b517c 100644 --- a/themes/buha/layouts/partials/sidebar.html +++ b/themes/buha/layouts/partials/sidebar.html @@ -8,33 +8,19 @@ {{ end }} {{ end }} {{ if $true }} -

{{ T "categories" }}

+ + {{- $featured := where .Site.RegularPages "Params.featured" true }} + {{ if $featured }} +
  • {{ "featured" | T | humanize }}
  • + {{ end }} + {{- $recurrent := where .Site.RegularPages "Params.recurrent" true }} + {{ if $recurrent }} +
  • {{ "recurrent" | T | humanize }}
  • + {{ end }} {{ range $taxonomyname, $taxonomy := where .Site.Taxonomies.categories ".Page.Section" .Section }}
  • {{ $taxonomyname | humanize }}
  • {{ end }} - {{ end }} - {{ end }} - - - - - + {{ end }}