write swarm post part II

This commit is contained in:
2022-02-19 14:00:34 +01:00
parent 7955e5f601
commit 0e1cf89beb
3 changed files with 158 additions and 7 deletions

View File

@ -2,15 +2,14 @@
<nav class="flex p-1 space-x-1 bg-blue-900/20 rounded-md">
{{ $tabTotal := .Get "tabTotal" }}
{{ $tabName := .Scratch.Get "tabName" }}
{{ $tabNameCount := len $tabName }}
{{ range $i, $sequence := (seq $tabTotal) }}
{{ range $i, $sequence := (seq $tabNameCount) }}
<button @click="openTab = {{ $i }}" class="w-full py-2.5 text-sm rounded-md focus:outline-none"
:class="openTab === {{ $i }} ? 'bg-primary-100 dark:bg-primary-900 shadow' : 'hover:bg-white/[0.12] hover:text-white'"
href="#">{{
(replaceRE "(\\s)" "" (index $tabName $i)) }}</button>
href="#">{{ (index $tabName $i) }}</button>
{{ end }}