blob: 61958c8cda3ba991a4aa51bd321b6129a1654c97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{{ $_hugo_config := `{ "version": 1 }` }}
<!-- https://github.com/alex-shpak/hugo-book/blob/master/layouts/shortcodes/tabs.html -->
<link rel="stylesheet" type="text/css" href='{{ (resources.Get "sass/shortcodes/tabs.scss" | toCSS).Permalink }}'>
{{ if .Inner }}{{ end }}
{{ $group := printf "tabs-%d" .Ordinal }}
<div class="tabs">
{{- range $index, $tab := .Scratch.Get $group -}}
<input type="radio" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} />
<label for="{{ printf "%s-%d" $group $index }}">
{{- $tab.Name -}}
</label>
<div class="tab">
{{- .Content | markdownify -}}
</div>
{{- end -}}
</div>
|