Skip to content

Commit

Permalink
Revert "theme: remove .Scratch with .Store #948"
Browse files Browse the repository at this point in the history
This reverts commit ab4197f.
  • Loading branch information
McShelby committed Nov 19, 2024
1 parent ab4197f commit a23eb3a
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+40ede377c8e67960f181dd22ce34a63eb952f3f6
7.1.1+ab4197f3113afa9a7d17bed69dbef6c0e75a4921
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.Store.Get "tabs") }}
{{- $tabs = .Parent.Store.Get "tabs" }}
{{- if and .Parent (.Parent.Scratch.Get "tabs") }}
{{- $tabs = .Parent.Scratch.Get "tabs" }}
{{- end }}
{{- $tabs = $tabs | append (dict
"color" $color
Expand All @@ -18,7 +18,7 @@
"title" $title
) }}
{{- if .Parent }}
{{- $.Parent.Store.Set "tabs" $tabs }}
{{- $.Parent.Scratch.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 := (.Store.Get "tabs") }}
{{- $tabs := (.Scratch.Get "tabs") }}
{{- partial "shortcodes/tabs.html" (dict
"page" .Page
"color" $color
Expand Down

0 comments on commit a23eb3a

Please sign in to comment.