github.com/square/finch@v0.0.0-20240412205204-6530c03e2b96/docs/themes/hugo-geekdoc/layouts/shortcodes/tabs.html (about) 1 {{- if .Inner }}{{ end }} 2 {{- $id := .Get 0 }} 3 {{- $group := printf "tabs-%s" $id }} 4 5 6 <div class="gdoc-tabs"> 7 {{- range $index, $tab := .Scratch.Get $group }} 8 <input 9 type="radio" 10 class="gdoc-tabs__control hidden" 11 name="{{ $group }}" 12 id="{{ printf "%s-%d" $group $index }}" 13 {{ if not $index }}checked="checked"{{ end }} 14 /> 15 <label for="{{ printf "%s-%d" $group $index }}" class="gdoc-tabs__label"> 16 {{ $tab.Name }} 17 </label> 18 <div class="gdoc-markdown--nested gdoc-tabs__content"> 19 {{ .Content | $.Page.RenderString }} 20 </div> 21 {{- end }} 22 </div>