2020-07-06 18:55:32 +00:00
|
|
|
{{ if .Inner }}{{ end }}
|
|
|
|
{{ $id := .Get 0 }}
|
|
|
|
{{ $group := printf "tabs-%s" $id }}
|
|
|
|
|
2021-12-30 14:55:55 +00:00
|
|
|
|
2020-07-06 18:55:32 +00:00
|
|
|
<div class="gblog-tabs">
|
|
|
|
{{ range $index, $tab := .Scratch.Get $group }}
|
2021-12-30 14:55:55 +00:00
|
|
|
<input
|
|
|
|
type="radio"
|
|
|
|
class="gblog-tabs__control hidden"
|
|
|
|
name="{{ $group }}"
|
|
|
|
id="{{ printf "%s-%d" $group $index }}"
|
|
|
|
{{ if not $index }}checked="checked"{{ end }}
|
|
|
|
/>
|
2020-07-06 18:55:32 +00:00
|
|
|
<label for="{{ printf "%s-%d" $group $index }}" class="gblog-tabs__label">
|
|
|
|
{{ $tab.Name }}
|
|
|
|
</label>
|
|
|
|
<div class="gblog-markdown--nested gblog-tabs__content">
|
2021-02-21 12:45:21 +00:00
|
|
|
{{ .Content | $.Page.RenderString }}
|
2020-07-06 18:55:32 +00:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
</div>
|