From af42e4acd4773bf6fe7547004b8a70537f9b451a Mon Sep 17 00:00:00 2001 From: teldra Date: Fri, 8 Apr 2022 13:22:50 +0200 Subject: [PATCH] small fixes --- content/_index.de.md | 2 +- content/_index.en.md | 2 +- content/archive/_index.en.md | 3 + content/archive/_index.ku.md | 3 + content/links/list.md | 4 ++ content/misc/{_index.de.md => _index.md} | 0 docs/todo.de | 4 -- themes/buha/i18n/de.toml | 3 + themes/buha/layouts/_default/links.html | 10 +-- themes/buha/layouts/_default/misc.html | 3 +- themes/buha/layouts/_default/rss.xml | 17 ++++- themes/buha/layouts/index.html | 25 ++++---- .../partials/contentlayouts/article.html | 10 +-- .../layouts/partials/contentlayouts/list.html | 63 +++++++------------ themes/buha/layouts/partials/misc/form.html | 8 +-- .../layouts/partials/structure/footer.html | 21 ++++--- .../layouts/partials/structure/header.html | 6 +- .../layouts/partials/structure/langs.html | 2 +- 18 files changed, 97 insertions(+), 89 deletions(-) create mode 100644 content/archive/_index.en.md create mode 100644 content/archive/_index.ku.md create mode 100644 content/links/list.md rename content/misc/{_index.de.md => _index.md} (100%) diff --git a/content/_index.de.md b/content/_index.de.md index a66dcf5..577d640 100644 --- a/content/_index.de.md +++ b/content/_index.de.md @@ -3,4 +3,4 @@ title: "Willkommen" --- Wir sind das Buntehaus, ein soziokulturelles Zentrum in Celle. Wir leben vom mitmachen und so. -Lerne unsere [Projekte](/de/about) kennen. \ No newline at end of file +Lerne unsere [Projekte](/about) kennen. diff --git a/content/_index.en.md b/content/_index.en.md index 3e293e7..3752fec 100644 --- a/content/_index.en.md +++ b/content/_index.en.md @@ -3,4 +3,4 @@ title: "Welcome" --- We are the "Buntehaus", a sociocultural center in Celle. We live from participating and stuff like that. -Get to know our [projects](/en/about). \ No newline at end of file +Get to know our [projects](/en/about). diff --git a/content/archive/_index.en.md b/content/archive/_index.en.md new file mode 100644 index 0000000..ba47535 --- /dev/null +++ b/content/archive/_index.en.md @@ -0,0 +1,3 @@ +--- +type: "archive" +--- \ No newline at end of file diff --git a/content/archive/_index.ku.md b/content/archive/_index.ku.md new file mode 100644 index 0000000..ba47535 --- /dev/null +++ b/content/archive/_index.ku.md @@ -0,0 +1,3 @@ +--- +type: "archive" +--- \ No newline at end of file diff --git a/content/links/list.md b/content/links/list.md new file mode 100644 index 0000000..4fbb592 --- /dev/null +++ b/content/links/list.md @@ -0,0 +1,4 @@ +--- +title: "Gruppe LiST: Land in Sicht - Transition Celle" +link: "http://list-celle.over-blog.com/" +--- diff --git a/content/misc/_index.de.md b/content/misc/_index.md similarity index 100% rename from content/misc/_index.de.md rename to content/misc/_index.md diff --git a/docs/todo.de b/docs/todo.de index a5fb343..45bcbe7 100644 --- a/docs/todo.de +++ b/docs/todo.de @@ -1,16 +1,12 @@ todo buha.de -- einen weg finden, die seiten contact, archive und imprint buildin zu machen - anleitung git proxy fuer tor - eintritt "gegen spende" - covid regel verfeinern -- kontakt info@bunteshaus.de (aus den site params) etablieren -- rss fixen, so dass alle sectionen und taxonomies verarbeitet werden - diskutieren, ob jede aenderung via rss raus soll (lastmod vs einmalig) - translations: english default - generator form: aus mc ein checkbox machen und kategorien und/oder eventkategorien soloauswaehlbar machen. - sollte kein bild gefunden werden, wird ein standard bild verwendet. (diskutabel, hat vor und nachteile. man kann aber auch ein pool bereitstellen, je nach kategorie? im generator auswaehlen?) - diskutieren, in welcher reihenfolge artikel angezeigt werden sollen. -- checke lastmod reihenfolge :git:frontmatter:etc - dokumentiere, das artikel der alten homepage "lastmod" mit demgenau bis ungefaehren datum der damligen erstellung, im frontmatter haben sollten, wann sie erstellt wurden. diff --git a/themes/buha/i18n/de.toml b/themes/buha/i18n/de.toml index a9575f8..cae9648 100644 --- a/themes/buha/i18n/de.toml +++ b/themes/buha/i18n/de.toml @@ -76,6 +76,9 @@ other = "Verschiedenes" [all] other = "Alle" +[generate] +other = "Genriere" + [title] other = "Titel" diff --git a/themes/buha/layouts/_default/links.html b/themes/buha/layouts/_default/links.html index 289a9b6..81299ae 100644 --- a/themes/buha/layouts/_default/links.html +++ b/themes/buha/layouts/_default/links.html @@ -13,16 +13,16 @@ {{- define "main" -}} {{ if ne .Content "" }} -
+
{{ .Content }}
- {{ end }} + {{ end }}
{{ range .Pages }} - {{ end }} {{- end -}} diff --git a/themes/buha/layouts/_default/misc.html b/themes/buha/layouts/_default/misc.html index 00eabb2..7dd58dc 100644 --- a/themes/buha/layouts/_default/misc.html +++ b/themes/buha/layouts/_default/misc.html @@ -1,9 +1,8 @@ {{ define "title" }} -

