Remove height param

master
Will Faught 2 years ago
parent 869505dcd7
commit 665f5e2955

@ -115,22 +115,6 @@ Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br
I made a huge tiny mistake. In fact, it was a box of Oscar's legally obtained medical marijuana. Primo bud. Real sticky weed. And don't make the water too hot. The scabs come right off. There's a new daddy in town. A discipline daddy. It's so watery. And yet there's a smack of ham to it. Chickens don't clap! I don't criticize you! And if you're worried about criticism, sometimes a diet is the best defense. I hear the jury's still out on science. This is not what it looks like. It looks like you're tweaking her nipples through a chain-link fence. What, so the guy we are meeting with can't even grow his own hair? COME ON! I made a huge tiny mistake. In fact, it was a box of Oscar's legally obtained medical marijuana. Primo bud. Real sticky weed. And don't make the water too hot. The scabs come right off. There's a new daddy in town. A discipline daddy. It's so watery. And yet there's a smack of ham to it. Chickens don't clap! I don't criticize you! And if you're worried about criticism, sometimes a diet is the best defense. I hear the jury's still out on science. This is not what it looks like. It looks like you're tweaking her nipples through a chain-link fence. What, so the guy we are meeting with can't even grow his own hair? COME ON!
## Height parameter
Code:
```go-text-template
{{</* paige/figure caption="Hickory Dickory Dock" height="20rem" */>}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{</* /paige/figure */>}}
```
Result:
{{< paige/figure caption="Hickory Dickory Dock" height="20rem" >}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{< /paige/figure >}}
## Horizontal parameter ## Horizontal parameter
Code: Code:
@ -266,15 +250,15 @@ Code:
```go-text-template ```go-text-template
<div class="column-gap-3 d-flex justify-content-between"> <div class="column-gap-3 d-flex justify-content-between">
{{</* paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="start" */>}} {{</* paige/figure caption="Hickory Dickory Dock" vertical="start" */>}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{</* /paige/figure */>}} {{</* /paige/figure */>}}
{{</* paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="center" */>}} {{</* paige/figure caption="Hickory Dickory Dock" vertical="center" */>}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{</* /paige/figure */>}} {{</* /paige/figure */>}}
{{</* paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="end" */>}} {{</* paige/figure caption="Hickory Dickory Dock" vertical="end" */>}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{</* /paige/figure */>}} {{</* /paige/figure */>}}
@ -285,15 +269,15 @@ Result:
<div class="column-gap-3 d-flex justify-content-between"> <div class="column-gap-3 d-flex justify-content-between">
{{< paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="start" >}} {{< paige/figure caption="Hickory Dickory Dock" vertical="start" >}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{< /paige/figure >}} {{< /paige/figure >}}
{{< paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="center" >}} {{< paige/figure caption="Hickory Dickory Dock" vertical="center" >}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{< /paige/figure >}} {{< /paige/figure >}}
{{< paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="end" >}} {{< paige/figure caption="Hickory Dickory Dock" vertical="end" >}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{< /paige/figure >}} {{< /paige/figure >}}
@ -336,7 +320,7 @@ Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br
Code: Code:
```go-text-template ```go-text-template
{{</* paige/figure caption="Hickory Dickory Dock" float="start" height="20rem" number=7 vertical="end" width="10rem" */>}} {{</* paige/figure caption="Hickory Dickory Dock" float="start" number=7 width="20rem" */>}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{</* /paige/figure */>}} {{</* /paige/figure */>}}
@ -345,7 +329,7 @@ I made a huge tiny mistake. In fact, it was a box of Oscar's legally obtained me
Result: Result:
{{< paige/figure caption="Hickory Dickory Dock" float="start" height="20rem" number=7 vertical="end" width="10rem" >}} {{< paige/figure caption="Hickory Dickory Dock" float="start" number=7 width="20rem" >}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{< /paige/figure >}} {{< /paige/figure >}}
@ -358,13 +342,21 @@ I made a huge tiny mistake. In fact, it was a box of Oscar's legally obtained me
Code: Code:
```go-text-template ```go-text-template
{{</* paige/figure caption="Hickory Dickory Dock" height="20rem" horizontal="end" maxwidth="10rem" number=7 vertical="center" */>}} <div style="height: 20rem">
{{</* paige/figure caption="Hickory Dickory Dock" horizontal="end" maxwidth="20rem" number=7 vertical="end" */>}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{</* /paige/figure */>}} {{</* /paige/figure */>}}
</div>
``` ```
Result: Result:
{{< paige/figure caption="Hickory Dickory Dock" height="20rem" horizontal="end" maxwidth="10rem" number=7 vertical="center" >}} <div style="height: 20rem">
{{< paige/figure caption="Hickory Dickory Dock" horizontal="end" maxwidth="20rem" number=7 vertical="end" >}}
Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock. Hickory dickory dock.<br>The mouse ran up the clock.<br>The clock struck one,<br>The mouse ran down,<br>Hickory dickory dock.
{{< /paige/figure >}} {{< /paige/figure >}}
</div>

