forked from Bunteshaus/bunteshaus.de
88 lines
3.7 KiB
HTML
88 lines
3.7 KiB
HTML
{{ $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" }}
|
|
|
|
{{- if or (.context.Resources.ByType "image") (.context.Summary) -}}
|
|
{{ $small = "multiple_small" }}
|
|
{{ $big = "multiple_big" }}
|
|
{{ else }}
|
|
{{ $small = "multiple_big"}}
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ partial "snippets/article_metadata" $metas }}
|
|
<div id="articleinner">
|
|
{{- if and (.context.Resources.ByType "image") (eq .pic "true") -}}
|
|
{{ $resize := "500x" }}
|
|
{{- $img := index (.context.Resources.ByType "image") 0 -}}
|
|
{{- $thumb := index (.context.Resources.ByType "image") 0 -}}
|
|
{{ if ne .context.Content "" }}
|
|
{{- $thumb = $img.Resize "2048x" }}
|
|
{{ else if eq .type "list" }}
|
|
{{- $thumb = $img.Resize "500x" }}
|
|
{{ end }}
|
|
{{- $thumb = $img.Resize $resize }}
|
|
<div id="articlepicture" class="{{ $small }}" >
|
|
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
|
|
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
|
|
{{ 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>
|
|
|
|
{{ define "pagefooter" }}
|
|
{{ if and (eq .Kind "page") (or (eq .Section "news") (eq .Section "events") (eq .Section "about")) }}
|
|
<div id="article_footer">
|
|
{{ with .Params.foundations }}
|
|
<b>Träger der Veranstaltung:</b>
|
|
<div style="display: flex; flex-direction: row; height: 2rem; margin-bottom: 1rem; margin-top: .4rem;">
|
|
{{ range . }}
|
|
{{ $l := . }}
|
|
{{- $res_im := resources.GetMatch (printf "/foundations/%s*" $l ) -}}
|
|
{{ if $res_im }}
|
|
<div style="display: flex; flex-grow: 0;">
|
|
<img src="{{- $res_im.Permalink -}}" class="borderrad4px" />
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
<div style="display: flex; flex-direction: row; justify-content: space-between; flex-grow: 1; align-items: stretch;">
|
|
<div style="display: flex; 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="display: flex; 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>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
|
|
{{ define "sidebar" }}
|
|
{{ if ne .Type "tools" }}
|
|
{{- partial "snippets/menu" . }}
|
|
{{ end }}
|
|
{{ end }}
|