Omphaloskepsis-2/layouts/shortcodes/blockquote.html

36 lines
1.4 KiB
HTML

{{- if ( not .Params ) -}}
{{- errorf "No params provided for blockquote" -}}
{{- end -}}
<figure
class="figure--blockquote blockquote{{- if .Params.style }} blockquote--{{- .Params.style -}}{{- end -}}"
itemscope
itemtype="Quotation"
>
<blockquote
class="blockquote__body"
{{- if .Params.cite }} cite="{{ .Params.cite }}"{{- end -}}
>
{{- .Inner | .Page.RenderString -}}
</blockquote>
<figcaption class="blockquote__caption">
{{- if .Params.ibid -}}
<abbr lang="la" title="ibīdem [in the same place]">Ibid.</abbr>
{{- else -}}
<span itemprop="spokenByCharacter">{{- .Params.source | safeHTML -}}</span>
{{- if .Params.title -}}, <span itemprop="isBasedOn">{{- partial "cite.html" . -}}
{{- if .Params.titleSeries }} (
{{- .Scratch.SetInMap "Params" "title" .Params.titleSeries -}}
{{- .Scratch.SetInMap "Params" "titleLang" .Params.titleSeriesLang -}}
{{- .Scratch.SetInMap "Params" "titleTr" .Params.titleSeriesTr -}}
{{- .Scratch.SetInMap "Params" "cite" .Params.citeSeries -}}
{{- .Scratch.SetInMap "Params" "schemaType" .Params.schemaTypeSeries -}}
{{- .Scratch.SetInMap "parentCite" "Params" ( .Scratch.Get "Params" ) -}}
{{- partial "cite.html" ( .Scratch.Get "parentCite" ) -}}
{{- with .Params.numberSeries }}, {{ . | safeHTML -}}{{- end -}}
){{- end -}}</span>
{{- end -}}
{{- end -}}
</figcaption>
</figure>