small fixes

This commit is contained in:
teldra 2022-04-08 13:22:50 +02:00
parent 61e0a8fe0f
commit af42e4acd4
18 changed files with 97 additions and 89 deletions

View File

@ -3,4 +3,4 @@ title: "Willkommen"
--- ---
Wir sind das Buntehaus, ein soziokulturelles Zentrum in Celle. Wir sind das Buntehaus, ein soziokulturelles Zentrum in Celle.
Wir leben vom mitmachen und so. Wir leben vom mitmachen und so.
Lerne unsere [Projekte](/de/about) kennen. Lerne unsere [Projekte](/about) kennen.

View File

@ -3,4 +3,4 @@ title: "Welcome"
--- ---
We are the "Buntehaus", a sociocultural center in Celle. We are the "Buntehaus", a sociocultural center in Celle.
We live from participating and stuff like that. We live from participating and stuff like that.
Get to know our [projects](/en/about). Get to know our [projects](/en/about).

View File

@ -0,0 +1,3 @@
---
type: "archive"
---

View File

@ -0,0 +1,3 @@
---
type: "archive"
---

4
content/links/list.md Normal file
View File

@ -0,0 +1,4 @@
---
title: "Gruppe LiST: Land in Sicht - Transition Celle"
link: "http://list-celle.over-blog.com/"
---

View File

@ -1,16 +1,12 @@
todo buha.de todo buha.de
- einen weg finden, die seiten contact, archive und imprint buildin zu machen
- anleitung git proxy fuer tor - anleitung git proxy fuer tor
- eintritt "gegen spende" - eintritt "gegen spende"
- covid regel verfeinern - 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) - diskutieren, ob jede aenderung via rss raus soll (lastmod vs einmalig)
- translations: english default - translations: english default
- generator form: aus mc ein checkbox machen und kategorien und/oder eventkategorien soloauswaehlbar machen. - 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?) - 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. - 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. - dokumentiere, das artikel der alten homepage "lastmod" mit demgenau bis ungefaehren datum der damligen erstellung, im frontmatter haben sollten, wann sie erstellt wurden.

View File

@ -76,6 +76,9 @@ other = "Verschiedenes"
[all] [all]
other = "Alle" other = "Alle"
[generate]
other = "Genriere"
[title] [title]
other = "Titel" other = "Titel"

View File

@ -13,16 +13,16 @@
{{- define "main" -}} {{- define "main" -}}
{{ if ne .Content "" }} {{ if ne .Content "" }}
<article> <article style="margin-bottom: 0; margin-top: 0;">
{{ .Content }} {{ .Content }}
</article> </article>
{{ end }} {{ end }}<br>
{{ range .Pages }} {{ range .Pages }}
<article> <article style="margin-bottom: 0; margin-top: 0;">
<h3><a href="{{ .Params.link }}">{{ .Params.link }}</a></h3> <h3><a href="{{ .Params.link }}">{{ .Params.link }}</a></h3>
{{ .Title }}<br> {{ .Title }}
{{ .Content }} {{ .Content }}
</article> </article>
{{ end }} {{ end }}
{{- end -}} {{- end -}}

View File

