restructure #3

Merged
teldra merged 7 commits from teldra/bunteshaus.de:restructure into main 2022-04-10 02:35:43 +02:00
70 changed files with 1085 additions and 78 deletions
Showing only changes of commit 982cf4a66b - Show all commits

View File

@ -48,6 +48,10 @@ forms:
group: misc group: misc
input_type: checkbox input_type: checkbox
name: "Über uns" name: "Über uns"
- title: lastmod
group: misc
input_type: date
name: "Zurueckdatieren"
- title: tags - title: tags
group: misc group: misc
input_type: mc input_type: mc

View File

@ -2,14 +2,27 @@ todo buha.de
- anleitung git proxy fuer tor - anleitung git proxy fuer tor
- eintritt "gegen spende" - eintritt "gegen spende"
- covid regel verfeinern - covid regel verfeinern
- diskutieren, ob jede aenderung via rss raus soll (lastmod vs einmalig) - diskutieren, ob jede aenderung via rss raus soll (lastmod vs einmalig) (erstellung und lastmod gt date werden erstellt)
- generator form: aus mc ein checkbox machen und kategorien und/oder eventkategorien soloauswaehlbar machen. - 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?) - sollte kein bild gefunden werden, wird ein standard bild verwendet. ( einen pool fuer bestimmte kategorien)
- diskutieren, in welcher reihenfolge artikel angezeigt werden sollen. - diskutieren, in welcher reihenfolge artikel angezeigt werden sollen.
- links in content unterstrichen
- runde ecken? 2px
- stiftung via prefix filename vom bild. maximale hoehe =s wenigst hohe bild. beim footer
- generator "nachtrag": lastmod in frontmatter
- dokumentiere, das artikel der alten homepage "lastmod" mit demgenau bis ungefaehren datum der damligen erstellung, im frontmatter haben sollten, wann sie erstellt wurden. - dokumentiere, das artikel der alten homepage "lastmod" mit demgenau bis ungefaehren datum der damligen erstellung, im frontmatter haben sollten, wann sie erstellt wurden.
- rss: das macht, das nur neue und if (Lastmod = Date) or (Lastmod gt Date.AddDate 0 0 -1)
- push.sh: pushen optional? commit extra? commit --amend?
- https://schlomp.space/Bunteshaus/bunteshaus.de/src/branch/main/docs/artikel_formatierung.md#absatz: durcheinander
listen: listen:
mit preview: mit preview:
events events

View File

@ -116,7 +116,7 @@ article {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
margin-bottom: 2rem; margin-bottom: 2rem;
padding: 1rem 1rem 1rem 1rem; padding: 1rem;
} }
#articletext img { #articletext img {
@ -125,8 +125,10 @@ article {
width: 80%; width: 80%;
} }
#articlemeta { #articlemeta {
margin-bottom: 1rem; margin-bottom: 1rem;
margin-left: 1rem;
} }
#articlemeta div:first-child { #articlemeta div:first-child {
@ -137,7 +139,7 @@ article {
#articleinner { #articleinner {
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
margin-top: .5rem; margin-left: 1rem;
} }
#articletext { #articletext {

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
{{- partial "structure/head.html" . -}}
{{ block "css" . -}}{{- end }}
<body>
<div class="container">
<header>
{{ partialCached "structure/header" . }}
{{ partial "structure/submenu" . }}
</header>
<div class="content">
<main>
{{ block "title" . -}}{{- end }}
{{ block "content" . -}}{{- end }}
{{ block "main" . -}}{{- end }}
</main>
<aside class="right-sidebar">
{{ block "sidebar" . -}}{{- end }}
</aside>
</div>
{{ block "pagefooter" . -}}{{- end }}
<footer>
{{- partial "contentlayouts/footer" . -}}
</footer>
</div>
</body>
</html>

View File

@ -0,0 +1,12 @@
{{ define "title" }}
<h1>{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}</h1>
{{ end }}
{{ define "main" }}
{{ partial "debug" (dict "context" . ) }}
<article>
{{ range .Pages }}
<a href="{{ .Permalink }}">{{ .Name }}</a><br>
{{ end }}
</article>
{{ end }}

View File

