mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
Revert "theme: remove .Scratch with .Store #948"
This reverts commit ab4197f311
.
This commit is contained in:
parent
ab4197f311
commit
a23eb3a9d8
3 changed files with 5 additions and 5 deletions
|
@ -1 +1 @@
|
||||||
7.1.1+40ede377c8e67960f181dd22ce34a63eb952f3f6
|
7.1.1+ab4197f3113afa9a7d17bed69dbef6c0e75a4921
|
|
@ -6,8 +6,8 @@
|
||||||
{{- $style := (.Get "style") }}
|
{{- $style := (.Get "style") }}
|
||||||
{{- $title := (.Get "title") }}
|
{{- $title := (.Get "title") }}
|
||||||
{{- $tabs := slice }}
|
{{- $tabs := slice }}
|
||||||
{{- if and .Parent (.Parent.Store.Get "tabs") }}
|
{{- if and .Parent (.Parent.Scratch.Get "tabs") }}
|
||||||
{{- $tabs = .Parent.Store.Get "tabs" }}
|
{{- $tabs = .Parent.Scratch.Get "tabs" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $tabs = $tabs | append (dict
|
{{- $tabs = $tabs | append (dict
|
||||||
"color" $color
|
"color" $color
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
"title" $title
|
"title" $title
|
||||||
) }}
|
) }}
|
||||||
{{- if .Parent }}
|
{{- if .Parent }}
|
||||||
{{- $.Parent.Store.Set "tabs" $tabs }}
|
{{- $.Parent.Scratch.Set "tabs" $tabs }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
|
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
|
||||||
{{- partial "shortcodes/tabs.html" (dict
|
{{- partial "shortcodes/tabs.html" (dict
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
{{- $icon := (.Get "icon") }}
|
{{- $icon := (.Get "icon") }}
|
||||||
{{- $style := (.Get "style") }}
|
{{- $style := (.Get "style") }}
|
||||||
{{- $title := (.Get "title") }}
|
{{- $title := (.Get "title") }}
|
||||||
{{- $tabs := (.Store.Get "tabs") }}
|
{{- $tabs := (.Scratch.Get "tabs") }}
|
||||||
{{- partial "shortcodes/tabs.html" (dict
|
{{- partial "shortcodes/tabs.html" (dict
|
||||||
"page" .Page
|
"page" .Page
|
||||||
"color" $color
|
"color" $color
|
||||||
|
|
Loading…
Reference in a new issue