first batch of restructure

This commit is contained in:
teldra 2022-04-10 00:53:31 +02:00
parent 982cf4a66b
commit 722a701944
46 changed files with 285 additions and 66 deletions

View File

@ -27,7 +27,7 @@ featured = 'featured'
[params]
# keywords for seo
keywords = "buntes haus celle, buntes haus, bunteshaus, celle, buntes haus e.V., www.bunteshaus.de, celle, punk, reggae, ska, konzerte, partys, soziokultur, soziokulturelles zentrum celle, elektro, electroe, jugendzentrum, celle, dum n bass, konzert, musik, politik, kultur, alternativ, cd kaserne celle, cd kaserne, plenum, celle, antifa, antira, anti akw, anti atom celle, veranstaltungen, infoladen, proberaum celle, archiv für neue soziale bewegungen in celle, hartz 4 IV beratung celle, skaten, graffiti, sprayen, kunst, fahrradwerkstatt, deka dance celle, dekadance, Revista, probably the friendliest Place on Earth"
debug = true
debug = false
#do you want a contact page?
contact = true

View File

@ -1,5 +1,6 @@
---
title: "Über uns"
layout: "article_list"
---
Wir sind das Buntehaus, ein [soziokulturelles](/bunteshaus/soziokultur) Zentrum in Celle.
Wir leben vom mitmachen und so.

View File

@ -1,3 +1,4 @@
---
type: "archive"
---
title: "Archiv"
layout: "archive"
---

View File

@ -1,4 +1,5 @@
---
title: "Kontakt"
layout: "contact"
---
Konzerte: konzerte@bunteshaus.de
Konzerte: konzerte@bunteshaus.de

View File

@ -0,0 +1,4 @@
---
title: "EVENE"
layout: "article_list"
---

View File

@ -0,0 +1,4 @@
---
title: "featureds"
layout: "article_list"
---

View File

@ -1,4 +1,5 @@
---
title: "Impressum"
layout: "imprint"
---
Angaben gemäß § 5 TMG
@ -35,4 +36,4 @@ Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unt
Die Nutzung unserer Webseite ist in der Regel ohne Angabe personenbezogener Daten möglich. Soweit auf unseren Seiten personenbezogene Daten (beispielsweise Name, Anschrift oder eMail-Adressen) erhoben werden, erfolgt dies, soweit möglich, stets auf freiwilliger Basis. Diese Daten werden ohne Ihre ausdrückliche Zustimmung nicht an Dritte weitergegeben.
Wir weisen darauf hin, dass die Datenübertragung im Internet (z.B. bei der Kommunikation per E-Mail) Sicherheitslücken aufweisen kann. Ein lückenloser Schutz der Daten vor dem Zugriff durch Dritte ist nicht möglich.
Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen. Die Betreiber der Seiten behalten sich ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa durch Spam-Mails, vor.
Der Nutzung von im Rahmen der Impressumspflicht veröffentlichten Kontaktdaten durch Dritte zur Übersendung von nicht ausdrücklich angeforderter Werbung und Informationsmaterialien wird hiermit ausdrücklich widersprochen. Die Betreiber der Seiten behalten sich ausdrücklich rechtliche Schritte im Falle der unverlangten Zusendung von Werbeinformationen, etwa durch Spam-Mails, vor.

View File

@ -0,0 +1,4 @@
---
title: "Links"
layout: "links"
---

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 382 KiB

After

Width:  |  Height:  |  Size: 382 KiB

View File

Before

Width:  |  Height:  |  Size: 240 KiB

After

Width:  |  Height:  |  Size: 240 KiB

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

Before

Width:  |  Height:  |  Size: 4.7 MiB

After

Width:  |  Height:  |  Size: 4.7 MiB

View File

Before

Width:  |  Height:  |  Size: 225 KiB

After

Width:  |  Height:  |  Size: 225 KiB

View File

@ -0,0 +1,4 @@
---
title: "Medien"
layout: "media"
---

View File

@ -1,7 +1,3 @@
---
title: "Medien"
date: 2021-06-22T23:00:00+02:00
---
![](0)
![](1)
![](2)

View File

@ -0,0 +1,4 @@
---
title: "Verschiedenes"
layout: "section_list"
---

View File

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

View File

@ -0,0 +1,4 @@
---
title: "Neues"
layout: "article_list"
---

View File

@ -1,5 +1,6 @@
---
title: "Newsletter"
layout: "newsletter"
---
Wenn ihr in unseren Newsletter aufgenommen werden wollt, schickt uns eine email!

View File

@ -0,0 +1,4 @@
---
title: "Tools"
layout: "section_list"
---

View File