@ -0,0 +1,75 @@
{{- $pages := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections -}}
{{- $title := lower .Title -}}
{{- if eq $title "events" -}}
{{- $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>
<link>{{ .Permalink }}</link>
<description>Aktuelles von {{ .Site.Title }}</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 }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- 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 }}
{{ $when := .Params.when }}
{{ $about := .Params.about }}
{{ $covid := .Params.covid }}
{{ $contact := .Params.contact }}
{{ $price := .Params.price }}
{{ $featured := .Params.featured }}
{{ $categories := slice }}
{{ range .Params.categories }}
{{ $categories = $categories | append . }}
{{ end }}
{{ $events := slice }}
{{ range .Params.events }}
{{ $events = $events | append . }}
{{ end }}
{{ $tags := slice }}
{{ range .Params.tags }}
{{ $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 }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}-{{ $hash }}</guid>
<description>
{{- $c := replace .Content "<img" "<img width=\"600\"" -}}
{{- if $when -}}
{{- $c = printf "<p><b>%s</b></p>%s" $when $c -}}
{{- end -}}
{{- $img := index (.Resources.ByType "image") 0 -}}
{{- with $img -}}
{{- $img := .Resize "640x" -}}
{{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
{{- end -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
</description>
</item>
{{ end }}
</channel>
</rss>

View File

@ -0,0 +1,46 @@
{{ define "title" }}
{{ $name := .Title }}
{{ if lower $name | i18n }}
{{ $name = lower $name | i18n }}
{{ end }}
<h1>{{ $name }}</h1>
{{ end }}
{{ define "main" }}
{{ partial "debug" (dict "context" . "caller" "single.html" )}}
<article>
{{ if eq .Type "tools" }}
<article>
{{ $tool := printf "misc/%s" .Params.tool }}
{{ partial $tool . }}
</article>
{{ else }}
<article>
{{ partial "contentlayouts/article.html" (dict "context" . "type" "article") }}
</article>
{{ end }}
{{ end }}
{{ define "pagefooter" }}
{{ if and (ne .Section "misc") (eq .Type "tools") }}
<div id="article_footer">
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}</b><br>
{{ .Date | time.Format ":date_full" }}
</div>
{{ if ne .Date .Lastmod }}
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}</b><br>
{{ .Lastmod | time.Format ":date_full" }}
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ define "sidebar" }}
{{ if ne .Type "tools" }}
{{- partial "contentlayouts/menu.html" . }}
{{ end }}
{{ end }}

View File

@ -11,8 +11,8 @@
<div class="content"> <div class="content">
<main> <main>
{{ block "title" . -}}{{- end }} {{ block "title" . -}}{{- end }}
{{ block "calc" . -}}{{- end }}
{{ block "content" . -}}{{- end }} {{ block "content" . -}}{{- end }}
{{ block "main" . -}}{{- end }}
</main> </main>
<aside class="right-sidebar"> <aside class="right-sidebar">
{{ block "sidebar" . -}}{{- end }} {{ block "sidebar" . -}}{{- end }}

View File

@ -1,12 +1,35 @@
{{ define "title" }} {{ define "title" }}
<h1>{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ "Misc" }}{{ end }}</h1> <h1>{{ if .Title }}{{ .Title }}{{ else }}{{ if i18n .Section }}{{ i18n .Section }}{{ else }}{{ .Section }}{{ end }}{{ end }}</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "content" }}
{{ partial "debug" (dict "context" . ) }} {{ partial "debug" (dict "context" . "caller" "list.html")}}
<article>
{{ range .Pages }} {{- $pages := where .Site.RegularPages "Permalink" "!=" .Permalink -}}
<a href="{{ .Permalink }}">{{ .Name }}</a><br>
{{ end }} {{ $partial := "layout/lists/article_list" }}
</article> {{ $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" }}
{{ else }}
{{ $partial = "snippets/single_chooser" }}
{{ $pic = "false" }}
{{ end }}
{{ if eq .Kind "term" }}
{{- $pages = .Data.Pages -}}
{{ $partial = "layout/lists/term_list" }}
{{ end }}
{{ $partial := string $partial }}
{{ partial $partial (dict "context" . "pages" $pages "amount" "5" "title" $title "content" .Content "pic" $pic) }}
{{ end }} {{ end }}

View File

@ -24,6 +24,7 @@
{{ 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 where $pages "Type" "in" .Site.Params.searchSections }}
{{ if or (eq .Lastmod .Date) (gt .Lastmod (.Date.AddDate 0 0 -1)) }}
{{ $when := .Params.when }} {{ $when := .Params.when }}
{{ $about := .Params.about }} {{ $about := .Params.about }}
{{ $covid := .Params.covid }} {{ $covid := .Params.covid }}
@ -67,6 +68,7 @@
{{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}} {{- $c = printf "%s<img src=\"%s\" width=\"%d\" height=\"%d\" />" $c $img.Permalink $img.Width $img.Height -}}
{{- end -}} {{- end -}}
{{- printf "<![CDATA[%s]]>" $c | safeHTML -}} {{- printf "<![CDATA[%s]]>" $c | safeHTML -}}
{{- end -}}
</description> </description>
</item> </item>

View File

@ -1,46 +1,7 @@
{{ define "title" }} {{ define "title" }}
{{ $name := .Title }} <h1>{{ if (i18n .Title (dict "Count" 0))}}{{ i18n .Title (dict "Count" 0) }}{{ else }}{{ .Title }}{{ end }}</h1>
{{ if lower $name | i18n }}
{{ $name = lower $name | i18n }}
{{ end }}
<h1>{{ $name }}</h1>
{{ end }} {{ end }}
{{ define "main" }} {{ define "content" }}
{{ partial "debug" (dict "context" . "caller" "single.html" )}} {{ partial "snippets/single_chooser" (dict "context" . "pic" "true") }}
<article>
{{ if eq .Type "tools" }}
<article>
{{ $tool := printf "misc/%s" .Params.tool }}
{{ partial $tool . }}
</article>
{{ else }}
<article>
{{ partial "contentlayouts/article.html" (dict "context" . "type" "article") }}
</article>
{{ end }}
{{ end }}
{{ define "pagefooter" }}
{{ if and (ne .Section "misc") (eq .Type "tools") }}
<div id="article_footer">
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "created" }}{{ i18n "created" }}{{ else }}{{ "Created" }}{{ end }}</b><br>
{{ .Date | time.Format ":date_full" }}
</div>
{{ if ne .Date .Lastmod }}
<div style="flex-grow: 1; flex-direction: column;">
<b>{{ if i18n "lastmod" }}{{ i18n "lastmod" }}{{ else }}{{ "Last modification" }}{{ end }}</b><br>
{{ .Lastmod | time.Format ":date_full" }}
</div>
{{ end }}
</div>
{{ end }}
{{ end }}
{{ define "sidebar" }}
{{ if ne .Type "tools" }}
{{- partial "contentlayouts/menu.html" . }}
{{ end }}
{{ end }} {{ end }}

