Auto-generate ID for tabs (#649)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{{ if .Parent }}
|
||||
{{ $name := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" (.Parent.Get 0) }}
|
||||
{{ $group := printf "tabs-%d" .Parent.Ordinal }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get $group) }}
|
||||
{{ .Parent.Scratch.Set $group slice }}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{{ if .Inner }}{{ end }}
|
||||
{{ $id := .Get 0 }}
|
||||
{{ $group := printf "tabs-%s" $id }}
|
||||
{{ $group := printf "tabs-%d" .Ordinal }}
|
||||
|
||||
<div class="book-tabs">
|
||||
{{- range $index, $tab := .Scratch.Get $group -}}
|
||||
|
||||
Reference in New Issue
Block a user