From 665f5e2955146f1357b73698dd59711185f55032 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Tue, 28 Feb 2023 17:31:18 -0800 Subject: [PATCH] Remove height param --- exampleSite/content/shortcodes/figure.md | 44 ++++++++++-------------- layouts/partials/paige/figure.html | 10 +----- layouts/partials/paige/image-figure.html | 2 -- layouts/shortcodes/paige/figure.html | 2 -- layouts/shortcodes/paige/vimeo.html | 4 +-- layouts/shortcodes/paige/youtube.html | 4 +-- 6 files changed, 23 insertions(+), 43 deletions(-) diff --git a/exampleSite/content/shortcodes/figure.md b/exampleSite/content/shortcodes/figure.md index 13633fdd..87c1ead4 100644 --- a/exampleSite/content/shortcodes/figure.md +++ b/exampleSite/content/shortcodes/figure.md @@ -115,22 +115,6 @@ Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
}} -Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. -{{}} -``` - -Result: - -{{< paige/figure caption="Hickory Dickory Dock" height="20rem" >}} -Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. -{{< /paige/figure >}} - ## Horizontal parameter Code: @@ -266,15 +250,15 @@ Code: ```go-text-template
-{{}} +{{}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{}} -{{}} +{{}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{}} -{{}} +{{}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{}} @@ -285,15 +269,15 @@ Result:
-{{< paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="start" >}} +{{< paige/figure caption="Hickory Dickory Dock" vertical="start" >}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{< /paige/figure >}} -{{< paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="center" >}} +{{< paige/figure caption="Hickory Dickory Dock" vertical="center" >}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{< /paige/figure >}} -{{< paige/figure caption="Hickory Dickory Dock" height="20rem" vertical="end" >}} +{{< paige/figure caption="Hickory Dickory Dock" vertical="end" >}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{< /paige/figure >}} @@ -336,7 +320,7 @@ Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
}} +{{}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{}} @@ -345,7 +329,7 @@ I made a huge tiny mistake. In fact, it was a box of Oscar's legally obtained me 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.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{< /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: ```go-text-template -{{}} +
+ +{{}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{}} + +
``` Result: -{{< paige/figure caption="Hickory Dickory Dock" height="20rem" horizontal="end" maxwidth="10rem" number=7 vertical="center" >}} +
+ +{{< paige/figure caption="Hickory Dickory Dock" horizontal="end" maxwidth="20rem" number=7 vertical="end" >}} Hickory dickory dock.
The mouse ran up the clock.
The clock struck one,
The mouse ran down,
Hickory dickory dock. {{< /paige/figure >}} + +
diff --git a/layouts/partials/paige/figure.html b/layouts/partials/paige/figure.html index b38d9d7a..1300a105 100644 --- a/layouts/partials/paige/figure.html +++ b/layouts/partials/paige/figure.html @@ -5,7 +5,6 @@ {{ $content := $params.content | markdownify }} {{ $float := $params.float }} {{ $gap := $params.gap }} -{{ $height := $params.height }} {{ $horizontal := $params.horizontal | default "center" }} {{ $maxwidth := $params.maxwidth }} {{ $number := $params.number }} @@ -13,7 +12,6 @@ {{ $vertical := $params.vertical | default "center" }} {{ $width := $params.width }} -{{ $heights := slice }} {{ $showcaption := $caption }} {{ $sidemargin := "" }} {{ $table := false }} @@ -23,12 +21,6 @@ {{ $table = true }} {{ end }} -{{ if $height }} - {{ $heights = $heights | append (printf "height: %v" $height) }} -{{ end }} - -{{ $heights = delimit ($heights | sort) "; " }} - {{ if $maxwidth }} {{ $widths = $widths | append (printf "max-width: %v" $maxwidth) }} {{ end }} @@ -62,7 +54,7 @@ {{ end }} {{ end }} -
+
{{ $content }}
diff --git a/layouts/partials/paige/image-figure.html b/layouts/partials/paige/image-figure.html index 1c425c15..ff915f26 100644 --- a/layouts/partials/paige/image-figure.html +++ b/layouts/partials/paige/image-figure.html @@ -4,7 +4,6 @@ {{ $caption := $params.caption }} {{ $compact := $params.compact }} {{ $float := $params.float }} -{{ $height := $params.height }} {{ $horizontal := $params.horizontal }} {{ $link := $params.link }} {{ $maxwidth := $params.maxwidth }} @@ -44,7 +43,6 @@ "compact" $compact "content" $content "float" $float - "height" $height "horizontal" $horizontal "maxwidth" $maxwidth "number" $number diff --git a/layouts/shortcodes/paige/figure.html b/layouts/shortcodes/paige/figure.html index 6353911c..469976fb 100644 --- a/layouts/shortcodes/paige/figure.html +++ b/layouts/shortcodes/paige/figure.html @@ -1,7 +1,6 @@ {{ $caption := .Get 0 | default (.Get "caption") }} {{ $content := .Inner }} {{ $float := .Get "float" }} -{{ $height := .Get "height" }} {{ $horizontal := .Get "horizontal" }} {{ $maxwidth := .Get "maxwidth" }} {{ $number := .Get "number" }} @@ -14,7 +13,6 @@ "content" $content "float" $float "gap" 2 - "height" $height "horizontal" $horizontal "maxwidth" $maxwidth "number" $number diff --git a/layouts/shortcodes/paige/vimeo.html b/layouts/shortcodes/paige/vimeo.html index 12ce0305..3c797b59 100644 --- a/layouts/shortcodes/paige/vimeo.html +++ b/layouts/shortcodes/paige/vimeo.html @@ -121,17 +121,17 @@ "caption" $caption "content" (partial "paige/video.html" (dict "fullscreen" $fullscreen + "height" $height "referrerpolicy" $referrerpolicy "src" $src "title" $description + "width" $width )) "float" $float "gap" 2 - "height" $height "horizontal" $horizontal "maxwidth" $maxwidth "number" $number "numbered" $numbered "vertical" $vertical - "width" $width ) }} diff --git a/layouts/shortcodes/paige/youtube.html b/layouts/shortcodes/paige/youtube.html index 7f5369e0..94e90e4a 100644 --- a/layouts/shortcodes/paige/youtube.html +++ b/layouts/shortcodes/paige/youtube.html @@ -75,17 +75,17 @@ "caption" $caption "content" (partial "paige/video.html" (dict "fullscreen" $fullscreen + "height" $height "referrerpolicy" $referrerpolicy "src" $src "title" $description + "width" $width )) "float" $float "gap" 2 - "height" $height "horizontal" $horizontal "maxwidth" $maxwidth "number" $number "numbered" $numbered "vertical" $vertical - "width" $width ) }}