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

34 lines
1.2 KiB
HTML
Raw Normal View History

2022-04-09 21:34:04 +02:00
{{ $small := "solo" }}
{{ $big := "solo" }}
{{ $img := "" }}
{{ $thumb := "" }}
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ if .content }}
{{- $thumb = $img.Resize "500x" }}
{{ end }}
{{ end }}
{{- if or (.context.Resources.ByType "image") (.context.Summary) ($img) -}}
{{ $small = "multiple_small" }}
{{ $big = "multiple_big" }}
{{ else }}
{{ $small = "multiple_big"}}
{{ end }}
<div id="articleinner">
{{ if and (ne $img "") (eq .pic true)}}
2022-04-10 00:53:31 +02:00
<div id="articlepicture" class="{{ $small }}">
2022-04-09 21:34:04 +02:00
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}<a href="{{- $img.Permalink -}}">{{ end }}
2022-04-10 00:53:31 +02:00
<img src="{{- $thumb.Permalink -}}" class="borderrad4px" />
2022-04-09 21:34:04 +02:00
{{ if ne .type "list" }}</a>{{ end }}
{{ if eq .type "article" }}{{ end }}
</div>
{{ end }}
<div id="articletext" class="{{ $big }}">
{{ if .partial_before }}
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
{{ end }}
{{ .content }}
</div>
</div>