Omit div with no attrs

master
Will Faught 2 years ago
parent da76f1f5fd
commit 98548e69f9

@ -67,16 +67,20 @@
{{ end }} {{ 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 $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 $float $style }} style="{{ $style | safeCSS }}" {{ end }}>
<div {{ if or $heightish $widthish }} class="{{ if $height }} d-flex flex-column justify-content-{{ $vertical }} {{ end }} overflow-auto" {{ end }} {{ if and (not $float) $style }} style="{{ $style | safeCSS }}" {{ end }}> {{ if or $heightish $widthish (and (not $float) $style) }}
{{ if $table }} <div {{ if or $heightish $widthish }} class="{{ if $height }} d-flex flex-column justify-content-{{ $vertical }} {{ end }} overflow-auto" {{ end }} {{ if and (not $float) $style }} style="{{ $style | safeCSS }}" {{ end }}>
<div class="d-table"> {{ end }}
{{ end }} {{ if $table }}
<div class="text-{{ $horizontal }}">{{ $content }}</div> <div class="d-table">
{{ 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> <div class="text-{{ $horizontal }}">{{ $content }}</div>
{{ end }} {{ if $showcaption }}
{{ if $table }} <figcaption class="figure-caption {{ with $gap }} mt-{{ . }} {{ end }} text-{{ $horizontal }}" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ $caption }}</figcaption>
</div> {{ end }}
{{ end }} {{ if $table }}
</div> </div>
{{ end }}
{{ if or $heightish $widthish (and (not $float) $style) }}
</div>
{{ end }}
</figure> </figure>

Loading…
Cancel
Save