mirror of https://github.com/docker/docs.git
hugo: replace Shortcode.Scratch with Shortcode.Store
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
b629fdadcf
commit
c9dc7f99c6
|
@ -4,9 +4,9 @@
|
|||
|
||||
{{ $name := trim (.Get "name") " " }}
|
||||
|
||||
{{ if not (.Parent.Scratch.Get "tabs") }}
|
||||
{{ .Parent.Scratch.Set "tabs" slice }}
|
||||
{{ if not (.Parent.Store.Get "tabs") }}
|
||||
{{ .Parent.Store.Set "tabs" slice }}
|
||||
{{ end }}
|
||||
{{ with .Inner }}
|
||||
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }}
|
||||
{{ $.Parent.Store.Add "tabs" (dict "name" $name "content" . ) }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{ with .Inner }}{{/* don't do anything, just call it */}}{{ end }}
|
||||
{{ $first := urlize (index (.Scratch.Get "tabs") 0).name }}
|
||||
{{ $first := urlize (index (.Store.Get "tabs") 0).name }}
|
||||
{{ $group := .Get "group" }}
|
||||
{{ $groupID := fmt.Printf "tabgroup-%s" (urlize $group) }}
|
||||
{{ $persist := .Get "persist" }}
|
||||
|
@ -19,7 +19,7 @@
|
|||
{{ end }}
|
||||
aria-role="tabpanel">
|
||||
<div aria-role="tablist" class="space-x-2">
|
||||
{{ range (.Scratch.Get "tabs") }}
|
||||
{{ range (.Store.Get "tabs") }}
|
||||
<button
|
||||
class="p-1"
|
||||
:class="selected === '{{ .name | urlize }}' &&
|
||||
|
@ -37,7 +37,7 @@
|
|||
</div>
|
||||
<hr class="!mt-0" />
|
||||
<div>
|
||||
{{ range (.Scratch.Get "tabs") }}
|
||||
{{ range (.Store.Get "tabs") }}
|
||||
<div
|
||||
aria-role="tab"
|
||||
:class="selected !== '{{ .name | urlize }}' && 'hidden'"
|
||||
|
|
Loading…
Reference in New Issue