Monorepo for Tangled tangled.org

align topbar items

Changed files
+13 -14
appview
pages
templates
layouts
+13 -11
appview/pages/templates/layouts/topbar.html
··· 1 {{ define "layouts/topbar" }} 2 {{ $linkstyle := "text-gray-400 hover:text-gray-900 no-underline" }} 3 - <nav class="flex justify-between px-6 space-x-4 mb-4 py-2 border-b border-black"> 4 - <div id="left-items"> 5 - <a href="/" hx-boost="true" class="{{ $linkstyle }} flex gap-2"> 6 - <i class="w-6 h-6" data-lucide="tangent"></i> 7 - tangled.sh 8 - </a> 9 - </div> 10 - <div id="right-items" class="flex gap-2"> 11 - {{ with .LoggedInUser }} 12 <a href="/repo/new" hx-boost="true" class="{{ $linkstyle }}"> 13 <i class="w-6 h-6" data-lucide="plus"></i> 14 </a> ··· 18 <a href="/logout"class="{{ $linkstyle }}"> 19 (logout) 20 </a> 21 - {{ else }} 22 <a href="/login" hx-boost="true" class="{{ $linkstyle }}"> 23 login 24 </a> 25 - {{ end }} 26 </div> 27 </nav> 28 {{ end }}
··· 1 {{ define "layouts/topbar" }} 2 {{ $linkstyle := "text-gray-400 hover:text-gray-900 no-underline" }} 3 + <nav class="space-x-4 mb-4 py-2 border-b border-black"> 4 + <div class="container flex justify-between p-0"> 5 + <div id="left-items"> 6 + <a href="/" hx-boost="true" class="{{ $linkstyle }} flex gap-2"> 7 + <i class="w-6 h-6" data-lucide="tangent"></i> 8 + tangled.sh 9 + </a> 10 + </div> 11 + <div id="right-items" class="flex gap-2"> 12 + {{ with .LoggedInUser }} 13 <a href="/repo/new" hx-boost="true" class="{{ $linkstyle }}"> 14 <i class="w-6 h-6" data-lucide="plus"></i> 15 </a> ··· 19 <a href="/logout"class="{{ $linkstyle }}"> 20 (logout) 21 </a> 22 + {{ else }} 23 <a href="/login" hx-boost="true" class="{{ $linkstyle }}"> 24 login 25 </a> 26 + {{ end }} 27 + </div> 28 </div> 29 </nav> 30 {{ end }}
-3
appview/resolver.go
··· 31 results := make([]*identity.Identity, len(idents)) 32 var wg sync.WaitGroup 33 34 - // Create a channel to handle context cancellation 35 done := make(chan struct{}) 36 defer close(done) 37 38 - // Start a goroutine for each identifier 39 for idx, ident := range idents { 40 wg.Add(1) 41 go func(index int, id string) { ··· 47 case <-done: 48 results[index] = nil 49 default: 50 - // Resolve the identifier - if error, identity will be nil 51 identity, _ := r.ResolveIdent(ctx, id) 52 results[index] = identity 53 }
··· 31 results := make([]*identity.Identity, len(idents)) 32 var wg sync.WaitGroup 33 34 done := make(chan struct{}) 35 defer close(done) 36 37 for idx, ident := range idents { 38 wg.Add(1) 39 go func(index int, id string) { ··· 45 case <-done: 46 results[index] = nil 47 default: 48 identity, _ := r.ResolveIdent(ctx, id) 49 results[index] = identity 50 }