small fixes
This commit is contained in:
parent
81b2c05712
commit
96d0e35931
|
@ -4,20 +4,21 @@ keywords = "buntes haus celle, buntes haus, bunteshaus, celle, buntes haus e.V.,
|
|||
#do you want a contact page?
|
||||
contact = true
|
||||
|
||||
#do you want an archive?
|
||||
archive = true
|
||||
|
||||
#do you want a newsletter page?
|
||||
newsletter = true
|
||||
|
||||
#do you want a links page?
|
||||
links = true
|
||||
|
||||
#do you want an archive?
|
||||
archive = true
|
||||
# do you want an imprint?
|
||||
imprint = true
|
||||
|
||||
#do you want an media folder?
|
||||
media = true
|
||||
|
||||
# do you want an imprint?
|
||||
imprint = true
|
||||
|
||||
# what is seen in the header?
|
||||
mainMenu = ['about','news','events']
|
||||
|
@ -26,9 +27,7 @@ mainMenu = ['about','news','events']
|
|||
searchSections = ['news']
|
||||
|
||||
# how long stays a featrued article on frontpage as featured (in weeks)
|
||||
featured_expire = "13"
|
||||
|
||||
placeholder = "/images/no_article_pic.png"
|
||||
featured_expire = "8"
|
||||
|
||||
items_per_list = 5
|
||||
|
||||
|
|
|
@ -5,4 +5,6 @@ banner: false
|
|||
---
|
||||
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)
|
||||
|
|
|
@ -17,3 +17,19 @@
|
|||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,19 +1,30 @@
|
|||
{{- $pages := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}}
|
||||
{{- $title := lower .Title -}}
|
||||
{{- if or (.IsHome) (in .Site.Params.mainMenu .Section) -}}
|
||||
{{- $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" -}}
|
||||
{{- $pages = where $pages ".Params.when" "ne" nil -}}
|
||||
{{- $pages = where $pages ".Params.when" "ne" nil -}}
|
||||
{{- 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 }}
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{{ .Site.Title }}</title>
|
||||
<title>{{ $title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<description>Aktuelles von {{ .Site.Title }}</description>
|
||||
<description>{{- $desc -}}</description>
|
||||
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
|
||||
<language>{{.}}</language>{{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" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{- end -}}
|
||||
{{ range where $pages "Type" "in" .Site.Params.searchSections }}
|
||||
{{ range $pages }}
|
||||
{{ if or (eq .Lastmod .Date) (gt .Lastmod (.Date.AddDate 0 0 -1)) }}
|
||||
{{ $when := .Params.when }}
|
||||
{{ $about := .Params.about }}
|
||||
|
@ -44,9 +55,6 @@
|
|||
{{ $tags = $tags | append . }}
|
||||
{{ end }}
|
||||
{{ $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 = delimit $hash ", " }}
|
||||
{{ $hash = md5 $hash }}
|
||||
|
@ -58,16 +66,35 @@
|
|||
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
|
||||
<guid>{{ .Permalink }}-{{ $hash }}</guid>
|
||||
<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 -}}
|
||||
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
|
||||
{{- end -}}
|
||||
{{- $img := index (.Resources.ByType "image") 0 -}}
|
||||
{{- with $img -}}
|
||||
{{- $img := .Resize "500x" -}}
|
||||
{{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
|
||||
{{- $banner := .Resources.GetMatch "banner*" -}}
|
||||
{{- if $banner -}}
|
||||
{{- $c = printf "<img src=\"%s\" width=\"%d\" height=\"%d\" />%s" $banner.Permalink $banner.Width $banner.Height $c -}}
|
||||
{{- 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 -}}
|
||||
</description>
|
||||
|
||||
|
@ -75,3 +102,4 @@
|
|||
{{ end }}
|
||||
</channel>
|
||||
</rss>
|
||||
{{- end -}}
|
||||
|
|
|
@ -14,13 +14,19 @@
|
|||
|
||||
|
||||
{{ if $p }}
|
||||
<div style="display: flex; flex-direction: column;">
|
||||
{{ range $p }}
|
||||
<a href="{{ .Params.Link }}">
|
||||
<p>{{ .Title }}<br>
|
||||
{{ .Params.Link }}
|
||||
</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
<div class="links_wrapper">
|
||||
{{ range $p }}
|
||||
<div class="links" style="display: flex; flex-direction: column;">
|
||||
<a href="{{ .Params.Link }}" class="t">
|
||||
{{ .Title }}
|
||||
</a>
|
||||
<a href="{{ .Params.Link }}" class="p">
|
||||
{{ .Params.Link }}
|
||||
</a>
|
||||
<a href="{{ .Params.Link }}" class="s">
|
||||
{{ .Content }}
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -24,17 +24,6 @@
|
|||
{{ end }}
|
||||
<a href="{{- "newsletter" | absLangURL -}}">{{- $newsletter | strings.FirstUpper -}}</a>
|
||||
{{- 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 -}}
|
||||
{{ $links := "Links" }}
|
||||
{{ if i18n "links" }}
|
||||
|
@ -42,7 +31,18 @@
|
|||
{{ end }}
|
||||
<a href="{{- "links" | absLangURL -}}">{{- $links | strings.FirstUpper -}}</a>
|
||||
{{- 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" -}}
|
||||
{{- if .Permalink -}}
|
||||
{{- printf `<a href="%s">` .Permalink | safeHTML -}}
|
||||
|
|
Loading…
Reference in New Issue