2020-01-12 15:33:02 +01:00
|
|
|
{{ if .Inner }}{{ end }}
|
|
|
|
{{ $id := .Get 0 }}
|
|
|
|
{{ $group := printf "tabs-%s" $id }}
|
|
|
|
|
2022-01-06 13:58:10 +01:00
|
|
|
|
2020-01-12 15:33:02 +01:00
|
|
|
<div class="gdoc-tabs">
|
2020-04-15 01:09:53 +02:00
|
|
|
{{ range $index, $tab := .Scratch.Get $group }}
|
2022-01-06 13:58:10 +01:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="gdoc-tabs__control hidden"
|
|
|
|
name="{{ $group }}"
|
|
|
|
id="{{ printf "%s-%d" $group $index }}"
|
|
|
|
{{ if not $index }}checked="checked"{{ end }}
|
|
|
|
/>
|
2020-04-15 01:09:53 +02:00
|
|
|
<label for="{{ printf "%s-%d" $group $index }}" class="gdoc-tabs__label">
|
|
|
|
{{ $tab.Name }}
|
|
|
|
</label>
|
|
|
|
<div class="gdoc-markdown--nested gdoc-tabs__content">
|
2021-02-17 09:22:26 +01:00
|
|
|
{{ .Content | $.Page.RenderString }}
|
2020-04-15 01:09:53 +02:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
2020-01-12 15:33:02 +01:00
|
|
|
</div>
|