2024-10-15 08:09:14 +00:00
|
|
|
{{- if .AlertType }}
|
|
|
|
{{- /* this is an alert/admonition, not a quote */}}
|
|
|
|
{{- $type := .AlertType }}
|
|
|
|
{{- $title := or .AlertTitle (strings.FirstUpper .AlertType) }}
|
|
|
|
{{- $text := .Text }}
|
|
|
|
{{- $opts := dict "ctx" . "type" $type "title" $title "text" $text }}
|
|
|
|
{{- partial "components/admonition.html" $opts }}
|
|
|
|
{{- else }}
|
|
|
|
{{- /* this is a quote */}}
|
|
|
|
{{- $datapath := (split (.Attributes.card) "/") }}
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- $card := .Page.Site.Data.people }}
|
2024-10-15 08:09:14 +00:00
|
|
|
{{- range $datapath }}
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- $card = index $card . }}
|
2024-10-15 08:09:14 +00:00
|
|
|
{{- end }}
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- $author := .Attributes.author }}
|
2024-10-15 08:09:14 +00:00
|
|
|
{{- $content := .Text }}
|
|
|
|
{{- $cite := .Attributes.cite }}
|
|
|
|
{{- $title := .Attributes.title }}
|
|
|
|
{{- $ref := .Attributes.ref }}
|
|
|
|
{{- $caption := .Attributes.caption }}
|
|
|
|
{{- $opts := dict
|
|
|
|
"ctx" .
|
2024-10-18 07:33:33 +00:00
|
|
|
"card" $card
|
2024-10-15 08:09:14 +00:00
|
|
|
"author" $author
|
|
|
|
"content" $content
|
|
|
|
"cite" $cite
|
|
|
|
"title" $title
|
|
|
|
"ref" $ref
|
|
|
|
"caption" $caption }}
|
|
|
|
{{- printf "<!-- begin quote %s -->" (string (add .Ordinal 1)) | safeHTML }}
|
|
|
|
{{- partial "components/quote-block.html" $opts }}
|
|
|
|
{{ printf "<!-- end quote %s -->" (string (add .Ordinal 1)) | safeHTML }}
|
2024-10-12 18:45:14 +00:00
|
|
|
{{ end }}
|