repos / starfx

supercharged async flow control library.
git clone https://github.com/neurosnap/starfx.git

starfx / docs / tmpl
Eric Bower · 21 Jun 24

pager.partial.tmpl

 1{{ define "pager" }}
 2<div class="flex justify-between gap-2 my-4">
 3    <div class="pager max-w-half flex items-center">
 4      {{if .Prev}}
 5      <div class="flex flex-col items-start">
 6        <div class="text-sm font-grey-light">&lt;&lt; PREV</div>
 7        <a href="{{.Prev.GenHref}}" class="text-xl link-alt-adj">{{.Prev.Text}}</a>
 8      </div>
 9      {{end}}
10    </div>
11
12    <div class="pager max-w-half flex items-center justify-end">
13      {{if .Next}}
14      <div class="flex flex-col items-end">
15        <div class="text-sm font-grey-light">
16          NEXT &gt;&gt;
17        </div>
18        <a href="{{.Next.GenHref}}" class="text-xl align-right link-alt-adj">{{.Next.Text}}</a>
19      </div>
20      {{end}}
21    </div>
22</div>
23{{end}}