{{ $align := .Get "align" | default "center" }} {{ $caption := .Get "caption" }} {{ $height := .Get "height" }} {{ $image := .Get "image" }} {{ $images := .Get 0 | default (.Get "images") }} {{ $justify := .Get "justify" | default "center" }} {{ $method := .Get "method" | default "resize" }} {{ $options := .Get "options" | default "550x webp picture Lanczos" }} {{ $type := .Get "type" | default "rows" }} {{ $width := .Get "width" }} {{ if $image }} {{ $resource := partial "paige/func-resource.html" (dict "page" .Page "url" $image ) }} {{ partial "paige/image-figure.html" (dict "caption" $caption "link" $resource.RelPermalink "method" $method "options" $options "page" .Page "resource" $resource "src" $image "table" true ) }} {{ else }} {{ $inner := chomp .Inner }} {{ $resources := slice }} {{ 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 }}
{{ if eq $type "grid" }}
{{ with $inner }} {{ . }} {{ else }} {{ range $resources }} {{ partial "paige/image-figure.html" (dict "link" .RelPermalink "method" $method "options" $options "resource" . "table" true ) }} {{ end }} {{ end }}
{{ else if eq $type "rows" }}
{{ with $inner }} {{ . }} {{ else }} {{ range $resources }} {{ partial "paige/image-figure.html" (dict "height" "10rem" "link" .RelPermalink "method" $method "options" $options "resource" . "table" true ) }} {{ end }} {{ end }}
{{ else }} {{ errorf "invalid type: %q" $type }} {{ end }} {{ with $caption }}
{{ . }}
{{ end }}
{{ end }}