Add quote cite param
This commit is contained in:
@@ -27,6 +27,22 @@ Result:
|
||||
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/quote >}}
|
||||
|
||||
## Cite
|
||||
|
||||
Code:
|
||||
|
||||
```go-text-template
|
||||
{{</* paige/quote cite="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/quote */>}}
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
{{< paige/quote cite="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/quote >}}
|
||||
|
||||
## Figure
|
||||
|
||||
Code:
|
||||
|
@@ -1,3 +1,4 @@
|
||||
{{ $cite := .Get 0 | default (.Get "cite") }}
|
||||
{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }}
|
||||
|
||||
{{ if not $content }}
|
||||
@@ -6,4 +7,8 @@
|
||||
|
||||
<div class="paige-quote">
|
||||
<blockquote class="blockquote">{{ $content }}</blockquote>
|
||||
|
||||
{{ with $cite }}
|
||||
<div class="blockquote-footer">{{ . }}</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user