mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
33 lines
No EOL
913 B
HTML
33 lines
No EOL
913 B
HTML
{{- $_hugo_config := `{ "version": 1 }` }}
|
|
{{- $color := (.Get "color") }}
|
|
{{- $content := .Inner }}
|
|
{{- $icon := (.Get "icon") }}
|
|
{{- $name := (.Get "name") }}
|
|
{{- $style := (.Get "style") }}
|
|
{{- $title := (.Get "title") }}
|
|
{{- $tabs := slice }}
|
|
{{- if and .Parent (.Parent.Scratch.Get "tabs") }}
|
|
{{- $tabs = .Parent.Scratch.Get "tabs" }}
|
|
{{- end }}
|
|
{{- $tabs = $tabs | append (dict
|
|
"color" $color
|
|
"content" $content
|
|
"icon" $icon
|
|
"name" $name
|
|
"style" $style
|
|
"title" $title
|
|
) }}
|
|
{{- if .Parent }}
|
|
{{- $.Parent.Scratch.Set "tabs" $tabs }}
|
|
{{- else }}
|
|
{{- /* if no containing tabs shortcode is present, we display this tab as single */}}
|
|
{{- partial "shortcodes/tabs.html" (dict
|
|
"page" .Page
|
|
"color" ""
|
|
"content" $tabs
|
|
"groupid" ""
|
|
"icon" ""
|
|
"style" ""
|
|
"title" ""
|
|
) }}
|
|
{{- end }} |