@ -121,7 +121,6 @@ article {
#articletext img {
border-radius: 15px;
width: 80%;
}
@ -209,6 +208,10 @@ input, textarea {
border-radius: 15px;
}
.borderrad4px {
border-radius: 4px;
}
.minmax {
width: auto;
max-width: auto;

View File

@ -0,0 +1,7 @@
{{ $url := (printf "%s#%s" .Page.Permalink .Anchor) | safeURL }}
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
<a class="heading-anchor" href="{{ $url }}">
{{ .Text | safeHTML }}
</a>
</h{{ .Level }}>

View File

@ -0,0 +1,35 @@
{{- if strings.HasPrefix .Destination "http" -}}
<a href="{{- .Destination -}}">
<img loading="lazy"
src="{{ .Destination | safeURL }}"
alt="{{ .Text }}"
{{ with .Title}} title="{{ . }}"{{ end }} />
<div style="display: flex; justify-content: center;">{{ .Text }}</div>
</a>
{{- else -}}
{{ if .Page.Resources.ByType "image" }}
{{ $nr := .Destination }}
{{- $pic := index (.Page.Resources.ByType "image") (int $nr) -}}
{{- $image := .Page.Resources.GetMatch (printf "%s" ($pic | safeURL)) -}}
<div>
<a href="{{- $image.Permalink -}}">
{{- $permalink := "" -}}
{{- if ne $image nil -}}
{{- $permalink = $image.RelPermalink -}}
{{- else -}}
{{- $image = imageConfig (printf "static/%s" (.Destination | safeURL)) -}}
{{- $permalink = (printf "/%s" (.Destination | safeURL)) -}}
{{- end -}}
<div style="display: flex; justify-content: center;"><img loading="lazy"
src="{{ $permalink }}"
alt="{{ .Text }}"
{{ with .Title}} title="{{ . }}"{{ end }}
width={{ $image.Width }}
height="{{ $image.Height }}" class="borderrad4px" /></div>
<div style="display: flex; justify-content: center;">{{ .Text }}</div>
</a>
</div>
{{ end }}
{{- end -}}

View File

@ -4,32 +4,36 @@
{{ define "content" }}
{{ partial "debug" (dict "context" . "caller" "list.html")}}
{{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
{{ $partial := "layout/lists/article_list" }}
{{ $partial := "" }}
{{ $title := "" }}
{{ $pic := "true" }}
{{ if eq .Section "news" }}
{{- $pages = .Data.Pages -}}
{{ else if eq .Section "events" }}
{{- $pages = where $pages ".Params.when" "ne" nil -}}
{{ else if eq .Section "about" }}
{{- $pages = where $pages ".Params.about" "=" true -}}
{{ else if eq .Section "featured" }}
{{- $pages = where $pages ".Params.featured" "=" true -}}
{{ else if or (eq .Section "misc") (eq .Section "tools") }}
{{ $partial = "layout/lists/section_list" }}
{{ else if or (eq .Section "tags") (eq .Section "categories")}}
{{ $partial = "layout/lists/taxonomies_list" }}
{{ $pre := "l1" }}
{{ $part := .Layout }}
{{ $partial_before := "" }}
{{ if eq .Layout "article_list" }}
{{ if eq .Section "events" }}
{{- $pages = where $pages ".Params.when" "ne" nil -}}
{{ else if eq .Type "about" }}
{{- $pages = where $pages ".Params.about" "=" true -}}
{{ else if eq .Section "news" }}
{{- $pages = .Data.Pages -}}
{{ else if eq .Section "featured" }}
{{- $pages = where $pages ".Params.featured" "=" true -}}
{{ end }}
{{ else if or (eq .Layout "contact") (eq .Layout "imprint") }}
{{ $partial_before = "snippets/contact" }}
{{ else }}
{{ $partial = "snippets/single_chooser" }}
{{ $pic = "false" }}
{{ if eq .Kind "term" }}
{{- $pages = .Data.Pages -}}
{{ $part = "easy_list" }}
{{ else if eq .Kind "taxonomy" }}
{{- $pages = .Data.Terms.Alphabetical -}}
{{ $part = "easy_list" }}
{{ end }}
{{ end }}
{{ if eq .Kind "term" }}
{{- $pages = .Data.Pages -}}
{{ $partial = "layout/lists/term_list" }}
{{ if and $pre $part }}
{{ $partial := string (printf "%s/%s" $pre $part) }}
{{ partial $partial (dict "context" . "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic "type" .Type "partial_before" $partial_before) }}
{{ end }}
{{ $partial := string $partial }}
{{ partial $partial (dict "context" . "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic) }}
{{ end }}

View File

@ -3,5 +3,16 @@
{{ end }}
{{ define "content" }}
{{ partial "snippets/single_chooser" (dict "context" . "pic" "true") }}
{{ partial "debug" (dict "context" . "caller" "single_chooser.html")}}
{{ $partial_before := "" }}
{{ $partial := "layout/single/article" }}
{{ $pic := "true" }}
{{ if eq .Params.tool "generator" }}
{{ $partial = "layout/single/generator" }}
{{ else if eq .Params.tool "nottranslated" }}
{{ $partial = "layout/single/nottranslated" }}
{{ end }}
<article>
{{ partial $partial (dict "context" . "pic" $pic "content" .Content "partial_before" $partial_before) }}
</article>
{{ end }}

View File

@ -13,10 +13,10 @@
{{ if ne .Content "" }}
{{ partial "snippets/content" (dict "content" .Content) }}
{{ end }}
{{ partial "layout/lists/article_list" (dict "context" . "pages" $featured "amount" "3" "title" "Featured") }}
{{ partial "l1/article_list" (dict "context" . "pages" $featured "amount" "3" "title" "Featured") }}
{{ end }}
{{ if gt (len $posts) 1 }}
{{ partial "layout/lists/article_list" (dict "context" . "paginator" $paginator "amount" "5" "title" "News") }}
{{ partial "l1/article_list" (dict "context" . "paginator" $paginator "amount" "5" "title" "News") }}
<div id="pagination_outer" style="display: flex; justify-content: center;">
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
</div>

View File

@ -0,0 +1,15 @@
<article>
{{ partial "debug" (dict "context" . "caller" "archive.html" )}}
{{ $prev := 3000}}
{{range where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $date := .Date }}
{{ if gt $prev ($date.Format "2006") }}
<h2>{{ $date.Format "2006" }}</h2>
{{end}}
<div class="frow">
<div class="underline" style="margin-right: 1em;"><a href="{{.Permalink}}">{{ .Title }}</a></div>
<div class="frow" style="margin-right: 1em;">{{- $date.Format "02" }}. {{ if $date.Format "Jan" | i18n }}{{ $date.Format "Jan" | i18n -}}{{- else -}} {{- $date.Format "Jan" -}}{{- end }} {{ $date.Format "2006 15:04" }}</div><br>
</div>
{{ $prev = $date.Format "2006"}}
{{end}}
</article>

View File

@ -10,7 +10,7 @@
{{ partial "snippets/content" (dict "content" .content) }}
{{ end }}
{{- if gt (len $pages) 0 -}}
{{ if .title }}<h2>{{ .title }}</h2>{{ end }}
{{ if .title }}<h2 style="margin-left: .6rem;">{{ .title }}</h2>{{ end }}
{{- range first $amount $pages -}}
<article class="articlebgcol1 borderrad25">
<a href="{{- .Permalink -}}">

View File

@ -0,0 +1,33 @@
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ if .content }}
{{- $thumb = $img.Resize "500x" }}
{{ end }}
{{ end }}
{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic true)}}
<div id="articlepicture" class="{{ $small }}">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>
{{ end }}
<div id="articletext" class="{{ $big }}">
{{ if .partial_before }}
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
{{ end }}
{{ .content }}
</div>
</div>

View File

@ -0,0 +1,6 @@
<article>
{{ $type := .type }}
{{ range .pages }}
<a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ if eq $type "taxonomy"}}{{ .Count }}{{ end }}
{{ end }}
</article>

View File

@ -0,0 +1,33 @@
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ if .content }}
{{- $thumb = $img.Resize "500x" }}
{{ end }}
{{ end }}
{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic true)}}
<div id="articlepicture" class="{{ $small }}">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>
{{ end }}
<div id="articletext" class="{{ $big }}">
{{ if .partial_before }}
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
{{ end }}
{{ .content }}
</div>
</div>

