Skip to content

Commit

Permalink
theme: remove .Scratch with .Store #948
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Nov 18, 2024
1 parent 40ede37 commit ab4197f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.1.1+6cb54ccb05c2c63af78ad8cba8ff244278550c4a
7.1.1+40ede377c8e67960f181dd22ce34a63eb952f3f6
6 changes: 3 additions & 3 deletions layouts/shortcodes/tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ab4197f

Please sign in to comment.