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