2024-10-15 08:09:14 +00:00
|
|
|
{{- $author := .author }}
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- $card := .card }}
|
2024-10-15 08:09:14 +00:00
|
|
|
{{- $content := .content }}
|
|
|
|
{{- $cite := .cite }}
|
|
|
|
{{- $title := .title }}
|
|
|
|
{{- $ref := .ref }}
|
|
|
|
{{- $caption := .caption }}
|
2024-11-09 20:12:57 +00:00
|
|
|
<article class="quote-block{{if $cite}} h-cite{{end}}">
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- with or $card $author }}
|
|
|
|
<header class="quote-block__header">
|
|
|
|
<p class="quote-block__attribution">
|
|
|
|
{{- with $card }}
|
2024-11-09 20:12:57 +00:00
|
|
|
<span class="quote-block__card">{{ partial "components/author-card.html" . }}</span>
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- else with $author }}
|
|
|
|
<span class="quote-block__author p-author h-card">
|
|
|
|
{{ . | markdownify }}
|
2024-10-15 08:09:14 +00:00
|
|
|
</span>
|
2024-10-18 07:33:33 +00:00
|
|
|
{{- end -}}
|
|
|
|
<span class="quote-block__postpend"> wrote:</span>
|
2024-10-15 08:09:14 +00:00
|
|
|
</p>
|
|
|
|
</header>
|
|
|
|
{{- else }}
|
2024-10-18 07:33:33 +00:00
|
|
|
<header class="quote-block__header">
|
|
|
|
<p class="quote-block__prepend">Quote:</p>
|
2024-10-15 08:09:14 +00:00
|
|
|
</header>
|
|
|
|
{{- end }}
|
|
|
|
{{- with $content }}
|
2024-10-18 07:33:33 +00:00
|
|
|
<section class="quote-block__content">
|
|
|
|
<blockquote class="e-content"{{ with $cite }} cite="{{.}}"{{end}}>
|
2024-10-15 08:09:14 +00:00
|
|
|
{{. -}}
|
|
|
|
</blockquote>
|
|
|
|
</section>
|
|
|
|
{{- end }}
|
|
|
|
{{- if (or $caption $cite) }}
|
2024-10-18 07:33:33 +00:00
|
|
|
<footer class="quote-block__footer">
|
2024-10-15 08:09:14 +00:00
|
|
|
<p style="display: contents">
|
|
|
|
{{- with $caption }} {{/* caption is manually set and overrides cite+title+ref/etc */}}
|
|
|
|
<span class="quote-block__caption">{{ . | markdownify }}</span>
|
|
|
|
{{- else }} {{/* no caption, so make one from the cite+title and ref/etc */}}
|
|
|
|
{{- if $title }}
|
|
|
|
<span class="quote-block__caption">
|
|
|
|
<cite><a href="{{$cite}}" class="u-url">{{$title}}</a></cite>
|
|
|
|
{{- with $ref}} {{/* TODO: make this more modular? break ref into page numbers, edition, etc */}}
|
|
|
|
{{.}}
|
|
|
|
{{- end }}
|
|
|
|
</span>
|
|
|
|
{{- else }} {{/* no title, so add a basic link */}}
|
|
|
|
<span class="quote-block__caption">
|
|
|
|
<a href="{{$cite}}" class="u-url">(View source)</a> {{/* also stop here bc a ref with no title makes no sense? */}}
|
|
|
|
</span>
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
</p>
|
|
|
|
</footer>
|
|
|
|
{{- end }}
|
|
|
|
</article>
|