2019-05-22 12:37:31 +00:00
|
|
|
{{ if .Inner }}{{ end }}
|
|
|
|
{{ $id := .Get 0 }}
|
|
|
|
{{ $group := printf "tabs-%s" $id }}
|
|
|
|
|
2019-05-23 15:48:30 +00:00
|
|
|
<div class="book-tabs">
|
2020-03-07 12:37:40 +00:00
|
|
|
{{- range $index, $tab := .Scratch.Get $group -}}
|
2019-09-01 01:38:16 +00:00
|
|
|
<input type="radio" class="hidden" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} />
|
2019-05-23 15:48:30 +00:00
|
|
|
<label for="{{ printf "%s-%d" $group $index }}">
|
2020-03-07 12:37:40 +00:00
|
|
|
{{- $tab.Name -}}
|
2019-05-23 15:48:30 +00:00
|
|
|
</label>
|
|
|
|
<div class="book-tabs-content markdown-inner">
|
2020-03-07 12:37:40 +00:00
|
|
|
{{- .Content | markdownify -}}
|
2019-05-23 15:48:30 +00:00
|
|
|
</div>
|
2020-02-25 20:16:49 +00:00
|
|
|
{{- end -}}
|
2019-05-23 15:48:30 +00:00
|
|
|
</div>
|