Add justify param

This commit is contained in:
Will Faught
2023-01-16 21:56:16 -08:00
parent f694597cfa
commit 7d418a96fe
7 changed files with 25 additions and 7 deletions

View File

@@ -5,6 +5,7 @@
{{ $float := .float }}
{{ $gap := .gap }}
{{ $height := .height }}
{{ $justify := .justify | default "center" }}
{{ $maxheight := .maxheight }}
{{ $maxwidth := .maxwidth }}
{{ $width := .width }}
@@ -69,9 +70,9 @@
{{ end }}
{{ end }}
<figure class="align-items-{{ $align }} d-flex flex-column {{ with $float }} float-{{ . }} {{ end }} justify-content-center {{ if $compact }} mb-0 {{ end }} {{ if $float }} {{ $sidemargin }} {{ end }} paige-figure" {{ if and $float $style }} style="{{ $style | safeCSS }}" {{ end }}>
<figure class="align-items-{{ $align }} d-flex flex-column {{ with $float }} float-{{ . }} {{ end }} justify-content-{{ $justify }} {{ if $compact }} mb-0 {{ end }} {{ if $float }} {{ $sidemargin }} {{ end }} paige-figure" {{ if and $float $style }} style="{{ $style | safeCSS }}" {{ end }}>
{{ if and (not $float) $style }}
<div class="align-items-{{ $align }} d-flex flex-column {{ if $height }} h-100 {{ end }} justify-content-center" style="{{ $style | safeCSS }}">
<div class="align-items-{{ $align }} d-flex flex-column {{ if $height }} h-100 {{ end }} justify-content-{{ $justify }}" style="{{ $style | safeCSS }}">
{{ end }}
{{ if $table }}
<div class="d-table">

View File

@@ -2,6 +2,7 @@
{{ $caption := .Get "caption" }}
{{ $float := .Get "float" }}
{{ $height := .Get "height" }}
{{ $justify := .Get "justify" }}
{{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }}
{{ $maxheight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }}
@@ -17,6 +18,7 @@
"float" $float
"gap" 2
"height" $height
"justify" $justify
"maxheight" $maxheight
"maxwidth" $maxwidth
"width" $width

View File

@@ -3,6 +3,7 @@
{{ $content := .Inner | markdownify }}
{{ $float := .Get "float" }}
{{ $height := .Get "height" }}
{{ $justify := .Get "justify" }}
{{ $maxheight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }}
{{ $width := .Get "width" }}
@@ -14,6 +15,7 @@
"float" $float
"gap" 2
"height" $height
"justify" $justify
"maxheight" $maxheight
"maxwidth" $maxwidth
"width" $width

View File

@@ -3,6 +3,7 @@
{{ $caption := .Get "caption" }}
{{ $float := .Get "float" }}
{{ $height := .Get "height" }}
{{ $justify := .Get "justify" }}
{{ $link := .Get "link" }}
{{ $maxheight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }}
@@ -20,6 +21,7 @@
"float" $float
"gap" 2
"height" $height
"justify" $justify
"link" $link
"maxheight" $maxheight
"maxwidth" $maxwidth

View File

@@ -3,6 +3,7 @@
{{ $content := .Inner | markdownify }}
{{ $float := .Get "float" }}
{{ $height := .Get "height" }}
{{ $justify := .Get "justify" }}
{{ $maxheight := .Get "maxheight" }}
{{ $maxwidth := .Get "maxwidth" }}
{{ $width := .Get "width" }}
@@ -15,6 +16,7 @@
"content" $content
"float" $float
"height" $height
"justify" $justify
"maxheight" $maxheight
"maxwidth" $maxwidth
"width" $width