Separate gallery and figure shortcodes

This commit is contained in:
Will Faught
2023-03-01 19:01:38 -08:00
parent 7c13b69784
commit 34d39540a1
4 changed files with 107 additions and 76 deletions

View File

@@ -1,7 +1,6 @@
{{ $params := . }}
{{ $caption := $params.caption | markdownify }}
{{ $compact := $params.compact }}
{{ $content := $params.content | markdownify }}
{{ $float := $params.float }}
{{ $gap := $params.gap }}
@@ -17,7 +16,7 @@
{{ $table := false }}
{{ $widths := slice }}
{{ if and $caption (or $compact $float) }}
{{ if and $caption $float }}
{{ $table = true }}
{{ end }}
@@ -54,7 +53,7 @@
{{ end }}
{{ end }}
<div class="align-items-{{ $vertical }} d-flex {{ with $float }} float-{{ . }} {{ end }} justify-content-{{ $horizontal }} {{ if $compact }} mb-0 {{ else }} mb-3 {{ end }} {{ with $sidemargin }} {{ . }} {{ end }} overflow-auto paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}">
<div class="align-items-{{ $vertical }} d-flex {{ with $float }} float-{{ . }} {{ end }} justify-content-{{ $horizontal }} {{ with $sidemargin }} {{ . }} {{ end }} overflow-auto paige-figure {{ if $numbered }} paige-figure-numbered {{ end }}">
<figure class="{{ if $table }} d-table {{ end }} mb-0" {{ with $widths }} style="{{ . | safeCSS }}" {{ end }}>
<div class="d-flex justify-content-{{ $horizontal }} text-{{ $horizontal }}">{{ $content }}</div>

View File

@@ -39,6 +39,10 @@ body, html {
margin-bottom: 0;
}
.paige-figure {
margin-bottom: 1rem;
}
.paige-figure .highlight .chroma pre, .paige-figure .highlight pre.chroma {
margin-bottom: 0;
}
@@ -47,6 +51,14 @@ body, html {
margin-bottom: 0;
}
.paige-gallery {
margin-bottom: 1rem;
}
.paige-gallery .paige-figure {
margin-bottom: 0;
}
.paige-gallery .paige-image {
margin-bottom: 0;
}