@ -1,9 +1,8 @@
{{ define "title" }} {{ define "title" }}
<h1>Orga</h1> <h1>{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
{{ if site.Params.debug }}misc.html{{ end }}
<article> <article>
{{ range .Pages }} {{ range .Pages }}
<a href="{{ .Permalink }}">{{ .Name }}</a><br> <a href="{{ .Permalink }}">{{ .Name }}</a><br>

View File

@ -1,16 +1,27 @@
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}}
{{- $title := lower .Title -}}
{{- $pages := slice -}}
{{- $pctx := . -}} {{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} {{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}} {{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}} {{- $pages = $pctx.RegularPages -}}
{{- else -}} {{- 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 -}} {{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}} {{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}} {{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}} {{- $pages = $pages | first $limit -}}
{{- end -}} {{- end -}}
{{ $pages = $pages.ByLastmod.Reverse }} {{- $pages = $pages.ByLastmod.Reverse -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} {{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel> <channel>

View File

@ -5,29 +5,30 @@
{{ end }} {{ end }}
{{ define "main" }} {{ define "main" }}
{{ partial "rrule" . }}
{{ $s := .Site.Params }} {{ $s := .Site.Params }}
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }} {{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
{{- $featured := where (where $posts ".Params.featured" "=" true) "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 -}} {{- $paginator := .Paginate $posts -}}
{{ if eq $paginator.PageNumber 1 }} {{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }} {{ if ne .Content "" }}
<article> <article>
{{ .Content }} {{ .Content }}
</article> </article>
{{ end }} {{ end }}
<a href="/featured"><h2>{{ "featured" | T }}</h2></a> {{ if gt (len $featured) 0 }}
{{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "3" "featured" "true") }} <a href="/featured"><h2>{{if "featured" | i18n }}{{ "featured" | i18n }}{{ else }}{{ "Featured" }}{{ end }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "14" "featured" "true") }}
{{ end }}
{{ end }} {{ end }}
<a href="/news"><h2>{{ "news" | T }}</h2></a> {{ if gt (len $posts) 1 }}
<a href="/news"><h2>{{ if "news" | i18n }}{{ "news" | i18n }}{{ else }}{{ "News" }}{{ end }}</h2></a>
{{ 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") }} <div id="pagination_outer" style="display: flex; justify-content: center;">
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
<div id="pagination_outer" style="display: flex; justify-content: center;"> </div>
{{ partial "structure/paginator" (dict "paginator" $paginator) }} {{ end }}
</div>
{{ end }} {{ end }}

View File

@ -29,16 +29,16 @@
{{ end }} {{ end }}
{{ if eq $price true }} {{ if eq $price true }}
{{ if eq .context.Params.price "free" }} {{ if eq .context.Params.price "free" }}
<div>{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "freeentry" }}{{ end }}</div> <div>{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}</div>
{{ else }} {{ else }}
<div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "entry" }}{{ end }}: {{ .context.Params.price }}</div> <div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .context.Params.price }}</div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ if eq $contact true }} {{ if eq $contact true }}
<div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "contact" }}{{ end }} {{ .context.Params.contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}</div> <div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .context.Params.contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}</div>
{{ end }} {{ end }}
{{ if eq $covid true }} {{ if eq $covid true }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div> <div>Covid: {{ .context.Params.covid }}</div>
{{ end }} {{ end }}
</div> </div>
{{ end }} {{ end }}
@ -81,7 +81,7 @@
{{ if eq .type "contact" }}{{ partial "structure/contact" }}{{ end }} {{ if eq .type "contact" }}{{ partial "structure/contact" }}{{ end }}
{{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }} {{ if eq .type "list" }}{{- .context.Summary -}}{{ else }}{{- .context.Content -}}{{ end }}
{{ if and .context.Truncated (eq .type "list") }} {{ if and .context.Truncated (eq .type "list") }}
<div id="readmore">{{- i18n "readmore" -}}..</div> <div id="readmore">{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..</div>
{{ end }} {{ end }}
</div> </div>
{{- end }} {{- end }}

View File

@ -1,44 +1,25 @@
{{ if or .paginator .pages }} {{ if and (or .paginator .pages) .amount }}
{{ if .amount }} {{ $amount := .amount }}
{{ $amount := .amount }} {{ $pages := "" }}
{{ $pages := "" }} {{ if .pages }}
{{ $max_age := int .max_age }} {{ $pages = .pages.ByLastmod.Reverse }}
{{ $featured := .featured }} {{ else if .paginator }}
{{ if .pages }} {{ $pages = .paginator.Pages.ByLastmod.Reverse }}
{{ $pages = .pages.ByLastmod.Reverse }} {{ end }}
{{ else if .paginator }} {{- range first $amount $pages -}}
{{ $pages = .paginator.Pages.ByLastmod.Reverse }} {{ if .Title }}
{{ end }} <article class="articlebgcol1 borderrad25">
{{- range first $amount $pages -}} <a href="{{- .Permalink -}}">
{{ $true := true }} <div id="articletitle">
<h2>{{- .Title -}}</h2>
{{ if $featured }} </div>
{{ if le (.Lastmod.AddDate 0 0 $max_age) now }} </a>
{{ $true = false }} <a href="{{- .Permalink -}}">
{{ end }} <div id="articlecontent">
{{ else }} {{ partial "contentlayouts/article.html" (dict "context" . "type" "list") }}
{{ if $max_age }} </div>
{{ if and (lt (.Lastmod.AddDate 0 0 $max_age) now) (eq .Params.featured true) }} </a>
{{ $true = false }} </article>
{{ end }}
{{ end }}
{{ end }}
{{ if eq $true true }}
{{ if .Title }}
<article class="articlebgcol1 borderrad25">
<a href="{{- .Permalink -}}">
<div id="articletitle">
<h2>{{- .Title -}}</h2>
</div>
</a>
<a href="{{- .Permalink -}}">
<div id="articlecontent">
{{ partial "contentlayouts/article.html" (dict "context" . "type" "list") }}
</div>
</a>
</article>
{{ end }}
{{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}

View File

@ -11,7 +11,7 @@
{{ if and .group (not (in $group .group))}} {{ if and .group (not (in $group .group))}}
<div class="margin_top_1rem"> <div class="margin_top_1rem">
{{ 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)) }} {{ partial "misc/expand" (dict "name" (printf "%sgroup" .group)) }}
</div> </div>
{{ $group = $group | append .group }} {{ $group = $group | append .group }}
@ -31,13 +31,13 @@
</div> </div>
{{ else if eq .input_type "checkbox" }} {{ else if eq .input_type "checkbox" }}
<div class="checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}"> <div class="checkbox {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="{{ .placeholder }}" {{ .Scratch.Get "requiredtext" }}>{{ if i18n .placeholder }}{{ i18n .placeholder }}{{ else }}{{ .placeholder }}{{ end }}</label> <label><input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="{{ .placeholder }}" {{ .Scratch.Get "requiredtext" }}>{{ if i18n .placeholder }}{{ i18n .placeholder }}{{ else }}{{ humanize .placeholder }}{{ end }}</label>
</div> </div>
{{ else if eq .input_type "results" }} {{ else if eq .input_type "results" }}
<div id='display' class="result" style="white-space: pre; display: none; background: var(--background-body); padding: .6rem 0 1rem 1rem;"></div> <div id='display' class="result" style="white-space: pre; display: none; background: var(--background-body); padding: .6rem 0 1rem 1rem;"></div>
{{ else if eq .input_type "submit" }} {{ else if eq .input_type "submit" }}
<div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}"> <div class="margin_top_1rem {{ if .group }}visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<input type="{{ .input_type }}" value="{{ i18n "generate" }}" onclick="showInput(event);" /> <input type="{{ .input_type }}" value="{{ if i18n "generate" }}{{ i18n "generate" }}{{ else }}{{ "Generate" }}{{ end }}" onclick="showInput(event);" />
</div> </div>
@ -85,7 +85,7 @@
{{ end }} {{ end }}
</fieldset> </fieldset>
{{ if eq .new true }} {{ if eq .new true }}
<label id="label" for="new{{- .name -}}">{{ if i18n "new" }}{{ i18n "new" }}{{ else }}{{ "new" }}{{ end }} <span style="font-size: x-small;">(Getrennt durch Komma)</span></label> <label id="label" for="new{{- .name -}}">{{ if i18n "new" }}{{ i18n "new" }}{{ else }}{{ "New" }}{{ end }} <span style="font-size: x-small;">(Getrennt durch Komma)</span></label>
<input type="text" name="new{{- .name -}}" id="new{{- .name -}}" value="" placeholder="{{ .eg }}" /> <input type="text" name="new{{- .name -}}" id="new{{- .name -}}" value="" placeholder="{{ .eg }}" />
{{ end }} {{ end }}
</div> </div>

