feat: blockquote comment
This commit is contained in:
parent
8f593203b5
commit
a7c1084dc4
1 changed files with 7 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
|||
@params style Force a blockquote style. Optional.
|
||||
@params cite URI for work. Optional.
|
||||
@params source The speaker(s) of the quotation.
|
||||
@params comment A comment to add after the citation. Optional.
|
||||
|
||||
For works cited (optional):
|
||||
@params ibid Whether to use ibidem as the source. Optional.
|
||||
|
@ -29,6 +30,7 @@
|
|||
{{- $href := default "" ( index .Params "href" ) -}}
|
||||
{{- $ibid := default false ( index .Params "ibid" ) -}}
|
||||
{{- $source := .Params.source -}}
|
||||
{{- $comment := .Params.comment -}}
|
||||
|
||||
{{- $isSourceHidden := default ( not ( or ( isset .Params "source" ) ( isset .Params "ibid" ) ) ) ( index .Params "hideSource" ) -}}
|
||||
|
||||
|
@ -54,7 +56,7 @@
|
|||
<!-- Rendering -->
|
||||
|
||||
<figure
|
||||
class="figure--blockquote blockquote{{- with $style }} blockquote--{{- . -}}{{- end -}}"
|
||||
class="figure--blockquote blockquote {{ with $style }}blockquote--{{- . -}}{{- end -}}"
|
||||
itemscope
|
||||
itemtype="Quotation"
|
||||
role="group"
|
||||
|
@ -65,7 +67,7 @@
|
|||
>
|
||||
{{- .Inner | .Page.RenderString -}}
|
||||
</blockquote>
|
||||
<figcaption class="blockquote__caption{{- if $isSourceHidden }}blockquote__caption--hidden{{- end -}}">
|
||||
<figcaption class="blockquote__caption {{ if $isSourceHidden }}blockquote__caption--hidden{{- end -}}">
|
||||
{{- if $ibid -}}
|
||||
<abbr
|
||||
lang="la"
|
||||
|
@ -92,6 +94,9 @@
|
|||
{{- end -}}</span
|
||||
>
|
||||
{{- end -}}
|
||||
{{- with $comment -}}
|
||||
{{- printf " (%s)" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</figcaption>
|
||||
</figure>
|
||||
|
|
Loading…
Add table
Reference in a new issue