Add number, numbered shortcode params
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
{{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }}
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $number := .Get "number" }}
|
||||
{{ $numbered := .Get "numbered" }}
|
||||
{{ $options := .Get "options" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
@@ -21,5 +23,7 @@
|
||||
"justify" $justify
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"number" $number
|
||||
"numbered" $numbered
|
||||
"width" $width
|
||||
) }}
|
||||
|
@@ -6,6 +6,8 @@
|
||||
{{ $justify := .Get "justify" }}
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $number := .Get "number" }}
|
||||
{{ $numbered := .Get "numbered" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
{{ partial "paige/figure.html" (dict
|
||||
@@ -18,5 +20,7 @@
|
||||
"justify" $justify
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"number" $number
|
||||
"numbered" $numbered
|
||||
"width" $width
|
||||
) }}
|
||||
|
@@ -7,6 +7,8 @@
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $method := .Get "method" | default "resize" }}
|
||||
{{ $number := .Get "number" }}
|
||||
{{ $numbered := .Get "numbered" }}
|
||||
{{ $options := .Get "options" | default "550x webp picture Lanczos" }}
|
||||
{{ $raw := .Get "raw" }}
|
||||
{{ $type := .Get "type" | default "rows" }}
|
||||
@@ -61,6 +63,7 @@
|
||||
{{ else }}
|
||||
{{ $inner := chomp .Inner }}
|
||||
{{ $resources := slice }}
|
||||
{{ $showcaption := $caption }}
|
||||
|
||||
{{ with $images }}
|
||||
{{ with $.Page.Resources.Match . }}
|
||||
@@ -76,6 +79,19 @@
|
||||
{{ 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>
|
||||
{{ if eq $type "grid" }}
|
||||
<div class="container-fluid px-0">
|
||||
@@ -128,8 +144,8 @@
|
||||
{{ else }}
|
||||
{{ errorf "invalid type: %q" $type }}
|
||||
{{ end }}
|
||||
{{ with $caption }}
|
||||
<figcaption class="figure-caption mt-2 text-center">{{ . }}</figcaption>
|
||||
{{ if $showcaption }}
|
||||
<figcaption class="figure-caption mt-2 text-center">{{ $caption }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
@@ -8,6 +8,8 @@
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $method := .Get "method" }}
|
||||
{{ $number := .Get "number" }}
|
||||
{{ $numbered := .Get "numbered" }}
|
||||
{{ $options := .Get "options" }}
|
||||
{{ $raw := .Get "raw" }}
|
||||
{{ $src := .Get 0 | default (.Get "src") }}
|
||||
@@ -26,6 +28,8 @@
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"method" $method
|
||||
"number" $number
|
||||
"numbered" $numbered
|
||||
"options" $options
|
||||
"raw" $raw
|
||||
"src" $src
|
||||
|
@@ -6,6 +6,8 @@
|
||||
{{ $justify := .Get "justify" }}
|
||||
{{ $maxheight := .Get "maxheight" }}
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $number := .Get "number" }}
|
||||
{{ $numbered := .Get "numbered" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
{{ $content = printf `<blockquote class="blockquote mb-0">%v</blockquote>` $content }}
|
||||
@@ -19,5 +21,7 @@
|
||||
"justify" $justify
|
||||
"maxheight" $maxheight
|
||||
"maxwidth" $maxwidth
|
||||
"number" $number
|
||||
"numbered" $numbered
|
||||
"width" $width
|
||||
) }}
|
||||
|
Reference in New Issue
Block a user