diff --git a/exampleSite/content/blog/figure-quote.md b/exampleSite/content/blog/figure-quote.md new file mode 100644 index 00000000..1f543742 --- /dev/null +++ b/exampleSite/content/blog/figure-quote.md @@ -0,0 +1,131 @@ +--- +categories: [paige] +date: "2023-01-02" +description: Demonstration of the Paige quote shortcode. +tags: [figures, shortcodes] +title: Quote Shortcode +--- + +Code: + +```go-text-template +{{}} +Don't believe everything you read on the Internet. +{{}} +``` + +Result: + +{{< paige/quote >}} +Don't believe everything you read on the Internet. +{{< /paige/quote >}} + +--- + +Code: + +```go-text-template +{{}} +Don't believe everything you read on the Internet. +{{}} +``` + +Result: + +{{< paige/quote cite="Abraham Lincoln" >}} +Don't believe everything you read on the Internet. +{{< /paige/quote >}} + +--- + +Code: + +```go-text-template +{{}} +Don't believe everything you read on the Internet. +{{}} + +{{}} +Use the Force, Harry. +{{}} +``` + +Result: + +{{< paige/quote >}} +Don't believe everything you read on the Internet. +{{< /paige/quote >}} + +{{< paige/quote >}} +Use the Force, Harry. +{{< /paige/quote >}} + +--- + +Code: + +```go-text-template +{{}} +Don't believe everything you read on the Internet. +{{}} + +{{}} +Use the Force, Harry. +{{}} +``` + +Result: + +{{< paige/quote cite="Abraham Lincoln" >}} +Don't believe everything you read on the Internet. +{{< /paige/quote >}} + +{{< paige/quote cite="Gandalf" >}} +Use the Force, Harry. +{{< /paige/quote >}} + +--- + +Code: + +```go-text-template +{{}} +
+Hickory dickory dock.
+The mouse ran up the clock.
+The clock struck one,
+The mouse ran down,
+Hickory dickory dock.
+
+{{}} + +{{}} +
+Humpty Dumpty sat on a wall,
+Humpty Dumpty had a great fall.
+All the king's horses and all the king's men
+Couldn't put Humpty together again.
+
+{{}} +``` + +Result: + +{{< paige/quote caption="Hickory Dickory Dock" align="start" >}} +
+Hickory dickory dock.
+The mouse ran up the clock.
+The clock struck one,
+The mouse ran down,
+Hickory dickory dock.
+
+{{< /paige/quote >}} + +{{< paige/quote cite="Hickory Dickory Dock" align="end" >}} +
+Humpty Dumpty sat on a wall,
+Humpty Dumpty had a great fall.
+All the king's horses and all the king's men
+Couldn't put Humpty together again.
+
+{{< /paige/quote >}} diff --git a/layouts/shortcodes/paige/quote.html b/layouts/shortcodes/paige/quote.html new file mode 100644 index 00000000..10378cef --- /dev/null +++ b/layouts/shortcodes/paige/quote.html @@ -0,0 +1,19 @@ +{{ $align := .Get "align" | default "center" }} +{{ $caption := .Get "caption" }} +{{ $cite := .Get 0 | default (.Get "cite") }} + +{{ $caption = $caption | markdownify }} +{{ $cite = $cite | markdownify }} +{{ $content := .Inner | markdownify }} + +
+
+
{{ $content }}
+ {{ with $caption }} +
{{ . }}
+ {{ end }} + {{ with $cite }} + + {{ end }} +
+