Orga

+

{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}

{{ end }} {{ define "main" }} - {{ if site.Params.debug }}misc.html{{ end }}
{{ range .Pages }} {{ .Name }}
diff --git a/themes/buha/layouts/_default/rss.xml b/themes/buha/layouts/_default/rss.xml index 4b19bf9..e974b13 100644 --- a/themes/buha/layouts/_default/rss.xml +++ b/themes/buha/layouts/_default/rss.xml @@ -1,16 +1,27 @@ +{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}} +{{- $title := lower .Title -}} +{{- $pages := slice -}} {{- $pctx := . -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} -{{- $pages := slice -}} {{- if or $.IsHome $.IsSection -}} {{- $pages = $pctx.RegularPages -}} {{- else -}} -{{- $pages = $pctx.Pages -}} + {{- $what := printf ".Params.%s" $title -}} + {{- if or (eq $title "about") (eq $title "featured") -}} + {{- $pages = where $posts $what "eq" true -}} + {{- else if or (eq $title "tags") (eq $title "categories") -}} + {{- $pages = $posts -}} + {{- else if eq $title "events" -}} + {{- $pages = where $posts ".Params.when" "ne" nil -}} + {{- else -}} + {{- $pages = .Data.Pages -}} + {{- end -}} {{- end -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if ge $limit 1 -}} {{- $pages = $pages | first $limit -}} {{- end -}} -{{ $pages = $pages.ByLastmod.Reverse }} +{{- $pages = $pages.ByLastmod.Reverse -}} {{- printf "" | safeHTML }} diff --git a/themes/buha/layouts/index.html b/themes/buha/layouts/index.html index e4eb215..f98f7b8 100644 --- a/themes/buha/layouts/index.html +++ b/themes/buha/layouts/index.html @@ -5,29 +5,30 @@ {{ end }} {{ define "main" }} - {{ partial "rrule" . }} - - {{ $s := .Site.Params }} {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }} {{- $featured := where (where $posts ".Params.featured" "=" true) "Type" "in" $s.searchSections }} + {{ $featured = where $featured (.Lastmod.AddDate 0 0 14) "gt" now }} {{- $paginator := .Paginate $posts -}} {{ if eq $paginator.PageNumber 1 }} {{ if ne .Content "" }}
{{ .Content }}
- {{ end }} -

{{ "featured" | T }}

- {{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "3" "featured" "true") }} + {{ end }} + {{ if gt (len $featured) 0 }} +

{{if "featured" | i18n }}{{ "featured" | i18n }}{{ else }}{{ "Featured" }}{{ end }}

+ {{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "14" "featured" "true") }} + {{ end }} {{ end }} -

{{ "news" | T }}

+ {{ if gt (len $posts) 1 }} +

{{ if "news" | i18n }}{{ "news" | i18n }}{{ else }}{{ "News" }}{{ end }}

