2023-06-03 22:19:50 +00:00
|
|
|
{{- $_hugo_config := `{ "version": 1 }` }}
|
2023-06-05 21:18:12 +00:00
|
|
|
{{- $color := (.Get "color") }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- $content := .Inner }}
|
2023-06-05 21:18:12 +00:00
|
|
|
{{- $icon := (.Get "icon") }}
|
|
|
|
{{- $name := (.Get "name") }}
|
|
|
|
{{- $style := (.Get "style") }}
|
|
|
|
{{- $title := (.Get "title") }}
|
2023-05-23 21:57:48 +00:00
|
|
|
{{- $tabs := slice }}
|
2024-11-18 18:13:40 +00:00
|
|
|
{{- if and .Parent (.Parent.Store.Get "tabs") }}
|
|
|
|
{{- $tabs = .Parent.Store.Get "tabs" }}
|
2023-05-23 21:57:48 +00:00
|
|
|
{{- end }}
|
2023-06-05 21:18:12 +00:00
|
|
|
{{- $tabs = $tabs | append (dict
|
|
|
|
"color" $color
|
|
|
|
"content" $content
|
|
|
|
"icon" $icon
|
|
|
|
"name" $name
|
|
|
|
"style" $style
|
|
|
|
"title" $title
|
|
|
|
) }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- if .Parent }}
|
2024-11-18 18:13:40 +00:00
|
|
|
{{- $.Parent.Store.Set "tabs" $tabs }}
|
2022-06-22 18:32:18 +00:00
|
|
|
{{- else }}
|
2024-04-24 21:05:13 +00:00
|
|
|
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
|
2023-05-23 21:57:48 +00:00
|
|
|
{{- partial "shortcodes/tabs.html" (dict
|
2023-07-27 14:14:55 +00:00
|
|
|
"page" .Page
|
2023-06-05 21:18:12 +00:00
|
|
|
"color" ""
|
2023-05-23 21:57:48 +00:00
|
|
|
"content" $tabs
|
2023-06-05 21:18:12 +00:00
|
|
|
"groupid" ""
|
|
|
|
"icon" ""
|
|
|
|
"style" ""
|
|
|
|
"title" ""
|
2023-05-23 21:57:48 +00:00
|
|
|
) }}
|
|
|
|
{{- end }}
|