mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
feat: add tabs
This commit is contained in:
5
layouts/shortcodes/tab.html
Normal file
5
layouts/shortcodes/tab.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- $index := .Parent.Scratch.Get "tab-index" | default 0 -}}
|
||||
{{- .Parent.Scratch.Set "tab-index" (add 1 $index) -}}
|
||||
<div class="tab__panel {{ if eq $index 0 }}tab--active{{ end }}" data-tab-index="{{ $index }}">
|
||||
{{ .InnerDeindent | strings.TrimSpace | .Page.RenderString }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user