bunteshaus.de/themes/buha/layouts/partials/layout/article.html

29 lines
915 B
HTML
Raw Normal View History

2022-04-28 14:53:58 +02:00
{{ $metas := dict "when" .context.Params.when "price" .context.Params.price "contact_mail" .context.Params.contact_mail "covid" .context.Params.covid "insta" .context.Params.insta }}
2022-05-09 21:37:34 +02:00
{{ $banner := slice }}
{{ $image := slice }}
{{ $thumb := "" }}
{{ if .context.Resources.GetMatch "banner*" }}
{{ $banner = slice (.context.Resources.GetMatch "banner*") }}
2022-04-09 21:34:04 +02:00
{{ end }}
2022-05-09 21:37:34 +02:00
{{ if .context.Resources.ByType "image" }}
{{ $image = .context.Resources.ByType "image" }}
{{ end }}
{{ $image = (index (complement $banner $image) 0) }}
{{ if $banner }}
{{ $image = (index $banner 0) }}
{{ end }}
{{ $image = .context.Resources.GetMatch (string $image) }}
{{ if ne $image nil }}
{{ $thumb1 := $image.Fill "1280x480 smart"}}
{{ $thumb = $image}}
2022-04-09 21:34:04 +02:00
{{ end }}
2022-05-06 14:39:53 +02:00
2022-05-09 21:37:34 +02:00
{{ partial "snippets/article_metadata" $metas }}
2022-05-06 14:39:53 +02:00
2022-05-09 21:37:34 +02:00
{{- if .context.Content -}}
2022-06-12 13:50:06 +02:00
<div class="article_content">{{- .context.Content -}}</div>
2022-04-10 02:24:33 +02:00
{{ end }}
2022-05-09 21:37:34 +02:00