small fixes

This commit is contained in:
teldra 2022-03-27 14:24:21 +02:00
parent 283883ab1f
commit ed197255c7
35 changed files with 114 additions and 39 deletions

View File

@ -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]

View File

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

View File

@ -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:

View File

Before

Width:  |  Height:  |  Size: 286 KiB

After

Width:  |  Height:  |  Size: 286 KiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 328 KiB

After

Width:  |  Height:  |  Size: 328 KiB

View File

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 358 KiB

View File

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

Before

Width:  |  Height:  |  Size: 217 KiB

After

Width:  |  Height:  |  Size: 217 KiB

View File

Before

Width:  |  Height:  |  Size: 561 KiB

After

Width:  |  Height:  |  Size: 561 KiB

View File

Before

Width:  |  Height:  |  Size: 593 KiB

After

Width:  |  Height:  |  Size: 593 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -6,6 +6,6 @@ recurrent: false
price: "free"
covid: ""
register: ""
categories: "Party"
categories: ["Party"]
tags: ["",]
---

View File

@ -0,0 +1,3 @@
---
title: "featured"
---

View File

@ -0,0 +1,3 @@
---
title: "recurrent"
---

View File

@ -184,6 +184,8 @@ article h3 {
flex-direction: column;
min-width: 15%;
min-height: 100vh;
margin-top: 1rem;
margin-right: .5rem;
}
footer {

View File

@ -227,4 +227,10 @@ other = "Eintritt ist kostenlos."
other = "Anstehende Events"
[readmore]
other = "weiterlesen"
other = "weiterlesen"
[about]
other = "Über uns"
[featured]
other = "wichtig"

View File

@ -0,0 +1 @@
asdasd

View File

@ -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 "" }}
<article>
{{ .Content }}
</article>
{{ 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 -}}

View File

@ -3,12 +3,64 @@
{{ end }}
{{ define "main" }}
{{ if ne .Content "" }}
<article>
{{ .Content }}
</article>
<h2>{{ "news" | T }}</h2>
{{ end }}
<a href="/featured"><h2>{{ "featured" | T | humanize }}</h2></a>
{{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "=" true) }}
<article class="articlebgcol1 borderrad25"><a href="{{- .Permalink -}}">
<div id="articletitle">
<h3>{{- .Title -}}</h3>
</div>
<div id="articlecontent">
<div id="articlemeta">
{{ if and (ne .Params.when "") (ne .Params.when nil) }}
<div style="margin-bottom: .4em;">{{ .Params.when }}</div>
{{ end }}
{{ if and (ne .Params.price "") (ne .Params.price nil) }}
{{ if eq .Params.price "free" }}
<div style="margin-bottom: .4em;">Der Eintritt ist frei.</div>
{{ else }}
<div style="margin-bottom: .4em;">Eintritt: {{ .Params.price }}</div>
{{ end }}
{{ end }}
</div>
<div id="articleinner">
<div id="articledata">
{{- if .Resources.ByType "image" -}}
{{- $pic := index (.Resources.ByType "image") 0 -}}
{{ $thumb := "" }}
{{ if eq .Content "" }}
<div class="notext">
{{- $thumb = $pic.Resize "1024x" }}
{{ else }}
<div class="text">
{{- $thumb = $pic.Resize "2048x" }}
{{ end }}
<img src="{{- $thumb.Permalink -}}"/>
</div>
{{- end }}
<div id="articletext">
{{- if .Params.description -}}
{{- .Params.description -}}
{{- else -}}
{{- .Summary -}}
{{- end }}
{{ if .Truncated }}
<div id="readmore">{{- i18n "readmore" -}}..</div>
{{ end }}
</div>
</div>
</div>
</div>
</a></article>
{{ end }}
<a href="/news"><h2>{{ "news" | T }}</h2></a>
{{ $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 -}}

View File

@ -4,11 +4,13 @@
</a>
<div id="menu">
{{- range site.Params.mainSections -}}
{{ if ne . "news" }}
{{ $name := . | T }}
{{ if eq $name "" }}
{{ $name = . }}
{{ end }}
<a href="{{- . | relLangURL -}}">{{- $name | humanize -}}</a>
{{ end }}
{{- end -}}
</div>
</div>

View File

@ -8,33 +8,19 @@
{{ end }}
{{ end }}
{{ if $true }}
<h3 class="mt-4 taxonomy" id="categories-section">{{ T "categories" }}</h3>
<!-- <h3 class="mt-4 taxonomy" id="categories-section">{{ T "categories" }}</h3> -->
{{- $featured := where .Site.RegularPages "Params.featured" true }}
{{ if $featured }}
<li style="list-style: none;"><a href="{{ "/" | relLangURL}}{{ "featured" | urlize }}">{{ "featured" | T | humanize }}</a></li>
{{ end }}
{{- $recurrent := where .Site.RegularPages "Params.recurrent" true }}
{{ if $recurrent }}
<li style="list-style: none;"><a href="{{ "/" | relLangURL}}{{ "recurrent" | urlize }}">{{ "recurrent" | T | humanize }}</a></li>
{{ end }}
{{ range $taxonomyname, $taxonomy := where .Site.Taxonomies.categories ".Page.Section" .Section }}
<li style="list-style: none;"><a href="{{ "categories/" | relLangURL}}{{ $taxonomyname | urlize }}">{{ $taxonomyname | humanize }}</a></li>
{{ end }}
{{ end }}
{{ end }}
<div id="nav-posts">
{{- $posts := where .Site.RegularPages "Type" "in" $s.mainSections }}
{{- $featured := default 8 $s.numberOfFeaturedPosts }}
{{- with first $featured (where $posts "Params.featured" true)}}
<h3 class="mt-4">{{ T "featured_posts" }}</h3>
{{- range . }}
<a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a>
{{- end }}
{{- end }}
<h3 class="mt-4">{{ T "recurrent" }}</h3>
{{- $posts := where .Site.RegularPages "Params.recurrent" true }}
{{ range $posts }}
<a href="{{ .Permalink }}" class="nav-link" title="{{ .Title }}">{{ .Title }}</a>
{{ end }}
</div>
{{ end }}
</section>