small fixes

This commit is contained in:
teldra 2022-06-15 21:48:37 +02:00
parent 81b2c05712
commit 96d0e35931
6 changed files with 98 additions and 47 deletions

View File

@ -4,20 +4,21 @@ keywords = "buntes haus celle, buntes haus, bunteshaus, celle, buntes haus e.V.,
#do you want a contact page? #do you want a contact page?
contact = true contact = true
#do you want an archive?
archive = true
#do you want a newsletter page? #do you want a newsletter page?
newsletter = true newsletter = true
#do you want a links page? #do you want a links page?
links = true links = true
#do you want an archive? # do you want an imprint?
archive = true imprint = true
#do you want an media folder? #do you want an media folder?
media = true media = true
# do you want an imprint?
imprint = true
# what is seen in the header? # what is seen in the header?
mainMenu = ['about','news','events'] mainMenu = ['about','news','events']
@ -26,9 +27,7 @@ mainMenu = ['about','news','events']
searchSections = ['news'] searchSections = ['news']
# how long stays a featrued article on frontpage as featured (in weeks) # how long stays a featrued article on frontpage as featured (in weeks)
featured_expire = "13" featured_expire = "8"
placeholder = "/images/no_article_pic.png"
items_per_list = 5 items_per_list = 5

View File

