mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-28 22:20:17 +00:00
15 lines
485 B
HTML
15 lines
485 B
HTML
{{- if .Inner }}{{ end -}}
|
|
{{- $group := printf "tabs-%d" .Ordinal -}}
|
|
|
|
<div class="book-tabs">
|
|
{{- range $index, $tab := .Scratch.Get $group -}}
|
|
<input type="radio" class="toggle" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} />
|
|
<label for="{{ printf "%s-%d" $group $index }}">
|
|
{{- $tab.Name -}}
|
|
</label>
|
|
<div class="book-tabs-content markdown-inner">
|
|
{{- .Content | safeHTML -}}
|
|
</div>
|
|
{{- end -}}
|
|
</div>
|