+ {{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5" "max_age" "-14") }} - {{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5" "max_age" "-14") }} - -
- {{ partial "structure/paginator" (dict "paginator" $paginator) }} -
+
+ {{ partial "structure/paginator" (dict "paginator" $paginator) }} +
+ {{ end }} {{ end }} diff --git a/themes/buha/layouts/partials/contentlayouts/article.html b/themes/buha/layouts/partials/contentlayouts/article.html index fa665f2..5883420 100644 --- a/themes/buha/layouts/partials/contentlayouts/article.html +++ b/themes/buha/layouts/partials/contentlayouts/article.html @@ -29,16 +29,16 @@ {{ end }} {{ if eq $price true }} {{ if eq .context.Params.price "free" }} -
{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "freeentry" }}{{ end }}
+
{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}
{{ else }} -
{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "entry" }}{{ end }}: {{ .context.Params.price }}
+
{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .context.Params.price }}
{{ end }} {{ end }} {{ if eq $contact true }} -
{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "contact" }}{{ end }} {{ .context.Params.contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
+
{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .context.Params.contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}
{{ end }} {{ if eq $covid true }} -
Es gilt die {{ .context.Params.covid }} Regel
+
Covid: {{ .context.Params.covid }}
{{ end }} {{ end }} @@ -81,7 +81,7 @@ {{ if eq .type "contact" }}{{ partial "structure/contact" }}{{ end }} {{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }} {{ if and .context.Truncated (eq .type "list") }} -
{{- i18n "readmore" -}}..
+
{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..
{{ end }} {{- end }} diff --git a/themes/buha/layouts/partials/contentlayouts/list.html b/themes/buha/layouts/partials/contentlayouts/list.html index ddb41d9..ed44e3d 100644 --- a/themes/buha/layouts/partials/contentlayouts/list.html +++ b/themes/buha/layouts/partials/contentlayouts/list.html @@ -1,44 +1,25 @@ -{{ if or .paginator .pages }} - {{ if .amount }} - {{ $amount := .amount }} - {{ $pages := "" }} - {{ $max_age := int .max_age }} - {{ $featured := .featured }} - {{ if .pages }} - {{ $pages = .pages.ByLastmod.Reverse }} - {{ else if .paginator }} - {{ $pages = .paginator.Pages.ByLastmod.Reverse }} - {{ end }} - {{- range first $amount $pages -}} - {{ $true := true }} - - {{ if $featured }} - {{ if le (.Lastmod.AddDate 0 0 $max_age) now }} - {{ $true = false }} - {{ end }} - {{ else }} - {{ if $max_age }} - {{ if and (lt (.Lastmod.AddDate 0 0 $max_age) now) (eq .Params.featured true) }} - {{ $true = false }} - {{ end }} - {{ end }} - {{ end }} - {{ if eq $true true }} - {{ if .Title }} - - {{ end }} - {{ end }} +{{ if and (or .paginator .pages) .amount }} + {{ $amount := .amount }} + {{ $pages := "" }} + {{ if .pages }} + {{ $pages = .pages.ByLastmod.Reverse }} + {{ else if .paginator }} + {{ $pages = .paginator.Pages.ByLastmod.Reverse }} + {{ end }} + {{- range first $amount $pages -}} + {{ if .Title }} + {{ end }} {{ end }} {{ end }} diff --git a/themes/buha/layouts/partials/misc/form.html b/themes/buha/layouts/partials/misc/form.html index a0b4c4d..91d8d49 100644 --- a/themes/buha/layouts/partials/misc/form.html +++ b/themes/buha/layouts/partials/misc/form.html @@ -11,7 +11,7 @@ {{ if and .group (not (in $group .group))}}
- {{ if i18n (singularize .group) }}{{ i18n (singularize .group) }}{{ else }}{{ .group }}{{ end }} + {{ if i18n (singularize .group) }}{{ i18n (singularize .group) }}{{ else }}{{ humanize .group }}{{ end }} {{ partial "misc/expand" (dict "name" (printf "%sgroup" .group)) }}
{{ $group = $group | append .group }} @@ -31,13 +31,13 @@ {{ else if eq .input_type "checkbox" }}
- +
{{ else if eq .input_type "results" }} {{ else if eq .input_type "submit" }}
- +
@@ -85,7 +85,7 @@ {{ end }} {{ if eq .new true }} - + {{ end }} diff --git a/themes/buha/layouts/partials/structure/footer.html b/themes/buha/layouts/partials/structure/footer.html index a5d4ab6..1ad2999 100644 --- a/themes/buha/layouts/partials/structure/footer.html +++ b/themes/buha/layouts/partials/structure/footer.html @@ -1,7 +1,7 @@ {{- if eq site.Params.contact true }}
- {{ $contact := "contact" }} - {{ if i18n $contact }} + {{ $contact := "Contact" }} + {{ if i18n "contact" }} {{ $contact = i18n "contact" }} {{ end }} {{- $contact | strings.FirstUpper -}}:

@@ -11,15 +11,15 @@
{{- if eq site.Params.archive true -}} - {{ $archive := "archive" }} - {{ if i18n $archive }} + {{ $archive := "Archive" }} + {{ if i18n "archive" }} {{ $archive = i18n "archive" }} {{ end }} {{- $archive | strings.FirstUpper -}}

{{- end -}} {{- if eq site.Params.newsletter true -}} {{ $newsletter := "Newsletter" }} - {{ if i18n $newsletter }} + {{ if i18n "newsletter" }} {{ $newsletter = i18n "newsletter" }} {{ end }} {{- $newsletter | strings.FirstUpper -}}

@@ -29,11 +29,18 @@
{{- if eq site.Params.imprint true -}} - {{ $imprint := "imprint" }} - {{ if i18n $imprint }} + {{ $imprint := "Imprint" }} + {{ if i18n "imprint" }} {{ $imprint = i18n "imprint" }} {{ end }} {{- $imprint | strings.FirstUpper -}}

+ {{- end -}} + {{- if eq site.Params.links true -}} + {{ $links := "Links" }} + {{ if i18n "links" }} + {{ $links = i18n "links" }} + {{ end }} + {{- $links | strings.FirstUpper -}}

{{- end -}} {{- with .OutputFormats.Get "rss" -}} {{- if .Permalink -}} diff --git a/themes/buha/layouts/partials/structure/header.html b/themes/buha/layouts/partials/structure/header.html index ac608a4..8e4fae9 100644 --- a/themes/buha/layouts/partials/structure/header.html +++ b/themes/buha/layouts/partials/structure/header.html @@ -4,9 +4,9 @@