mirror of
https://github.com/loikein/hugo-tufte.git
synced 2025-07-31 09:12:44 +02:00
Add and Refactor shortcodes.
Add the epigraph shortcode. This should complete the Tufte-CSS specific shortcodes. Additionally, the section and div shortcodes were refactored for ease of use.
This commit is contained in:
parent
381982f4a7
commit
b9ec18d78e
6 changed files with 76 additions and 13 deletions
layouts/shortcodes
|
@ -1,9 +1,9 @@
|
|||
{{ with .Get 0 }}
|
||||
{{ if eq . "begin" }}
|
||||
<section>
|
||||
{{ else if eq . "end" }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ $loc := .Get 0 }}
|
||||
{{ if .IsNamedParams }}
|
||||
<section {{with .Get "class"}} class="{{.}}"{{end}}{{with .Get "id"}} id="{{.}}"{{end}}>
|
||||
{{ else if or (eq $loc "") (eq $loc "begin") }}
|
||||
<section>
|
||||
{{ else if eq $loc "end" }}
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue