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

31 lines
1.0 KiB
HTML
Raw Normal View History

2022-04-11 15:45:49 +02:00
{{ $pic := "solo" }}
{{ $text := "solo" }}
{{- if and (.context.Resources.ByType "image") (.content) -}}
{{ $pic = "multiple_small" }}
{{ $text = "multiple_big" }}
{{ end }}
2022-04-10 00:53:31 +02:00
{{ $img := "" }}
{{ $thumb := "" }}
2022-04-11 15:45:49 +02:00
{{- .Resources.ByType "image" -}}
2022-04-10 00:53:31 +02:00
{{- if .context.Resources.ByType "image" -}}
{{- $img = index (.context.Resources.ByType "image") 0 -}}
{{- $thumb = $img.Resize "1024x" }}
{{ end }}
2022-04-11 15:45:49 +02:00
<section>
2022-04-10 00:53:31 +02:00
<div id="articleinner">
2022-04-11 21:35:30 +02:00
{{ if (ne $img "") }}
<div id="articlepicture" class="{{ "multiple_medium" }} margin_right_1rem">
2022-04-10 00:53:31 +02:00
{{ 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 }}
2022-04-11 15:45:49 +02:00
<div id="articletext" class="{{ $text }}">
2022-04-10 00:53:31 +02:00
{{ if .partial_before }}
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
{{ end }}
{{ .content }}
</div>
</div>
2022-04-11 15:45:49 +02:00
</section>