View File

@ -1,10 +1,8 @@
{{ define "title" }} {{ define "title" }}
{{ if .Content }} <h1>{{ .Title }}</h1>
<h1>{{ .Title }}</h1>
{{ end }}
{{ end }} {{ end }}
{{ define "main" }} {{ define "content" }}
{{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }} {{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }}
{{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }} {{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }}
{{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }} {{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }}
@ -13,28 +11,14 @@
{{- $paginator := .Paginate $posts -}} {{- $paginator := .Paginate $posts -}}
{{ if eq $paginator.PageNumber 1 }} {{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }} {{ if ne .Content "" }}
<article> {{ partial "snippets/content" (dict "content" .Content) }}
{{ .Content }}
</article>
{{ end }} {{ end }}
{{ if gt (len $featured) 0 }} {{ partial "layout/lists/article_list" (dict "context" . "pages" $featured "amount" "3" "title" "Featured") }}
<a href="/featured"><h2 style="margin-left: .5rem;">{{if "featured" | i18n }}{{ "featured" | i18n }}{{ else }}{{ "Featured" }}{{ end }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" ) }}
{{ end }}
{{ end }} {{ end }}
{{ if gt (len $posts) 1 }} {{ if gt (len $posts) 1 }}
<a href="/news"><h2 style="margin-left: .5rem;">{{ if "news" | i18n }}{{ "news" | i18n }}{{ else }}{{ "News" }}{{ end }}</h2></a> {{ partial "layout/lists/article_list" (dict "context" . "paginator" $paginator "amount" "5" "title" "News") }}
{{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5") }}
<div id="pagination_outer" style="display: flex; justify-content: center;"> <div id="pagination_outer" style="display: flex; justify-content: center;">
{{ partial "structure/paginator" (dict "paginator" $paginator) }} {{ partial "snippets/paginator" (dict "paginator" $paginator) }}
</div> </div>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ define "sidebar" }}
{{- partial "contentlayouts/menu.html" . }}
{{ end }}

View File

@ -0,0 +1,40 @@
{{ define "title" }}
{{ if .Content }}
<h1>{{ .Title }}</h1>
{{ end }}
{{ end }}
{{ define "main" }}
{{- $all := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" .Site.Params.searchSections }}
{{ $days := int (mul (mul (int .Site.Params.featured_expire) 7) -1) }}
{{ $featured := where (where (where $all ".Params.featured" "=" true) "Type" "in" .Site.Params.searchSections) ".Params.Lastmod" "gt" (now.AddDate 0 0 $days) }}
{{ $featured = $all | intersect $featured }}
{{ $posts := $all | complement $featured }}
{{- $paginator := .Paginate $posts -}}
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}
<article>
{{ .Content }}
</article>
{{ end }}
{{ if gt (len $featured) 0 }}
<a href="/featured"><h2 style="margin-left: .5rem;">{{if "featured" | i18n }}{{ "featured" | i18n }}{{ else }}{{ "Featured" }}{{ end }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" ) }}
{{ end }}
{{ end }}
{{ if gt (len $posts) 1 }}
<a href="/news"><h2 style="margin-left: .5rem;">{{ if "news" | i18n }}{{ "news" | i18n }}{{ else }}{{ "News" }}{{ end }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5") }}
<div id="pagination_outer" style="display: flex; justify-content: center;">
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
</div>
{{ end }}
{{ end }}
{{ define "sidebar" }}
{{- partial "contentlayouts/menu.html" . }}
{{ end }}

View File

@ -0,0 +1,51 @@
{{ $showmeta := "false" }}
{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact" .context.Params.contact "covid"
.context.Params.covid }}
{{ if eq .type "list" }}
{{ $metas = dict "when" .context.Params.when "price" .context.Params.price }}
{{ end }}
{{ partial "contentlayouts/meta.html" $metas }}
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{ $placeholder := site.Params.placeholder }}
{{ if ne .context.Section "misc"}}
{{ $img = resources.Get $placeholder }}
{{- $thumb = $img.Resize "1024x" }}
{{ end }}
{{- if or (.context.Resources.ByType "image") (.Summary) ($img) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
{{- if and (.context.Resources.ByType "image") (ne .context.Section "misc") -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ if ne .context.Content "" }}
{{- $thumb = $img.Resize "2048x" }}
{{ end }}
{{ end }}
<div id="articleinner">
{{ if ne $img "" }}
<div id="articlepicture" class="{{ $small }} borderrad25">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ .TableOfContents }}{{ end }}
</div>
{{ end }}
{{- if or .context.Content .context.Summary -}}
<div id="articletext" class="{{ $big }}">
{{ 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">{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..</div>
{{ end }}
</div>
{{- end }}
</div>

View File

@ -0,0 +1,55 @@
{{- if eq site.Params.contact true }}
<div class="infobox">
{{ $contact := "Contact" }}
{{ if i18n "contact" }}
{{ $contact = i18n "contact" }}
{{ end }}
<a href="{{- "contact" | absLangURL -}}">{{- $contact | strings.FirstUpper -}}:</a><br><br>
{{- partial "structure/contact" -}}
</div>
{{- end -}}
<div class="infobox">
{{- if eq site.Params.archive true -}}
{{ $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" }}
{{ $newsletter = i18n "newsletter" }}
{{ end }}
<a href="{{- "newsletter" | absLangURL -}}">{{- $newsletter | strings.FirstUpper -}}</a><br><br>
{{- end -}}
<a href="{{- "misc" | absLangURL -}}">Misc</a><br><br>
</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><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 -}}
{{- if not (or (eq .Section "featured") (eq .Section "about")) -}}
{{- with .OutputFormats.Get "rss" -}}
{{- if .Permalink -}}
{{- printf `<a href="%s">` .Permalink | safeHTML -}}
{{- end -}}
RSS</a><br><br>
{{- end -}}
{{ end }}
<a href="https://schlomp.space/Bunteshaus/bunteshaus.de">Sourcecode</a>
</div>

View File

@ -0,0 +1 @@

View File

@ -0,0 +1,27 @@
{{ if gt .Site.Taxonomies.categories 0 }}
<li class="align_menu"><a href="{{ "/news" | relLangURL}}"><h3>{{ if i18n "news" }}{{ i18n "news" }}{{ else }}{{ "News" }}{{ end }}</h3></a></li>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.categories }}
{{ $orig := $taxonomyname }}
{{ if ne (i18n $taxonomyname) "" }}
{{ $taxonomyname = i18n $taxonomyname }}
{{ else }}
{{ $taxonomyname = $taxonomyname | humanize }}
{{ end }}
<li class="align_menu"><a href="{{ "categories/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}
{{ end }}
{{ if gt .Site.Taxonomies.events 0 }}
<li class="align_menu"><a href="{{ "/events" | relLangURL}}"><h3>{{ if i18n "events" }}{{ i18n "events" }}{{ else }}{{ "Events" }}{{ end }}</h3></a></li>
{{ range $taxonomyname, $taxonomy := .Site.Taxonomies.events }}
{{ $orig := $taxonomyname }}
{{ if ne (i18n $taxonomyname) "" }}
{{ $taxonomyname = i18n $taxonomyname }}
{{ else }}
{{ $taxonomyname = $taxonomyname | humanize }}
{{ end }}
<li class="align_menu"><a href="{{ "events/" | relLangURL}}{{ $orig | urlize }}">{{ $taxonomyname }}</a></li>
{{ end }}
{{ end }}
{{ if .IsHome }}
{{ partial "structure/langs" . }}
{{ end }}

View File

@ -0,0 +1,18 @@
<div id="articlemeta" style="font-size: smaller;">
{{ if .when }}
<div>{{ .when }}</div>
{{ end }}
{{ if .price }}
{{ if eq .price "free" }}
<div>{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}</div>
{{ else }}
<div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .price }}</div>
{{ 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>
{{ end }}
{{ if .covid }}
<div>Covid: {{ .covid }}</div>
{{ end }}
</div>

View File

@ -0,0 +1,29 @@
{{ $name := .context.Title }}
{{ $title := lower .context.Title }}
{{ range $taxonomyname, $taxonomy := .context.Site.Taxonomies }}
{{ if eq $title $taxonomyname }}
{{ range $key, $value := $taxonomy }}
<a href="{{ printf "%s" $key }}">{{ $key }}</a>
{{ end }}
{{ end }}
{{ end }}
{{ if and site.Params.debug false }}
{{ range $taxonomyname, $taxonomy := .context.Site.Taxonomies }}
<li><a href="/{{ $taxonomyname | urlize }}">{{ $taxonomyname }}</a>
<ul>
{{ range $key, $value := $taxonomy }}
<li> {{ $key }} </li>
<ul>
{{ range $value.Pages }}
<li hugo-nav="{{ .RelPermalink}}"><a href="{{ .Permalink}}"> {{ .LinkTitle }} </a> </li>
{{ end }}
</ul>
{{ end }}
</ul>
</li>
{{ end }}
{{ end }}

View File

@ -0,0 +1,8 @@
{{ if eq site.Params.debug true }}
Title: {{ .context.Title }}<br>
Name: {{ .context.Name }}<br>
section: {{ .context.Section }}<br>
type: {{ .context.Type }}<br>
{{ if .caller }}caller: {{ .caller }}<br>{{ end }}
kind: {{ .context.Kind }}
{{ end }}

View File

@ -0,0 +1,6 @@
{{ site.Title }}<br>
{{ 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.mail }}<p>{{ if i18n "mail" }}{{ i18n "mail" }}{{ else }}{{ "mail" }}{{ end }}: {{ site.Params.imprintdata.mail | markdownify }}{{ end }}</p>

View File

@ -0,0 +1,27 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ $stylecolor := resources.Get "css/color.css" }}
{{ $stylelayout := resources.Get "css/layout.css" }}
{{ $allcss := slice $stylecolor $stylelayout | resources.Concat "/css/vendor.css" | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $allcss.RelPermalink }}" integrity="{{ $allcss.Data.Integrity }}">
{{ $title := print .Site.Title " | " .Title }}
{{ if .IsHome }}{{ $title = .Site.Title }}{{ end }}
<title>{{ $title }}</title>
<meta property="og:title" content="{{ site.Title }}" />
<link rel="canonical" href="{{ .Permalink }}">
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ if .Site.Params.keywords -}}
<meta name="keywords" content="{{ .Site.Params.keywords }}" />
{{- end }}
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
{{ template "_internal/opengraph.html" . }}

