bunteshaus.de/themes/buha/layouts/partials/l1/contact.html

31 lines
1.0 KiB
HTML

{{ $pic := "solo" }}
{{ $text := "solo" }}
{{- if and (.context.Resources.ByType "image") (.content) -}}
{{ $pic = "multiple_small" }}
{{ $text = "multiple_big" }}
{{ end }}
{{ $img := "" }}
{{ $thumb := "" }}
{{- .Resources.ByType "image" -}}
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ end }}
<section>
<div id="articleinner">
{{ if (ne $img "") }}
<div id="articlepicture" class="{{ "multiple_medium" }} margin_right_1rem">
{{ 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 }}
</div>
{{ end }}
<div id="articletext" class="{{ $text }}">
{{ if .partial_before }}
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
{{ end }}
{{ .content }}
</div>
</div>
</section>