{{- $is_carousel := false -}} {{ if gt (len .images) 1 }} {{- $is_carousel = true -}} {{ end }} {{- if $is_carousel }}
{{ end -}} {{ range .images }} {{ if .file }} {{- $image := partial "GetMedia" .file -}} {{- if $image -}} {{ partial "commons/image.html" (dict "image" .id "alt" .alt "mobile" "400" "tablet" "600" "desktop" "1024" )}} {{ if or .text .credit }}
{{ if .text }}
{{ partial "PrepareHTML" .text }}
{{ end }} {{ if .credit }}
{{ partial "PrepareHTML" .credit }}
{{ end }}
{{ end }} {{- end -}} {{ end }} {{ end }} {{- if $is_carousel }}
{{ end -}}