mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-22 23:37:53 +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") }}
|
||||
{{- $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
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue