|
|
@ -7,6 +7,8 @@
|
|
|
|
{{ $maxheight := .Get "maxheight" }}
|
|
|
|
{{ $maxheight := .Get "maxheight" }}
|
|
|
|
{{ $maxwidth := .Get "maxwidth" }}
|
|
|
|
{{ $maxwidth := .Get "maxwidth" }}
|
|
|
|
{{ $method := .Get "method" | default "resize" }}
|
|
|
|
{{ $method := .Get "method" | default "resize" }}
|
|
|
|
|
|
|
|
{{ $number := .Get "number" }}
|
|
|
|
|
|
|
|
{{ $numbered := .Get "numbered" }}
|
|
|
|
{{ $options := .Get "options" | default "550x webp picture Lanczos" }}
|
|
|
|
{{ $options := .Get "options" | default "550x webp picture Lanczos" }}
|
|
|
|
{{ $raw := .Get "raw" }}
|
|
|
|
{{ $raw := .Get "raw" }}
|
|
|
|
{{ $type := .Get "type" | default "rows" }}
|
|
|
|
{{ $type := .Get "type" | default "rows" }}
|
|
|
@ -61,6 +63,7 @@
|
|
|
|
{{ else }}
|
|
|
|
{{ else }}
|
|
|
|
{{ $inner := chomp .Inner }}
|
|
|
|
{{ $inner := chomp .Inner }}
|
|
|
|
{{ $resources := slice }}
|
|
|
|
{{ $resources := slice }}
|
|
|
|
|
|
|
|
{{ $showcaption := $caption }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ with $images }}
|
|
|
|
{{ with $images }}
|
|
|
|
{{ with $.Page.Resources.Match . }}
|
|
|
|
{{ with $.Page.Resources.Match . }}
|
|
|
@ -76,6 +79,19 @@
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{{ if $caption }}
|
|
|
|
|
|
|
|
{{ if $number }}
|
|
|
|
|
|
|
|
{{ $caption = printf "%v %v: %v" (i18n "paige_figure") $number $caption }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ else }}
|
|
|
|
|
|
|
|
{{ if $number }}
|
|
|
|
|
|
|
|
{{ $caption = printf "%v %v" (i18n "paige_figure") $number }}
|
|
|
|
|
|
|
|
{{ $showcaption = true }}
|
|
|
|
|
|
|
|
{{ else if $numbered }}
|
|
|
|
|
|
|
|
{{ $showcaption = true }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
<figure>
|
|
|
|
<figure>
|
|
|
|
{{ if eq $type "grid" }}
|
|
|
|
{{ if eq $type "grid" }}
|
|
|
|
<div class="container-fluid px-0">
|
|
|
|
<div class="container-fluid px-0">
|
|
|
@ -128,8 +144,8 @@
|
|
|
|
{{ else }}
|
|
|
|
{{ else }}
|
|
|
|
{{ errorf "invalid type: %q" $type }}
|
|
|
|
{{ errorf "invalid type: %q" $type }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ with $caption }}
|
|
|
|
{{ if $showcaption }}
|
|
|
|
<figcaption class="figure-caption mt-2 text-center">{{ . }}</figcaption>
|
|
|
|
<figcaption class="figure-caption mt-2 text-center">{{ $caption }}</figcaption>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</figure>
|
|
|
|
</figure>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|