View File

@ -0,0 +1,15 @@
<div id="headerinner">
<a href="/">
<img src="/images/logo.svg" alt="SVG mit img laden" width="auto" height="100%" >
</a>
<div id="menu">
{{- range site.Params.mainMenu -}}
{{ $name := . }}
{{ if i18n . }}
{{ $name = i18n . }}
{{ end }}
<a href="{{- . | relLangURL -}}">{{- $name | humanize -}}</a>
{{- end -}}
</div>
</div>

View File

@ -0,0 +1,10 @@
{{ if not .IsHome }}
{{ if .Translations }}
<li class="align_menu"><h3>{{ "Languages" }}</h3></li>
{{ range .Translations }}
{{ if ne .Lang $.Lang }}
<li class="align_menu"><a href="{{- .Permalink -}}">{{- if i18n .Lang -}}{{- i18n .Lang -}}{{- else -}}{{- humanize .Lang -}}{{ end }}</a></li>
{{ end }}
{{ end }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,102 @@
{{ $paginator := .paginator}}
<div id="pagination_outer" style="display: flex; justify-content: center;">
<div id="pagination">
<!-- Number of links either side of the current page. -->
{{ $adjacent_links := 2 }}
<!-- $max_links = ($adjacent_links * 2) + 1 -->
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
<!-- $lower_limit = $adjacent_links + 1 -->
{{ $lower_limit := (add $adjacent_links 1) }}
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links -->
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<!-- First page. -->
{{ if ne $paginator.PageNumber 1 }}
<a class="pagination__link pagination__link--first" href="{{ $paginator.First.URL }}">
««
</a>
{{ end }}
<!-- Previous page. -->
{{ if $paginator.HasPrev }}
<a href="{{ $paginator.Prev.URL }}" class="pagination__link pagination__link--previous">
«
</a>
{{ end }}
<!-- Page numbers. -->
{{ range $paginator.Pagers }}
{{ $page_number_flag := false }}
<!-- Advanced page numbers. -->
{{ if gt $paginator.TotalPages $max_links }}
<!-- Lower limit pages. -->
<!-- If the user is on a page which is in the lower limit. -->
{{ if le $paginator.PageNumber $lower_limit }}
<!-- If the current loop page is less than max_links. -->
{{ if le .PageNumber $max_links }}
{{ $page_number_flag = true }}
{{ end }}
<!-- Upper limit pages. -->
<!-- If the user is on a page which is in the upper limit. -->
{{ else if ge $paginator.PageNumber $upper_limit }}
<!-- If the current loop page is greater than total pages minus $max_links -->
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
{{ $page_number_flag = true }}
{{ end }}
<!-- Middle pages. -->
{{ else }}
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
{{ $page_number_flag = true }}
{{ end }}
{{ end }}
<!-- Simple page numbers. -->
{{ else }}
{{ $page_number_flag = true }}
{{ end }}
<!-- Output page numbers. -->
{{ if eq $page_number_flag true }}
<a href="{{ .URL }}" class="pagination__link">
{{ if eq $paginator.PageNumber .PageNumber }}<b>{{ end }}
{{ .PageNumber }}
{{ if eq $paginator.PageNumber .PageNumber }}</b>{{ end }}
</a>
{{ end }}
{{ end }}
<!-- Next page. -->
{{ if $paginator.HasNext }}
<a href="{{ $paginator.Next.URL }}" class="pagination__link pagination__link--next">
»
</a>
{{ end }}
<!-- Last page. -->
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
<a class="pagination__link pagination__link--last" href="{{ $paginator.Last.URL }}">
»»
</a>
{{ end }}
{{ end }}
</div>
</div>

View File

@ -0,0 +1,2 @@
{{ partial "contentlayouts/menu.html" . }}

View File

@ -0,0 +1,8 @@
<div>
<details>
<summary style="list-style: none; text-align: right;">Menü ☰</summary>
<p>
{{ partial "contentlayouts/menu.html" . }}
</p>
</details>
</div>

View File

@ -3,6 +3,8 @@ Title: {{ .context.Title }}<br>
Name: {{ .context.Name }}<br> Name: {{ .context.Name }}<br>
section: {{ .context.Section }}<br> section: {{ .context.Section }}<br>
type: {{ .context.Type }}<br> type: {{ .context.Type }}<br>
layout: {{ .context.Layout }}<br>
{{ if .caller }}caller: {{ .caller }}<br>{{ end }} {{ if .caller }}caller: {{ .caller }}<br>{{ end }}
kind: {{ .context.Kind }} kind: {{ .context.Kind }}<br>
is page: {{ if .context.IsPage }}yes{{end}}<br>
{{ end }} {{ end }}

View File

@ -0,0 +1,29 @@
{{ if and .amount (or .paginator .pages) }}
{{ $amount := .amount }}
{{ $pages := "" }}
{{ if .pages }}
{{ $pages = .pages.ByLastmod.Reverse }}
{{ else if .paginator }}
{{ $pages = .paginator.Pages.ByLastmod.Reverse }}
{{ end }}
{{ if .content }}
{{ partial "snippets/content" (dict "content" .content) }}
{{ end }}
{{- if gt (len $pages) 0 -}}
{{ if .title }}<h2>{{ .title }}</h2>{{ end }}
{{- range first $amount $pages -}}
<article class="articlebgcol1 borderrad25">
<a href="{{- .Permalink -}}">
<div id="articletitle">
<h2>{{- .Title -}}</h2>
</div>
</a>
<a href="{{- .Permalink -}}">
<div id="articlecontent">
{{ partial "layout/single/article" (dict "context" . "type" "list" "pic" "true") }}
</div>
</a>
</article>
{{ end }}
{{ end }}
{{ end }}

View File

@ -0,0 +1,5 @@
<article>
{{ range .context.Pages }}
<a href="{{ .Permalink }}">🗀 {{ .Title }}</a>
{{ end }}
</article>

View File

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

View File

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

View File

@ -0,0 +1,14 @@
{{ 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}}

View File

@ -0,0 +1,48 @@
{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact" .context.Params.contact "covid"
.context.Params.covid }}
{{ if eq .type "list" }}
{{ $metas = dict "when" .context.Params.when "price" .context.Params.price }}
{{ end }}
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{ $placeholder := site.Params.placeholder }}
{{- if or (.context.Resources.ByType "image") (.context.Summary) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{ if ne .context.Content "" }}
{{- $thumb = $img.Resize "2048x" }}
{{ else if .type "list" }}
{{- $thumb = $img.Resize "500x" }}
{{ end }}
{{ end }}
{{ partial "snippets/article_metadata" $metas }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic "true")}}
<div id="articlepicture" class="{{ $small }} borderrad25">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>
{{ end }}
{{- if or .context.Content .context.Summary -}}
<div id="articletext" class="{{ $big }}">
{{ 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">{{- if i18n "readmore" -}}{{- i18n "readmore" -}}{{- else -}}{{- "readmore" -}}{{- end -}}..</div>
{{ end }}
</div>
{{- end }}
</div>

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 }} borderrad25">
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
<img src="{{- $thumb.Permalink -}}" class="borderrad25" />
{{ 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,17 @@
{{ define "css" }}
<link rel="stylesheet" href="/css/visibleIf.css" type="text/css" />
{{ end }}
<article class="minmax">
<div style="flex-direction: row;">
{{ .Content }}
</div>
<noscript><p><b>Bitte aktiviere Javascript, sonst funktioniert der Generator nicht.</b></p></noscript>
{{ if (index .context.Params.forms 0) }}
{{ partial "layout/single/generator/form" (dict "context" .context "form" 0) }}
{{ end }}
</article>
<script defer language="javascript" type="text/javascript" src="{{ "/js/visibleIf.js" | urlize | relURL }}"></script>
<script defer language="javascript" type="text/javascript" src="{{ "/js/generator.js" | urlize | relURL }}"></script>

View File

@ -0,0 +1,3 @@
<input type="checkbox" name="{{ .name }}" id="{{ .name }}" value="true" style="font-size: smaller; margin-right: 0;" >
<label for="{{ .name }}" style="font-size: smaller; margin: 0;"> {{ if i18n "expand" }}{{ i18n "expand" }}{{ else }}{{ "expand" }}{{ end }}</label>

View File

@ -0,0 +1,142 @@
{{ $pageform := (index .context.Page.Params.forms .form) }}
{{ $group := slice }}
{{ $divide := .context.Page.Params.divide }}
<form id="myform">
{{ range $pageform.fields }}
{{ $title := .title }}
{{ $name := $title }}
{{ if .name }}
{{ $name = .name }}
{{ end }}
{{ if and .group (not (in $group .group))}}
<div class="margin_top_1rem">
{{ if i18n (singularize .group) }}{{ i18n (singularize .group) }}{{ else }}{{ humanize .group }}{{ end }}
{{ partial "layout/single/generator/expand" (dict "name" (printf "%sgroup" .group)) }}
</div>
{{ $group = $group | append .group }}
{{ end }}
{{ if eq .input_type "title" }}
<h3 {{ if .group }}class="visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ end }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</h3>
{{ else if eq .input_type "textarea" }}
<div {{ if .group }}class="visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ end }}>
<label {{ if $pageform.names }}sr-only{{ end }} for="{{ .title }}">{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<textarea name="{{ .title }}" id="{{ .title }}" rows="10" {{ if $pageform.names }}placeholder="{{ .name }}{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}></textarea>
</div>
{{ else if eq .input_type "radio" }}
<div class="radio {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label><input type="radio" name="{{ .title }}" id="{{ .title }}" value="{{ .name }}" {{ .Scratch.Get "requiredtext" }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
</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="{{ .title }}" id="{{ .title }}" value="{{ .name }}" {{ .Scratch.Get "requiredtext" }}>{{- $name -}}{{- if .required -}}{{- " *" -}}{{- 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="{{- $name -}}" onclick="showInput(event);" />
</div>
{{ else if eq .input_type "mc" }}
{{ $in0 := .title }}
{{- $finale := slice -}}
{{ $pages := where site.RegularPages "Type" "in" site.Params.searchSections }}
{{ if eq .title "tags" }}
{{ range $pages }}
{{- if .Params.tags -}}
{{- $finale = $finale | append .Params.tags -}}
{{ end }}
{{ end }}
{{ else }}
{{ range $pages }}
{{ range .Param $in0 }}
{{- $finale = $finale | append . -}}
{{ end }}
{{ end }}
{{ end }}
{{- $finale = $finale | uniq -}}
<div class="margin_top_1rem {{- if .group }} visibleIf" data-visibleif-rule="{{ .group }}group == 'true'"{{ else }}"{{ end }} style="flex-direction: column;">
<div class="{{- if .group }}margin_left_1rem{{ end }}">
{{ .name }}
{{ if ne .expanded true }}{{ partial "layout/single/generator/expand" (dict "name" (printf "%scat" $in0)) }}{{ end }}{{- if .required -}}{{- " *" -}}{{- end -}}
</div>
<div class="checkbox {{ if ne .expanded true }}visibleIf" data-visibleif-rule="{{ $in0 }}cat == 'true'{{end}}">
<div class="{{- if .group }} margin_left_1rem{{ end }} minmax" style="display: flex; flex-direction: column;">
<fieldset id="{{ $in0 }}" name="{{ $in0 }}" style="display: flex; flex-direction: row; padding: 0; border: none; margin: 0 0 .3rem .5rem;">
{{ range sort $finale }}
<input type="checkbox" name="{{ $in0 }}" id="{{ $in0 }}-cat" value="{{ . }}"><label for="{{ $in0 }}-cat">{{ . }}</label>
{{ end }}
</fieldset>
{{ if .new }}
<label id="label" for="new{{- .title -}}">{{ .new }} <span style="font-size: x-small;">({{ $divide }})</span></label>
<input type="text" name="new{{- .title -}}" id="new{{- .title -}}" value="" placeholder="{{ .eg }}" />
{{ end }}
</div>
</div>
</div>
{{ else }}
{{ if eq .title "name" }}
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="firstname">First name{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<input type="text" name="firstname" id="firstname" {{ if $pageform.names }}placeholder="First name{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="lastname">Last name{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<input type="text" name="lastname" id="lastname" {{ if $pageform.names }}placeholder="Last name{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
{{ else if eq .title "address" }}
<div {{- if .group }} class="visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'"{{ end -}}>
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="address">Address{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<input type="text" name="address" id="address" {{ if $pageform.names }}placeholder="Address{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true{{ end }}">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="city">City{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<input type="text" name="city" id="city" {{ if $pageform.names }}placeholder="City{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
<div class="half {{- if .group }} visibleIf margin_left_1rem" data-visibleif-rule="{{ .group }}group == 'true'{{ end }}">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="postalcode">Postal code{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<input type="text" name="postalcode" id="postalcode" {{ if $pageform.names }}placeholder="Postal code{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
{{ else }}
<div class="margin_top_1rem {{ if .group }} visibleIf margin_left_1rem" data-visibleif-rule=" {{ .group }}group == 'true' {{ end }}" class="minmax">
<div class="minmax" style="display: flex; flex-direction: column;">
<label class="{{ if $pageform.names }}sr-only{{ end }}" for="{{ .title }}">{{ .name }}{{- if .required -}}{{- " *" -}}{{- end -}}</label>
<input type="{{ .input_type }}" name="{{ .title }}" id="{{ .title }}" {{ if $pageform.names }}placeholder="{{ .name }}{{ .Scratch.Get "requiredstar" }}"{{ end }} {{ .Scratch.Get "requiredtext" }}>
</div>
</div>
{{ end }}
{{ end }}
{{ end }}
</form>

View File

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

View File

@ -0,0 +1 @@
nl

View File

@ -0,0 +1,21 @@
{{ if or .when .price .contact .covid }}
<div id="articlemeta" style="font-size: smaller;">
{{ if .when }}
<div>{{ .when }}</div>
{{ end }}
{{ if .price }}
{{ if eq .price "free" }}
<div>{{ if i18n "freeentry" }}{{ i18n "freeentry" }}{{ else }}{{ "Free Entry" }}{{ end }}</div>
{{ else }}
<div>{{ if i18n "entry" }}{{ i18n "entry" }}{{ else }}{{ "Entry" }}{{ end }}: {{ .price }}</div>
{{ 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>
{{ end }}
{{ if .covid }}
<div>Covid: {{ .covid }}</div>
{{ end }}
</div>
{{ end }}

View File

@ -0,0 +1,6 @@
{{ site.Title }}<br>
{{ 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.mail }}<p>{{ if i18n "mail" }}{{ i18n "mail" }}{{ else }}{{ "mail" }}{{ end }}: {{ site.Params.imprintdata.mail | markdownify }}{{ end }}</p>

View File

@ -0,0 +1 @@
<article>{{ .content }}</article>

View File

@ -0,0 +1,102 @@
{{ $paginator := .paginator}}
<div id="pagination_outer" style="display: flex; justify-content: center;">
<div id="pagination">
<!-- Number of links either side of the current page. -->
{{ $adjacent_links := 2 }}
<!-- $max_links = ($adjacent_links * 2) + 1 -->
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
<!-- $lower_limit = $adjacent_links + 1 -->
{{ $lower_limit := (add $adjacent_links 1) }}
<!-- $upper_limit = $paginator.TotalPages - $adjacent_links -->
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
<!-- If there's more than one page. -->
{{ if gt $paginator.TotalPages 1 }}
<!-- First page. -->
{{ if ne $paginator.PageNumber 1 }}
<a class="pagination__link pagination__link--first" href="{{ $paginator.First.URL }}">
««
</a>
{{ end }}
<!-- Previous page. -->
{{ if $paginator.HasPrev }}
<a href="{{ $paginator.Prev.URL }}" class="pagination__link pagination__link--previous">
«
</a>
{{ end }}
<!-- Page numbers. -->
{{ range $paginator.Pagers }}
{{ $page_number_flag := false }}
<!-- Advanced page numbers. -->
{{ if gt $paginator.TotalPages $max_links }}
<!-- Lower limit pages. -->
<!-- If the user is on a page which is in the lower limit. -->
{{ if le $paginator.PageNumber $lower_limit }}
<!-- If the current loop page is less than max_links. -->
{{ if le .PageNumber $max_links }}
{{ $page_number_flag = true }}
{{ end }}
<!-- Upper limit pages. -->
<!-- If the user is on a page which is in the upper limit. -->
{{ else if ge $paginator.PageNumber $upper_limit }}
<!-- If the current loop page is greater than total pages minus $max_links -->
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
{{ $page_number_flag = true }}
{{ end }}
<!-- Middle pages. -->
{{ else }}
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
{{ $page_number_flag = true }}
{{ end }}
{{ end }}
<!-- Simple page numbers. -->
{{ else }}
{{ $page_number_flag = true }}
{{ end }}
<!-- Output page numbers. -->
{{ if eq $page_number_flag true }}
<a href="{{ .URL }}" class="pagination__link">
{{ if eq $paginator.PageNumber .PageNumber }}<b>{{ end }}
{{ .PageNumber }}
{{ if eq $paginator.PageNumber .PageNumber }}</b>{{ end }}
</a>
{{ end }}
{{ end }}
<!-- Next page. -->
{{ if $paginator.HasNext }}
<a href="{{ $paginator.Next.URL }}" class="pagination__link pagination__link--next">
»
</a>
{{ end }}
<!-- Last page. -->
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
<a class="pagination__link pagination__link--last" href="{{ $paginator.Last.URL }}">
»»
</a>
{{ end }}
{{ end }}
</div>
</div>

View File

@ -0,0 +1,22 @@
{{ partial "debug" (dict "context" .context "caller" "single_chooser.html")}}
{{ $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" }}
{{ $partial = "layout/single/generator" }}
{{ end }}
<article>
{{ partial $partial (dict "context" .context "pic" $pic "content" .context.Content "partial_before" $partial_before) }}
</article>