{{ $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 }}
{{ if (ne $img "") }}
{{ if and (ne .type "list") (.context.Resources.ByType "image") }}{{ end }} {{ if ne .type "list" }}{{ end }}
{{ end }}
{{ if .partial_before }} {{ partial .partial_before (dict "context" .context "pic" .pic) }} {{ end }} {{ .content }}