bunteshaus.de/themes/buha/layouts/_default/single.html
2021-10-23 22:23:48 +02:00

61 lines
1.9 KiB
HTML

{{ define "title" }}
{{ if and (isset .Params "categories") (eq .Section "events") }}{{ index .Params.categories 0 }}: {{ end }}{{- .Title -}}
{{ end }}
{{ define "main" }}
{{ if eq .Description "nottranslated" }}
{{ $all_lang := $.Site.Home.Translations }}
{{ range site.RegularPages }}
<a href="{{ .Permalink}}">{{ .Name }}:</a>
{{ if .Translations }}
{{ range .Translations }}
{{ $t1 := .Language }}
{{ range $all_lang }}
{{- $a := .Language -}}
{{- $b := $.Site.Language.Lang -}}
{{ if ne $t1 .Language }}
missing: {{ .Language }}<br>
{{ end }}
{{ end }}
{{ end }}
{{ else }}
no translations<br>
{{ end }}
{{ end }}
{{ else }}
<article>
{{ if and (ne .Params.when "") (ne .Params.when nil) }}
<div style="margin-bottom: .4em;"><b>{{ .Params.when }}</b></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 }}
{{ if and (ne .Params.register "") (ne .Params.register nil) }}
<div>Anmeldung unter {{ .Params.register | markdownify }} erwünscht</div>
{{ end }}
{{ if and (ne .Params.covid "") (ne .Params.covid nil) }}
<div>Es gilt die {{ .Params.covid }} Regel</div>
{{ end }}
<div id="articledata">
{{- if .Resources.ByType "image" -}}
<div id="articleimage">
{{ range .Resources.ByType "image" }}
{{- $pic := . -}}
{{- $thumb := $pic.Resize "1024x" }}
<a href="{{ . }}"><img src="{{- $thumb.Permalink -}}"/></a>
{{ end }}
</div>
{{- end }}
<div id="articletext">
{{- .Content -}}
</div>
</div>
</article>
{{ end }}
{{ end }}