2021-09-12 07:44:34 +00:00
|
|
|
{{- with .Inner }}{{/* don't do anything, just call it */}}{{ end }}
|
|
|
|
{{- $groupId := default "default" (.Get "groupId") }}
|
2021-03-16 17:21:57 +00:00
|
|
|
<div class="tab-panel">
|
2021-09-12 07:44:34 +00:00
|
|
|
<div class="tab-nav">
|
|
|
|
{{- range $idx, $tab := .Scratch.Get "tabs" }}
|
|
|
|
<button
|
|
|
|
data-tab-item="{{ .name }}"
|
|
|
|
data-tab-group="{{ $groupId }}"
|
2022-05-29 21:22:15 +00:00
|
|
|
class="tab-nav-button {{ cond (eq $idx 0) "active" ""}}"
|
2021-09-12 07:44:34 +00:00
|
|
|
onclick="switchTab('{{ $groupId }}','{{ .name }}')"
|
|
|
|
><span>{{ .name }}</span></button>
|
|
|
|
{{- end }}
|
|
|
|
</div>
|
|
|
|
<div class="tab-content">
|
|
|
|
{{- range $idx, $tab := .Scratch.Get "tabs" }}
|
|
|
|
<div data-tab-item="{{ .name }}" data-tab-group="{{ $groupId }}" class="tab-item {{ cond (eq $idx 0) "active" ""}}">
|
|
|
|
{{ .content }}
|
2021-03-16 17:21:57 +00:00
|
|
|
</div>
|
2021-09-12 07:44:34 +00:00
|
|
|
{{- end }}
|
|
|
|
</div>
|
2021-03-16 17:21:57 +00:00
|
|
|
</div>
|