hugo-tufte/layouts/shortcodes/epigraph.html
2021-07-31 09:18:32 -05:00

15 lines
391 B
HTML

<div class="epigraph">
<blockquote>
{{ $t := .Get "type" }}
{{ if eq $t "compact" }}{{ .Inner }}{{ else }}<p>{{ .Inner }}</p>{{ end }}
{{ if .IsNamedParams }}
<footer>
{{ with .Get "pre" }}{{ . }}{{ end }}
{{ with .Get "link" }}<a href={{ . }}>{{ end }}
{{ with .Get "cite" }}<cite>{{ . }}</cite>{{ end }}
</a>
{{ with .Get "post" }}{{ . }}{{ end }}
</footer>
{{ end }}
<blockquote>
</div>