View File

@ -1,7 +1,7 @@
{{- if eq site.Params.contact true }} {{- if eq site.Params.contact true }}
<div class="infobox"> <div class="infobox">
{{ $contact := "contact" }} {{ $contact := "Contact" }}
{{ if i18n $contact }} {{ if i18n "contact" }}
{{ $contact = i18n "contact" }} {{ $contact = i18n "contact" }}
{{ end }} {{ end }}
<a href="{{- "contact" | absLangURL -}}">{{- $contact | strings.FirstUpper -}}:</a><br><br> <a href="{{- "contact" | absLangURL -}}">{{- $contact | strings.FirstUpper -}}:</a><br><br>
@ -11,15 +11,15 @@
<div class="infobox"> <div class="infobox">
{{- if eq site.Params.archive true -}} {{- if eq site.Params.archive true -}}
{{ $archive := "archive" }} {{ $archive := "Archive" }}
{{ if i18n $archive }} {{ if i18n "archive" }}
{{ $archive = i18n "archive" }} {{ $archive = i18n "archive" }}
{{ end }} {{ end }}
<a href="{{- "archive" | absLangURL -}}">{{- $archive | strings.FirstUpper -}}</a><br><br> <a href="{{- "archive" | absLangURL -}}">{{- $archive | strings.FirstUpper -}}</a><br><br>
{{- end -}} {{- end -}}
{{- if eq site.Params.newsletter true -}} {{- if eq site.Params.newsletter true -}}
{{ $newsletter := "Newsletter" }} {{ $newsletter := "Newsletter" }}
{{ if i18n $newsletter }} {{ if i18n "newsletter" }}
{{ $newsletter = i18n "newsletter" }} {{ $newsletter = i18n "newsletter" }}
{{ end }} {{ end }}
<a href="{{- "newsletter" | absLangURL -}}">{{- $newsletter | strings.FirstUpper -}}</a><br><br> <a href="{{- "newsletter" | absLangURL -}}">{{- $newsletter | strings.FirstUpper -}}</a><br><br>
@ -29,11 +29,18 @@
<div class="infobox"> <div class="infobox">
{{- if eq site.Params.imprint true -}} {{- if eq site.Params.imprint true -}}
{{ $imprint := "imprint" }} {{ $imprint := "Imprint" }}
{{ if i18n $imprint }} {{ if i18n "imprint" }}
{{ $imprint = i18n "imprint" }} {{ $imprint = i18n "imprint" }}
{{ end }} {{ end }}
<a href="{{- "imprint" | absLangURL -}}">{{- $imprint | strings.FirstUpper -}}</a><br><br> <a href="{{- "imprint" | absLangURL -}}">{{- $imprint | strings.FirstUpper -}}</a><br><br>
{{- end -}}
{{- if eq site.Params.links true -}}
{{ $links := "Links" }}
{{ if i18n "links" }}
{{ $links = i18n "links" }}
{{ end }}
<a href="{{- "links" | absLangURL -}}">{{- $links | strings.FirstUpper -}}</a><br><br>
{{- end -}} {{- end -}}
{{- with .OutputFormats.Get "rss" -}} {{- with .OutputFormats.Get "rss" -}}
{{- if .Permalink -}} {{- if .Permalink -}}

View File

@ -4,9 +4,9 @@
</a> </a>
<div id="menu"> <div id="menu">
{{- range site.Params.mainMenu -}} {{- range site.Params.mainMenu -}}
{{ $name := . | T }} {{ $name := . }}
{{ if eq $name "" }} {{ if i18n . }}
{{ $name = . }} {{ $name = i18n . }}
{{ end }} {{ end }}
<a href="{{- . | relLangURL -}}">{{- $name | humanize -}}</a> <a href="{{- . | relLangURL -}}">{{- $name | humanize -}}</a>
{{- end -}} {{- end -}}

View File

@ -3,7 +3,7 @@
<li class="align_menu"><h3>{{ "Languages" }}</h3></li> <li class="align_menu"><h3>{{ "Languages" }}</h3></li>
{{ range .Translations }} {{ range .Translations }}
{{ if ne .Lang $.Lang }} {{ if ne .Lang $.Lang }}
<li class="align_menu"><a href="{{- .Permalink -}}">{{- i18n .Lang -}}</a></li> <li class="align_menu"><a href="{{- .Permalink -}}">{{- if i18n .Lang -}}{{- i18n .Lang -}}{{- else -}}{{- humanize .Lang -}}{{ end }}</a></li>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}