webpage/themes/hugo-book/layouts/shortcodes/tab.html

10 lines
341 B
HTML
Raw Permalink Normal View History

2024-11-26 22:25:09 +00:00
{{- $group := printf "tabs-%d" .Parent.Ordinal -}}
{{- $tab := printf "%s-%d" $group .Ordinal }}
<input type="radio" class="toggle" name="{{ $group }}" id="{{ $tab }}" {{ if not .Ordinal }}checked="checked"{{ end }} />
<label for="{{ $tab }}">
{{- .Get 0 -}}
</label>
<div class="book-tabs-content markdown-inner">
{{- .Inner -}}
</div>