{{/* notes: - copied from pe-figure shortcode with MIME_TYPES removed - should eventually allow for top and bottom carousels */}} {{- if . -}}
{{ range . }} {{ $pic := . }} {{- $tip := default $pic.link_tip $pic.tip -}}
{{- if $pic.link -}} {{- end -}}
{{- if $pic.sources -}} {{/* get source count */}} {{- $num_sources := len $pic.sources -}} {{/* render sources */}} {{- range $x, $src := $pic.sources -}} {{- $is_map := reflect.IsMap $src -}} {{- if $is_map -}} {{/* source is a map, reference keys */}} {{- if (lt $x (sub $num_sources 1)) -}} {{/* emit source tag */}} {{- else -}} {{/* emit img tag */}} {{- default $pic.tip $src.tip -}} {{- end -}} {{- else -}} {{/* src is a string */}} {{- if (lt $x (sub $num_sources 1)) -}} {{/* emit source */}} {{/* get file extension */}} {{- $ext := path.Ext $src -}} {{- else -}} {{/* emit img */}} {{- $pic.tip -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}}

{{- $pic.tip -}}

{{- if $pic.link -}}
{{- end -}}
{{ end }}
{{- end -}}