bunteshaus.de/themes/buha/layouts/partials/contentlayouts/article.html
2022-04-09 01:36:05 +02:00

52 lines
2.0 KiB
HTML

{{ $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>