coder/layouts/shortcodes/tabgroup.html

11 lines
372 B
HTML
Raw Normal View History

2024-01-03 19:09:11 +03:00
{{ $align := .Get "align" | default "left" }}
{{ $style := .Get "style" | default "markdown" }}
{{ $group := .Page.Scratch.Get "tabGroupIndex" | default 0 }}
{{ $index := .Page.Scratch.Set "tabElementIndex" 0 }}
<div class="tabs {{ if eq $style "code" }}tabs-code {{ end }}tabs-{{ $align }}">
{{ .Inner }}
</div>
{{ .Page.Scratch.Set "tabGroupIndex" (add 1 $group) }}