Rewrite tabs shortcode to make them simpler
This commit is contained in:
@@ -1,14 +1,3 @@
|
||||
{{- if .Inner }}{{ end -}}
|
||||
{{- $group := printf "tabs-%d" .Ordinal -}}
|
||||
|
||||
<div class="book-tabs">
|
||||
{{- range $index, $tab := .Scratch.Get $group -}}
|
||||
<input type="radio" class="toggle" name="{{ $group }}" id="{{ printf "%s-%d" $group $index }}" {{ if not $index }}checked="checked"{{ end }} />
|
||||
<label for="{{ printf "%s-%d" $group $index }}">
|
||||
{{- $tab.Name -}}
|
||||
</label>
|
||||
<div class="book-tabs-content markdown-inner">
|
||||
{{- .Content | safeHTML -}}
|
||||
</div>
|
||||
{{- end -}}
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user