@ -5,4 +5,6 @@ banner: false
--- ---
Konzerte: konzerte@bunteshaus.de Konzerte: konzerte@bunteshaus.de
![Anfahrt](1)
Routenplanung via [Googlemaps](https://www.google.com/maps/dir//Buntes+Haus+e.V.,+Hannoversche+Str.+30F,+29221+Celle/@52.6156635,10.0795909,17z/data=!4m16!1m6!3m5!1s0x47b0180746b97409:0xc85c7b0ba432ab1d!2sBuntes+Haus+e.V.!8m2!3d52.6156635!4d10.0817796!4m8!1m0!1m5!1m1!1s0x47b0180746b97409:0xc85c7b0ba432ab1d!2m2!1d10.0817796!2d52.6156635!3e1), [openrouteservice.org](https://maps.openrouteservice.org/#/directions/null/Hannoversche%20Stra%C3%9Fe%2030f,Celle,NI,Deutschland/data/55,130,32,198,15,97,4,224,38,9,96,59,2,24,5,192,166,6,113,0,184,72,129,92,1,178,32,26,66,72,27,128,70,0,24,3,165,160,14,0,153,105,96,54,0,89,189,182,142,2,176,112,9,202,64,75,122,29,168,10,224,29,128,95,14,76,120,138,226,20,136,8,0,29,83,192,136,155,14,80,0,188,160,5,181,205,67,134,173,208,32,3,55,132,93,46,112,1,60,193,18,64,28,192,45,52,116,111,98,100,104,117,16,91,116,123,116,0,196,48,23,60,0,200,51,51,116,68,88,116,88,16,0,95,44,160,0,0) Routenplanung via [Googlemaps](https://www.google.com/maps/dir//Buntes+Haus+e.V.,+Hannoversche+Str.+30F,+29221+Celle/@52.6156635,10.0795909,17z/data=!4m16!1m6!3m5!1s0x47b0180746b97409:0xc85c7b0ba432ab1d!2sBuntes+Haus+e.V.!8m2!3d52.6156635!4d10.0817796!4m8!1m0!1m5!1m1!1s0x47b0180746b97409:0xc85c7b0ba432ab1d!2m2!1d10.0817796!2d52.6156635!3e1), [openrouteservice.org](https://maps.openrouteservice.org/#/directions/null/Hannoversche%20Stra%C3%9Fe%2030f,Celle,NI,Deutschland/data/55,130,32,198,15,97,4,224,38,9,96,59,2,24,5,192,166,6,113,0,184,72,129,92,1,178,32,26,66,72,27,128,70,0,24,3,165,160,14,0,153,105,96,54,0,89,189,182,142,2,176,112,9,202,64,75,122,29,168,10,224,29,128,95,14,76,120,138,226,20,136,8,0,29,83,192,136,155,14,80,0,188,160,5,181,205,67,134,173,208,32,3,55,132,93,46,112,1,60,193,18,64,28,192,45,52,116,111,98,100,104,117,16,91,116,123,116,0,196,48,23,60,0,200,51,51,116,68,88,116,88,16,0,95,44,160,0,0)

View File

@ -17,3 +17,19 @@
.underline { .underline {
text-decoration: underline; text-decoration: underline;
} }
.links_wrapper {
display: flex;
flex-direction: column;
.links {
margin-bottom: 2em;
&:hover {
.t, .p {
text-decoration: underline;
}
.s {
text-decoration: none;
}
}
}
}

View File

@ -1,19 +1,30 @@
{{- $pages := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}} {{- if or (.IsHome) (in .Site.Params.mainMenu .Section) -}}
{{- $title := lower .Title -}} {{- $title := .Site.Title -}}
{{- $desc := "" -}}
{{- $i18n_section := i18n "news" -}}
{{- if .IsHome -}}
{{- $desc = printf "Aktuelle Informationen vom %s" $title -}}
{{- $title = printf "%s: %s" $title $i18n_section -}}
{{ else if in .Site.Params.mainMenu .Section }}
{{- $desc = printf "Aktuelle Informationen vom %s" .Site.Title -}}
{{ $i18n_section = i18n .Section }}
{{- $title = printf "%s: %s" .Site.Title $i18n_section -}}
{{- end -}}
{{- $pages := where (where site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}}
{{- if eq .Section "events" -}} {{- if eq .Section "events" -}}
{{- $pages = where $pages ".Params.when" "ne" nil -}} {{- $pages = where $pages ".Params.when" "ne" nil -}}
{{- end -}} {{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- $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>
<title>{{ .Site.Title }}</title> <title>{{ $title }}</title>
<link>{{ .Permalink }}</link> <link>{{ .Permalink }}</link>
<description>Aktuelles von {{ .Site.Title }}</description> <description>{{- $desc -}}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }} <language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
@ -23,7 +34,7 @@
{{- with .OutputFormats.Get "RSS" -}} {{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}} {{- end -}}
{{ range where $pages "Type" "in" .Site.Params.searchSections }} {{ range $pages }}
{{ if or (eq .Lastmod .Date) (gt .Lastmod (.Date.AddDate 0 0 -1)) }} {{ if or (eq .Lastmod .Date) (gt .Lastmod (.Date.AddDate 0 0 -1)) }}
{{ $when := .Params.when }} {{ $when := .Params.when }}
{{ $about := .Params.about }} {{ $about := .Params.about }}
@ -44,9 +55,6 @@
{{ $tags = $tags | append . }} {{ $tags = $tags | append . }}
{{ end }} {{ end }}
{{ $images := slice }} {{ $images := slice }}
{{ range .Resources.ByType "image" }}
{{ $images = $images | append . }}
{{ end }}
{{ $hash := slice $when $about $categories $events $covid $contact $price $featured $tags .Date .Lastmod .Title .Content }} {{ $hash := slice $when $about $categories $events $covid $contact $price $featured $tags .Date .Lastmod .Title .Content }}
{{ $hash = delimit $hash ", " }} {{ $hash = delimit $hash ", " }}
{{ $hash = md5 $hash }} {{ $hash = md5 $hash }}
@ -58,16 +66,35 @@
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}-{{ $hash }}</guid> <guid>{{ .Permalink }}-{{ $hash }}</guid>
<description> <description>
{{- $c := replace .Content "<img" "<img width=\"600\"" -}} {{- $c := .Content -}}
{{- $summary := "" -}}
{{- if in .RawContent "<!--more-->" -}}
{{- $tmp := split .RawContent "<!--more-->" -}}
{{- $c = index $tmp 0 | markdownify -}}
{{- else if $c -}}
{{- if hasPrefix .Summary "<p>" -}}
{{- $c = .Summary -}}
{{- else -}}
{{- $c = printf "<p>%s</p>" .Summary -}}
{{- end -}}
{{- end -}}
{{- if $when -}} {{- if $when -}}
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}} {{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
{{- end -}} {{- end -}}
{{- $img := index (.Resources.ByType "image") 0 -}} {{- $banner := .Resources.GetMatch "banner*" -}}
{{- with $img -}} {{- if $banner -}}
{{- $img := .Resize "500x" -}} {{- $c = printf "<img src=\"%s\" width=\"%d\" height=\"%d\" />%s" $banner.Permalink $banner.Width $banner.Height $c -}}
{{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
{{- end -}} {{- end -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
{{- range .Resources.ByType "image" -}}
{{- if not (hasPrefix . "banner") }}
{{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c .Permalink .Width .Height -}}
{{- end -}}
{{- end -}}
{{- printf "<![CDATA[%s]]>" ($c | safeHTML) -}}
{{- end -}} {{- end -}}
</description> </description>
@ -75,3 +102,4 @@
{{ end }} {{ end }}
</channel> </channel>
</rss> </rss>
{{- end -}}

View File

@ -14,13 +14,19 @@
{{ if $p }} {{ if $p }}
<div style="display: flex; flex-direction: column;"> <div class="links_wrapper">
{{ range $p }} {{ range $p }}
<a href="{{ .Params.Link }}"> <div class="links" style="display: flex; flex-direction: column;">
<p>{{ .Title }}<br> <a href="{{ .Params.Link }}" class="t">
{{ .Params.Link }} {{ .Title }}
</p> </a>
</a> <a href="{{ .Params.Link }}" class="p">
{{ end }} {{ .Params.Link }}
</a>
<a href="{{ .Params.Link }}" class="s">
{{ .Content }}
</a>
</div>
{{ end }}
</div> </div>
{{ end }} {{ end }}

View File

@ -24,17 +24,6 @@
{{ end }} {{ end }}
<a href="{{- "newsletter" | absLangURL -}}">{{- $newsletter | strings.FirstUpper -}}</a> <a href="{{- "newsletter" | absLangURL -}}">{{- $newsletter | strings.FirstUpper -}}</a>
{{- end -}} {{- end -}}
<a href="{{- "misc" | absLangURL -}}">Misc</a>
</div>
<div class="infobox">
{{- if eq site.Params.imprint true -}}
{{ $imprint := "Imprint" }}
{{ if i18n "imprint" }}
{{ $imprint = i18n "imprint" }}
{{ end }}
<a href="{{- "imprint" | absLangURL -}}">{{- $imprint | strings.FirstUpper -}}</a>
{{- end -}}
{{- if eq site.Params.links true -}} {{- if eq site.Params.links true -}}
{{ $links := "Links" }} {{ $links := "Links" }}
{{ if i18n "links" }} {{ if i18n "links" }}
@ -42,7 +31,18 @@
{{ end }} {{ end }}
<a href="{{- "links" | absLangURL -}}">{{- $links | strings.FirstUpper -}}</a> <a href="{{- "links" | absLangURL -}}">{{- $links | strings.FirstUpper -}}</a>
{{- end -}} {{- end -}}
{{- if not (or (eq .Section "featured") (eq .Section "about")) -}} {{- if eq site.Params.imprint true -}}
{{ $imprint := "Imprint" }}
{{ if i18n "imprint" }}
{{ $imprint = i18n "imprint" }}
{{ end }}
<a href="{{- "imprint" | absLangURL -}}">{{- $imprint | strings.FirstUpper -}}</a>
{{- end -}}
</div>
<div class="infobox">
<a href="{{- "misc" | absLangURL -}}">Misc</a>
{{- if or (in .Site.Params.mainMenu .Section) -}}
{{- with .OutputFormats.Get "rss" -}} {{- with .OutputFormats.Get "rss" -}}
{{- if .Permalink -}} {{- if .Permalink -}}
{{- printf `<a href="%s">` .Permalink | safeHTML -}} {{- printf `<a href="%s">` .Permalink | safeHTML -}}