forked from Bunteshaus/bunteshaus.de
31 lines
1.0 KiB
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 class="articleinner">
|
|
{{ if (ne $img "") }}
|
|
<div class="articlepicture {{ "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 class="articletext {{ $text }}">
|
|
{{ if .partial_before }}
|
|
{{ partial .partial_before (dict "context" .context "pic" .pic) }}
|
|
{{ end }}
|
|
{{ .content }}
|
|
</div>
|
|
</div>
|
|
</section>
|