Align figure content
This commit is contained in:
@@ -97,7 +97,27 @@ Michael was having brunch with Sally Sitwell at a restaurant called Skip Church'
|
||||
Code:
|
||||
|
||||
```go-text-template
|
||||
{{</* paige/figure caption="Hickory Dickory Dock" */>}}
|
||||
{{</* paige/figure caption="Hickory Dickory Dock" align="start" */>}}
|
||||
<div style="white-space: pre">
|
||||
Hickory dickory dock.
|
||||
The mouse ran up the clock.
|
||||
The clock struck one,
|
||||
The mouse ran down,
|
||||
Hickory dickory dock.
|
||||
</div>
|
||||
{{</* /paige/figure */>}}
|
||||
|
||||
{{</* paige/figure caption="Hickory Dickory Dock" align="center" */>}}
|
||||
<div style="white-space: pre">
|
||||
Hickory dickory dock.
|
||||
The mouse ran up the clock.
|
||||
The clock struck one,
|
||||
The mouse ran down,
|
||||
Hickory dickory dock.
|
||||
</div>
|
||||
{{</* /paige/figure */>}}
|
||||
|
||||
{{</* paige/figure caption="Hickory Dickory Dock" align="end" */>}}
|
||||
<div style="white-space: pre">
|
||||
Hickory dickory dock.
|
||||
The mouse ran up the clock.
|
||||
@@ -110,7 +130,27 @@ Hickory dickory dock.
|
||||
|
||||
Result:
|
||||
|
||||
{{< paige/figure caption="Hickory Dickory Dock" >}}
|
||||
{{< paige/figure caption="Hickory Dickory Dock" align="start" >}}
|
||||
<div style="white-space: pre">
|
||||
Hickory dickory dock.
|
||||
The mouse ran up the clock.
|
||||
The clock struck one,
|
||||
The mouse ran down,
|
||||
Hickory dickory dock.
|
||||
</div>
|
||||
{{< /paige/figure >}}
|
||||
|
||||
{{< paige/figure caption="Hickory Dickory Dock" align="center" >}}
|
||||
<div style="white-space: pre">
|
||||
Hickory dickory dock.
|
||||
The mouse ran up the clock.
|
||||
The clock struck one,
|
||||
The mouse ran down,
|
||||
Hickory dickory dock.
|
||||
</div>
|
||||
{{< /paige/figure >}}
|
||||
|
||||
{{< paige/figure caption="Hickory Dickory Dock" align="end" >}}
|
||||
<div style="white-space: pre">
|
||||
Hickory dickory dock.
|
||||
The mouse ran up the clock.
|
||||
|
@@ -82,7 +82,7 @@
|
||||
{{ if $table }}
|
||||
<div class="d-table">
|
||||
{{ end }}
|
||||
<div>{{ $content }}</div>
|
||||
<div class="text-{{ $align }}">{{ $content }}</div>
|
||||
{{ with $caption }}
|
||||
<figcaption class="figure-caption mt-{{ $gap }} text-{{ $align }}" {{ if $table }} style="caption-side: bottom; display: table-caption" {{ end }}>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
{{ $maxwidth := .Get "maxwidth" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
{{ $content = printf `<blockquote class="blockquote mb-0 text-%v">%v</blockquote>` $align $content | safeHTML }}
|
||||
{{ $content = printf `<blockquote class="blockquote mb-0">%v</blockquote>` $content | safeHTML }}
|
||||
|
||||
{{ partial "paige/figure.html" (dict
|
||||
"align" $align
|
||||
|
Reference in New Issue
Block a user