View File

@ -1,6 +1,6 @@
{{ range .context.Pages }}
<article>
<a href="{{ .Params.link }}">{{ .Params.link }}</a>
<a href="{{ .Params.link }}" class="underline">{{ .Params.link }}</a>
{{ .Title }}
</article>
{{ end }}

View File

@ -0,0 +1,5 @@
<article>
{{ range .context.Resources.ByType "image" }}
<img src="{{ .Permalink }}" class="borderrad4px"/>
{{ end }}
</article>

View File

@ -0,0 +1,33 @@
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ if .content }}
{{- $thumb = $img.Resize "500x" }}
{{ end }}
{{ end }}
{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic true)}}
<div id="articlepicture" class="{{ $small }}">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>
{{ end }}
<div id="articletext" class="{{ $big }}">
{{ if .partial_before }}
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
{{ end }}
{{ .content }}
</div>
</div>

View File

@ -1,3 +0,0 @@
{{ range .context.Data.Terms.Alphabetical }}
<li><a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> {{ .Count }}</li>
{{ end }}

View File

@ -1,4 +0,0 @@
{{ range .context.Pages }}
{{ .Title }}<br>
{{ end }}

View File

@ -29,9 +29,9 @@
{{ partial "snippets/article_metadata" $metas }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic "true")}}
<div id="articlepicture" class="{{ $small }} borderrad25">
<div id="articlepicture" class="{{ $small }}" >
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>

