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