mirror of
https://github.com/loikein/hugo-tufte.git
synced 2024-12-25 23:09:44 +01:00
b9ec18d78e
Add the epigraph shortcode. This should complete the Tufte-CSS specific shortcodes. Additionally, the section and div shortcodes were refactored for ease of use.
13 lines
338 B
HTML
13 lines
338 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 "cite" }}<cite>{{ . }}</cite>{{ end }}
|
|
{{ with .Get "post" }}{{ . }}{{ end }}
|
|
</footer>
|
|
{{ end }}
|
|
<blockquote>
|
|
</div>
|