{{ $align := .Get "align" | default "center" }} {{ $fetchpriority := .Get "fetchpriority" }} {{ $height := .Get "height" }} {{ $images := .Get 0 | default (.Get "images") }} {{ $justify := .Get "justify" | default "center" }} {{ $linked := .Get "linked" }} {{ $loading := .Get "loading" }} {{ $maxheight := .Get "maxheight" }} {{ $maxwidth := .Get "maxwidth" }} {{ $process := .Get "process" }} {{ $type := .Get "type" | default "rows" }} {{ $width := .Get "width" }} {{ $inner := chomp .Inner }} {{ $resources := slice }} {{ if and (not $images) (not $inner) }} {{ errorf "layouts/shortcodes/paige/gallery.html: no content" }} {{ end }} {{ if not $inner }} {{ with $images }} {{ with $.Page.Resources.Match . }} {{ $resources = . }} {{ else }} {{ $resources = resources.Match . }} {{ end }} {{ else }} {{ with .Page.Resources.ByType "image" }} {{ $resources = . }} {{ else }} {{ $resources = resources.ByType "image" }} {{ end }} {{ end }} {{ end }}