feat: add tabs

This commit is contained in:
ZhenShuo Leo
2025-11-29 11:58:40 +08:00
parent 1be60f89da
commit 20044af981
11 changed files with 441 additions and 0 deletions

View 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>