github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/docs/themes/hugo-theme-relearn/layouts/shortcodes/tab.html (about) 1 {{- $_hugo_config := `{ "version": 1 }` }} 2 {{- $color := (.Get "color") }} 3 {{- $content := .Inner }} 4 {{- $icon := (.Get "icon") }} 5 {{- $name := (.Get "name") }} 6 {{- $style := (.Get "style") }} 7 {{- $title := (.Get "title") }} 8 {{- $tabs := slice }} 9 {{- if and .Parent (.Parent.Scratch.Get "tabs") }} 10 {{- $tabs = .Parent.Scratch.Get "tabs" }} 11 {{- end }} 12 {{- $tabs = $tabs | append (dict 13 "color" $color 14 "content" $content 15 "icon" $icon 16 "name" $name 17 "style" $style 18 "title" $title 19 ) }} 20 {{- if .Parent }} 21 {{- $.Parent.Scratch.Set "tabs" $tabs }} 22 {{- else }} 23 {{- $c:=""}}{{/* if no containing tabs shortcode is present, we display this tab as single */}} 24 {{- partial "shortcodes/tabs.html" (dict 25 "page" .Page 26 "color" "" 27 "content" $tabs 28 "groupid" "" 29 "icon" "" 30 "style" "" 31 "title" "" 32 ) }} 33 {{- end }}