bunteshaus.de/themes/buha/layouts/partials/structure/article_meta.html

43 lines
1.7 KiB
HTML
Raw Normal View History

2022-04-03 21:08:42 +02:00
{{ $invis := "none" }}
{{ $covid := "true" }}
{{ $price := "true" }}
{{ $contact := "true" }}
{{ $registeremail := "true" }}
{{ if .invis }}
{{ $invis = split .invis "," }}
{{ range $invis }}
{{ if eq . "covid" }}
{{ $covid = "false" }}
{{ end }}
{{ if eq . "price" }}
{{ $price = "false" }}
{{ end }}
{{ if eq . "contact" }}
{{ $contact = "false" }}
{{ end }}
{{ if eq . "registeremail" }}
{{ $registeremail = "false" }}
{{ end }}
{{ end }}
{{ end }}
<div id="articlemeta" style="font-size: smaller;">
{{ if and (ne .context.Params.when "") (ne .context.Params.when nil) }}
<div style="margin-bottom: .4em; font-size: medium;"><b>{{ .context.Params.when }}</b></div>
{{ end }}
{{ if and (ne .context.Params.price "") (ne .context.Params.price nil) (eq $price "true") }}
{{ if eq .context.Params.price "free" }}
<div>Der Eintritt ist frei.</div>
{{ else }}
<div>Eintritt: {{ .context.Params.price }}</div>
{{ end }}
{{ end }}
{{ if and (ne .context.Params.registeremail "") (ne .context.Params.registeremail nil) (eq $registeremail "true")}}
<div>Anmeldung unter {{ .context.Params.registeremail | markdownify }} erwünscht</div>
{{ end }}
{{ if and (ne .context.Params.covid "") (ne .context.Params.covid nil) (eq $covid "true") }}
<div>Es gilt die {{ .context.Params.covid }} Regel</div>
{{ end }}
{{ if and (ne .context.Params.contact "") (ne .context.Params.contact nil) (eq $contact "true") }}
<div>Kontakt: <a href="mailto://{{ .context.Params.contact }}">{{ .context.Params.contact }}</a></div>
{{ end }}
</div>