mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +00:00
23 lines
614 B
HTML
23 lines
614 B
HTML
{{- if .Inner }}{{ end }}
|
|
{{- $id := .Get 0 }}
|
|
{{- $group := printf "tabs-%s" $id }}
|
|
|
|
|
|
<div class="gblog-tabs">
|
|
{{- range $index, $tab := .Scratch.Get $group }}
|
|
<input
|
|
type="radio"
|
|
class="gblog-tabs__control hidden"
|
|
name="{{ $group }}"
|
|
id="{{ printf "%s-%d" $group $index }}"
|
|
{{ if not $index }}checked="checked"{{ end }}
|
|
/>
|
|
<label for="{{ printf "%s-%d" $group $index }}" class="gblog-tabs__label">
|
|
{{ $tab.Name }}
|
|
</label>
|
|
<div class="gblog-markdown--nested gblog-tabs__content">
|
|
{{ .Content | $.Page.RenderString }}
|
|
</div>
|
|
{{- end }}
|
|
</div>
|