@ -5,7 +5,6 @@
{{ $content := $params.content | markdownify }} {{ $content := $params.content | markdownify }}
{{ $float := $params.float }} {{ $float := $params.float }}
{{ $gap := $params.gap }} {{ $gap := $params.gap }}
{{ $height := $params.height }}
{{ $horizontal := $params.horizontal | default "center" }} {{ $horizontal := $params.horizontal | default "center" }}
{{ $maxwidth := $params.maxwidth }} {{ $maxwidth := $params.maxwidth }}
{{ $number := $params.number }} {{ $number := $params.number }}
@ -13,7 +12,6 @@
{{ $vertical := $params.vertical | default "center" }} {{ $vertical := $params.vertical | default "center" }}
{{ $width := $params.width }} {{ $width := $params.width }}
{{ $heights := slice }}
{{ $showcaption := $caption }} {{ $showcaption := $caption }}
{{ $sidemargin := "" }} {{ $sidemargin := "" }}
{{ $table := false }} {{ $table := false }}
@ -23,12 +21,6 @@
{{ $table = true }} {{ $table = true }}
{{ end }} {{ end }}
{{ if $height }}
{{ $heights = $heights | append (printf "height: %v" $height) }}
{{ end }}
{{ $heights = delimit ($heights | sort) "; " }}
{{ if $maxwidth }} {{ if $maxwidth }}
{{ $widths = $widths | append (printf "max-width: %v" $maxwidth) }} {{ $widths = $widths | append (printf "max-width: %v" $maxwidth) }}
{{ end }} {{ end }}
@ -62,7 +54,7 @@
{{ end }} {{ end }}
{{ 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 }}" {{ with $heights }} style="{{ . | safeCSS }}" {{ 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 }}">
<figure class="{{ if $table }} d-table {{ end }} mb-0" {{ with $widths }} style="{{ . | safeCSS }}" {{ 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> <div class="d-flex justify-content-{{ $horizontal }} text-{{ $horizontal }}">{{ $content }}</div>

@ -4,7 +4,6 @@
{{ $caption := $params.caption }} {{ $caption := $params.caption }}
{{ $compact := $params.compact }} {{ $compact := $params.compact }}
{{ $float := $params.float }} {{ $float := $params.float }}
{{ $height := $params.height }}
{{ $horizontal := $params.horizontal }} {{ $horizontal := $params.horizontal }}
{{ $link := $params.link }} {{ $link := $params.link }}
{{ $maxwidth := $params.maxwidth }} {{ $maxwidth := $params.maxwidth }}
@ -44,7 +43,6 @@
"compact" $compact "compact" $compact
"content" $content "content" $content
"float" $float "float" $float
"height" $height
"horizontal" $horizontal "horizontal" $horizontal
"maxwidth" $maxwidth "maxwidth" $maxwidth
"number" $number "number" $number

@ -1,7 +1,6 @@
{{ $caption := .Get 0 | default (.Get "caption") }} {{ $caption := .Get 0 | default (.Get "caption") }}
{{ $content := .Inner }} {{ $content := .Inner }}
{{ $float := .Get "float" }} {{ $float := .Get "float" }}
{{ $height := .Get "height" }}
{{ $horizontal := .Get "horizontal" }} {{ $horizontal := .Get "horizontal" }}
{{ $maxwidth := .Get "maxwidth" }} {{ $maxwidth := .Get "maxwidth" }}
{{ $number := .Get "number" }} {{ $number := .Get "number" }}
@ -14,7 +13,6 @@
"content" $content "content" $content
"float" $float "float" $float
"gap" 2 "gap" 2
"height" $height
"horizontal" $horizontal "horizontal" $horizontal
"maxwidth" $maxwidth "maxwidth" $maxwidth
"number" $number "number" $number

@ -121,17 +121,17 @@
"caption" $caption "caption" $caption
"content" (partial "paige/video.html" (dict "content" (partial "paige/video.html" (dict
"fullscreen" $fullscreen "fullscreen" $fullscreen
"height" $height
"referrerpolicy" $referrerpolicy "referrerpolicy" $referrerpolicy
"src" $src "src" $src
"title" $description "title" $description
"width" $width
)) ))
"float" $float "float" $float
"gap" 2 "gap" 2
"height" $height
"horizontal" $horizontal "horizontal" $horizontal
"maxwidth" $maxwidth "maxwidth" $maxwidth
"number" $number "number" $number
"numbered" $numbered "numbered" $numbered
"vertical" $vertical "vertical" $vertical
"width" $width
) }} ) }}

@ -75,17 +75,17 @@
"caption" $caption "caption" $caption
"content" (partial "paige/video.html" (dict "content" (partial "paige/video.html" (dict
"fullscreen" $fullscreen "fullscreen" $fullscreen
"height" $height
"referrerpolicy" $referrerpolicy "referrerpolicy" $referrerpolicy
"src" $src "src" $src
"title" $description "title" $description
"width" $width
)) ))
"float" $float "float" $float
"gap" 2 "gap" 2
"height" $height
"horizontal" $horizontal "horizontal" $horizontal
"maxwidth" $maxwidth "maxwidth" $maxwidth
"number" $number "number" $number
"numbered" $numbered "numbered" $numbered
"vertical" $vertical "vertical" $vertical
"width" $width
) }} ) }}

Loading…
Cancel
Save