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 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 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
- 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.

View File

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

View File

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

View File

@ -1,9 +1,8 @@
{{ define "title" }}
<h1>Orga</h1>
<h1>{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}</h1>
{{ end }}
{{ define "main" }}
{{ if site.Params.debug }}misc.html{{ end }}
<article>
{{ range .Pages }}
<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 := . -}}
{{- 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 "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>

View File

@ -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 "" }}
<article>
{{ .Content }}
</article>
{{ end }}
<a href="/featured"><h2>{{ "featured" | T }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "3" "featured" "true") }}
{{ end }}
{{ if gt (len $featured) 0 }}
<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 }}
<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>
<div id="pagination_outer" style="display: flex; justify-content: center;">
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
</div>
{{ end }}
{{ end }}

View File

@ -29,16 +29,16 @@
{{ end }}
{{ if eq $price true }}
{{ 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 }}
<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 }}
{{ 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 }}
{{ if eq $covid true }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div>
<div>Covid: {{ .context.Params.covid }}</div>
{{ end }}
</div>
{{ 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") }}
<div id="readmore">{{- i18n "readmore" -}}..</div>
<div id="readmore">{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..</div>
{{ end }}
</div>
{{- end }}

View File

@ -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 }}
<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 }}
{{ 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 }}
<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 }}

View File

@ -11,7 +11,7 @@
{{ if and .group (not (in $group .group))}}
<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)) }}
</div>
{{ $group = $group | append .group }}
@ -31,13 +31,13 @@
</div>
{{ else if eq .input_type "checkbox" }}
<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>
{{ 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>
{{ else if eq .input_type "submit" }}
<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>
@ -85,7 +85,7 @@
{{ end }}
</fieldset>
{{ 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 }}" />
{{ end }}
</div>

View File

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

View File

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

View File

@ -3,7 +3,7 @@
<li class="align_menu"><h3>{{ "Languages" }}</h3></li>
{{ range .Translations }}
{{ 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 }}