{{- $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 -}} {{/* TODO: refactor */}} {{- $url := $image.url -}} {{- if site.Params.keycdn -}} {{- $url = $image.direct_url -}} {{- end -}} {{- $lightbox_sizes := "1280x2560" -}} {{ partial "commons/image.html" (dict "image" .id "alt" .alt "mobile" "164" "tablet" "336" "desktop" "967x679" )}} {{ if or .text .credit }}
{{ if .text }}
{{ partial "PrepareHTML" .text }}
{{ end }} {{ if .credit }}
{{ partial "PrepareHTML" .credit }}
{{ end }}
{{ end }} {{- end -}} {{ end }} {{ end }} {{- if $is_carousel }}
{{ end -}}