View File

@ -17,9 +17,9 @@
{{ end }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic true)}}
<div id="articlepicture" class="{{ $small }} borderrad25">
<div id="articlepicture" class="{{ $small }}">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>

View File

@ -0,0 +1,25 @@
{{ $l1 := slice }}
{{ $l2 := slice }}
{{ range $.Site.Home.Translations }}
{{ $l1 = $l1 | append .Language }}
{{ end }}
{{ $all_lang := $.Site.Home.Translations }}
{{ range where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ $missing := slice}}
{{ if .Translations }}
{{ range .Translations }}
{{ $l2 = $l2 | append .Language }}
{{ end }}
{{ $final := $l1 | complement $l2 }}
{{ range $final }}
{{ $missing = $missing | append . }}
{{ end }}
{{ else }}
{{ $missing = $missing | append "all translations" }}
{{ end }}
{{ if $missing }}
<a href="{{ .Permalink}}" style="margin-top: 1rem;" class="underline">{{ .Name }}:</a>
<div>missing: {{ index $missing 0 }}</div>
{{ end }}
{{ end }}

View File

@ -12,7 +12,7 @@
{{ end }}
{{ end }}
{{ if .contact }}
<div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} {{ site.Params.imprintdata.tel }}</div>
<div>{{ if i18n "contact" }}{{ i18n "contact" }}{{ else }}{{ "Contact" }}{{ end }} {{ .contact | markdownify }} {{ if i18n "or" }}{{ i18n "or" }}{{ else }}{{ "or" }}{{ end }} <a href="tel://{{ site.Params.imprintdata.tel }}">{{ site.Params.imprintdata.tel }}</a></div>
{{ end }}
{{ if .covid }}
<div>Covid: {{ .covid }}</div>

View File

@ -2,5 +2,5 @@
{{ site.Params.imprintdata.street }}<br>
{{ if i18n "pobox" }}{{ i18n "pobox" }}{{ else }}{{ "Po.Box" }}{{ end }} {{ site.Params.imprintdata.pobox }}<br>
{{ site.Params.imprintdata.city }}<br>
{{ if site.Params.imprintdata.tel }}<p>{{ if i18n "phone" }}{{ i18n "phone" }}{{ else }}{{ "phone" }}{{ end }}: {{ site.Params.imprintdata.tel }}</p>{{ end }}
{{ if site.Params.imprintdata.tel }}<p>{{ if i18n "phone" }}{{ i18n "phone" }}{{ else }}{{ "phone" }}{{ end }}: <a href="tel://{{ site.Params.imprintdata.tel }}">{{ site.Params.imprintdata.tel }}</a></p>{{ end }}
{{ if site.Params.imprintdata.mail }}<p>{{ if i18n "mail" }}{{ i18n "mail" }}{{ else }}{{ "mail" }}{{ end }}: {{ site.Params.imprintdata.mail | markdownify }}{{ end }}</p>

View File

@ -2,20 +2,10 @@
{{ $partial_before := "" }}
{{ $partial := "layout/single/article" }}
{{ $pic := .pic }}
{{ if eq (lower .context.Section) "imprint" }}
{{ $partial_before = "snippets/contact" }}
{{ $partial = "layout/single/content_single" }}
{{ $pic = false }}
{{ else if eq (lower .context.Section) "contact" }}
{{ $partial_before = "snippets/contact" }}
{{ $partial = "layout/single/content_single" }}
{{ $pic = true }}
{{ else if eq (lower .context.Section) "links" }}
{{ $partial = "layout/single/links" }}
{{ else if eq (lower .context.Section) "archive" }}
{{ $partial = "layout/single/archive" }}
{{ else if eq .context.Title "Generator" }}
{{ if eq .context.Params.tool "generator" }}
{{ $partial = "layout/single/generator" }}
{{ else if eq .context.Params.tool "nottranslated" }}
{{ $partial = "layout/single/nottranslated" }}
{{ end }}
<article>
{{ partial $partial (dict "context" .context "pic" $pic "content" .context.Content "partial_before" $partial_before) }}