theme: remove .Scratch with .Store #948
Some checks are pending
docs-build-deployment / Run deploy (push) Waiting to run
docs-build / Run build (push) Waiting to run

This commit is contained in:
Sören Weber 2024-11-18 19:13:40 +01:00
parent 40ede377c8
commit ab4197f311
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
3 changed files with 5 additions and 5 deletions

View file

@ -1 +1 @@
7.1.1+6cb54ccb05c2c63af78ad8cba8ff244278550c4a
7.1.1+40ede377c8e67960f181dd22ce34a63eb952f3f6

View file

@ -6,8 +6,8 @@
{{- $style := (.Get "style") }}
{{- $title := (.Get "title") }}
{{- $tabs := slice }}
{{- if and .Parent (.Parent.Scratch.Get "tabs") }}
{{- $tabs = .Parent.Scratch.Get "tabs" }}
{{- if and .Parent (.Parent.Store.Get "tabs") }}
{{- $tabs = .Parent.Store.Get "tabs" }}
{{- end }}
{{- $tabs = $tabs | append (dict
"color" $color
@ -18,7 +18,7 @@
"title" $title
) }}
{{- if .Parent }}
{{- $.Parent.Scratch.Set "tabs" $tabs }}
{{- $.Parent.Store.Set "tabs" $tabs }}
{{- else }}
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
{{- partial "shortcodes/tabs.html" (dict

View file

@ -7,7 +7,7 @@
{{- $icon := (.Get "icon") }}
{{- $style := (.Get "style") }}
{{- $title := (.Get "title") }}
{{- $tabs := (.Scratch.Get "tabs") }}
{{- $tabs := (.Store.Get "tabs") }}
{{- partial "shortcodes/tabs.html" (dict
"page" .Page
"color" $color