forked from tangled.org/core
this repo has no description

align topbar items

Changed files
+13 -14
appview
pages
templates
layouts
+13 -11
appview/pages/templates/layouts/topbar.html
···
{{ define "layouts/topbar" }}
{{ $linkstyle := "text-gray-400 hover:text-gray-900 no-underline" }}
-
<nav class="flex justify-between px-6 space-x-4 mb-4 py-2 border-b border-black">
-
<div id="left-items">
-
<a href="/" hx-boost="true" class="{{ $linkstyle }} flex gap-2">
-
<i class="w-6 h-6" data-lucide="tangent"></i>
-
tangled.sh
-
</a>
-
</div>
-
<div id="right-items" class="flex gap-2">
-
{{ with .LoggedInUser }}
+
<nav class="space-x-4 mb-4 py-2 border-b border-black">
+
<div class="container flex justify-between p-0">
+
<div id="left-items">
+
<a href="/" hx-boost="true" class="{{ $linkstyle }} flex gap-2">
+
<i class="w-6 h-6" data-lucide="tangent"></i>
+
tangled.sh
+
</a>
+
</div>
+
<div id="right-items" class="flex gap-2">
+
{{ with .LoggedInUser }}
<a href="/repo/new" hx-boost="true" class="{{ $linkstyle }}">
<i class="w-6 h-6" data-lucide="plus"></i>
</a>
···
<a href="/logout"class="{{ $linkstyle }}">
(logout)
</a>
-
{{ else }}
+
{{ else }}
<a href="/login" hx-boost="true" class="{{ $linkstyle }}">
login
</a>
-
{{ end }}
+
{{ end }}
+
</div>
</div>
</nav>
{{ end }}
-3
appview/resolver.go
···
results := make([]*identity.Identity, len(idents))
var wg sync.WaitGroup
-
// Create a channel to handle context cancellation
done := make(chan struct{})
defer close(done)
-
// Start a goroutine for each identifier
for idx, ident := range idents {
wg.Add(1)
go func(index int, id string) {
···
case <-done:
results[index] = nil
default:
-
// Resolve the identifier - if error, identity will be nil
identity, _ := r.ResolveIdent(ctx, id)
results[index] = identity
}