uci-hugo-landingpage/layouts/shortcodes/bookmark.html
2017-04-03 13:57:17 -07:00

6 lines
338 B
HTML

{{ $numOfParams := ( len .Params ) }}
{{ if eq $numOfParams 1 }} <span name="{{ .Get 0 }}">{{ .Get 0 }}</span> {{ end }}
{{ if eq $numOfParams 2 }} <span name="{{ .Get 0 }}">{{ .Get 1 }}</span> {{ end }}
{{ if eq $numOfParams 3 }}
<span name="{{ .Get 0 }}" {{ if (.Get 2) "hide" }}class="invisible"{{ end }}>{{ .Get 1 }}</span>
{{ end }}