Simplify figure HTML

master
Will Faught 2 years ago
parent 81247b852a
commit de54cd7205

@ -64,21 +64,17 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
<figure class="align-items-{{ $horizontal }} d-flex flex-column {{ with $float }} float-{{ . }} {{ end }} justify-content-{{ $vertical }} {{ if $compact }} mb-0 {{ end }} {{ if $float }} {{ $sidemargin }} {{ end }} paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}" {{ if and $float $style }} style="{{ $style | safeCSS }}" {{ end }}> <figure class="{{ if $widthish }} d-flex {{ end }} {{ with $float }} float-{{ . }} {{ end }} {{ if $widthish }} justify-content-{{ $horizontal }} {{ end }} {{ if $compact }} mb-0 {{ end }} {{ if $float }} {{ $sidemargin }} {{ end }} paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}">
{{ if and (not $float) $style }} <div {{ if or $heightish $widthish }} class="{{ if $height }} d-flex flex-column justify-content-{{ $vertical }} {{ end }} overflow-auto" {{ end }} {{ if $style }} style="{{ $style | safeCSS }}" {{ end }}>
<div class="align-items-{{ $horizontal }} d-flex flex-column {{ if $height }} h-100 {{ end }} justify-content-{{ $vertical }}" style="{{ $style | safeCSS }}"> {{ if $table }}
{{ end }} <div class="d-table">
{{ if $table }} {{ end }}
<div class="d-table"> <div class="text-{{ $horizontal }}">{{ $content }}</div>
{{ end }} {{ if $showcaption }}
<div class="text-{{ $horizontal }}">{{ $content }}</div> <figcaption class="figure-caption {{ with $gap }} mt-{{ . }} {{ end }} text-{{ $horizontal }}" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ $caption }}</figcaption>
{{ if $showcaption }} {{ end }}
<figcaption class="figure-caption {{ with $gap }} mt-{{ . }} {{ end }} text-{{ $horizontal }}" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ $caption }}</figcaption> {{ if $table }}
{{ end }} </div>
{{ if $table }} {{ end }}
</div> </div>
{{ end }}
{{ if and (not $float) $style }}
</div>
{{ end }}
</figure> </figure>

Loading…
Cancel
Save