{{- /* Renders a block quotation. @params style Force a blockquote style. Optional. @params cite URI for work. Optional. @params source The speaker(s) of the quotation. For works cited (optional): @params ibid Whether to use ibidem as the source. Optional. @see partials/cite.html.tmpl for full list of args. For works cited that form part of a series (optional): @params schemaTypeSeries The Schema.org `itemtype` value for the work series. Default 'CreativeWork'. Optional. @params titleSeries Title of the work series to display. Optional. @params citeSeries URI for work series. Optional. @params titleSeriesLang Language code of a foreign-language work series' title. Optional. @params titleSeriesTr English translation of a foreign-language work series' title. Optional. @params numberSeries The number or code of the quoted work within its series. Optional. */ -}} {{- $valid_styles := slice "" "epigram" "script" -}} {{- $style := default "" ( index .Params "style" ) -}} {{- $cite := default "" ( index .Params "cite" ) -}} {{- $ibid := default false ( index .Params "ibid" ) -}} {{- $source := .Params.source -}} {{- $isSourceHidden := default ( not ( or ( isset .Params "source" ) ( isset .Params "ibid" ) ) ) ( index .Params "hideSource" ) -}} {{- $hasCitedWork := ( isset .Params "title" ) }} {{- $hasCitedSeries := ( isset .Params "titleSeries" ) -}} {{- if ( not ( in $valid_styles $style ) ) -}} {{- errorf "Invalid blockquote style (%q) provided" $style -}} {{- end -}} {{- if ( not ( or ( isset .Params "source" ) ( isset .Params "ibid" ) ) ) -}} {{- erroridf "blockquote-no-params" "No source provided for blockquote" -}} {{- end -}} {{- if ( not ( isset $.Params "cite" ) ) -}} {{- erroridf "missing-cite" "No cite found for blockquote (%q)" .Page.File.Path -}} {{- end -}}
{{- .Inner | .Page.RenderString -}}
{{- if $ibid -}} Ibid. {{- else if $source -}} {{- $source | safeHTML -}} {{- if $hasCitedWork -}}, {{- partial "cite.html.tmpl" . -}} {{- if $hasCitedSeries }} ( {{- .Scratch.Set "cite" .Params.citeSeries -}} {{- .Scratch.Set "title" .Params.titleSeries -}} {{- .Scratch.Set "titleLang" .Params.titleSeriesLang -}} {{- .Scratch.Set "titleTr" .Params.titleSeriesTr -}} {{- .Scratch.Set "schemaType" .Params.schemaTypeSeries -}} {{- partial "cite.html.tmpl" . -}} {{- with .Params.numberSeries }}, {{ . | safeHTML -}}{{- end -}} ){{- end -}} {{- end -}} {{- end -}}