diff --git a/layouts/shortcodes/tabs.html b/layouts/shortcodes/tabs.html index 3aebcacb..02c790b2 100644 --- a/layouts/shortcodes/tabs.html +++ b/layouts/shortcodes/tabs.html @@ -2,18 +2,28 @@ {{- $noop := .Inner -}} {{- $group := .Get "group" -}} +{{- $default := .Get "default" -}} -
+
{{- range $nTabs, $_ := .Store.Get "tabs" -}} + {{- $isActive := false -}} + {{- if $default -}} + {{- $isActive = eq $default (index . "label") -}} + {{- else -}} + {{- $isActive = eq $nTabs 0 -}} + {{- end -}}
{{- range $nTabs, $_ := .Store.Get "tabs" -}} -
+ {{- $isActive := false -}} + {{- if $default -}} + {{- $isActive = eq $default (index . "label") -}} + {{- else -}} + {{- $isActive = eq $nTabs 0 -}} + {{- end -}} +
{{ index . "content" }}
{{- end -}}