All checks were successful
check / check (push) Successful in 3m40s
Terminology: the nav labelled its link Sources while every heading said
Webhooks. Both nav links and the sources list page title now say
Webhooks, matching the product name and the database.Webhook model. The
/sources and /source/{id} routes are deliberately unchanged; renaming
them would break existing bookmarks for no gain, since the URL is not
what a user reads.
Profile: the "Settings" column held only placeholder copy promising
settings that would appear later. Password change is the only real
account setting and it already has its own card below, so the column is
removed and the two-column grid collapses to the single remaining one.
Entrypoint URL copy button as progressive enhancement. The button is
rendered with the hidden attribute and a data-copy-target naming the
element that holds the URL. app.js reveals it only after confirming
both a resolvable target and a usable Clipboard API, so a browser
without either shows no dead control, and the URL is plain selectable
text in every case.
Template rendering assertions cover the nav labels, the absence of any
remaining user-visible "Sources", and the button's hidden-by-default
markup, so the copy cannot drift back silently.
Note on the retention copy: it is untouched here. The reaper treats a
non-positive RetentionDays as retain-forever, but on this branch no UI
path can produce one, so copy describing that would be false today. The
work belongs with the change that makes the value reachable.
54 lines
2.6 KiB
HTML
54 lines
2.6 KiB
HTML
{{define "navbar"}}
|
|
<nav class="app-bar" x-data="{ open: false }">
|
|
<div class="max-w-6xl mx-auto flex justify-between items-center">
|
|
<div class="flex items-center gap-3">
|
|
<a href="/" class="text-xl font-medium text-gray-900 hover:text-primary-600 transition-colors">Webhooker</a>
|
|
</div>
|
|
|
|
<!-- Mobile menu button -->
|
|
<button @click="open = !open" class="md:hidden p-2 rounded-md text-gray-500 hover:bg-gray-100">
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path x-show="!open" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
|
|
<path x-show="open" x-cloak stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
</svg>
|
|
</button>
|
|
|
|
<!-- Desktop navigation -->
|
|
<div class="hidden md:flex items-center gap-4">
|
|
{{if .User}}
|
|
<a href="/sources" class="btn-text">Webhooks</a>
|
|
<a href="/user/{{.User.Username}}" class="btn-text">
|
|
<svg class="w-5 h-5 mr-1" fill="currentColor" viewBox="0 0 16 16">
|
|
<path d="M11 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"/>
|
|
<path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8-7a7 7 0 0 0-5.468 11.37C3.242 11.226 4.805 10 8 10s4.757 1.225 5.468 2.37A7 7 0 0 0 8 1z"/>
|
|
</svg>
|
|
{{.User.Username}}
|
|
</a>
|
|
<form method="POST" action="/pages/logout" class="inline">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<button type="submit" class="btn-text">Logout</button>
|
|
</form>
|
|
{{else}}
|
|
<a href="/pages/login" class="btn-primary">Login</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Mobile navigation -->
|
|
<div x-show="open" x-cloak x-transition class="md:hidden mt-4 pt-4 border-t border-gray-200">
|
|
<div class="flex flex-col gap-2">
|
|
{{if .User}}
|
|
<a href="/sources" class="btn-text w-full text-left">Webhooks</a>
|
|
<a href="/user/{{.User.Username}}" class="btn-text w-full text-left">Profile</a>
|
|
<form method="POST" action="/pages/logout">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<button type="submit" class="btn-text w-full text-left">Logout</button>
|
|
</form>
|
|
{{else}}
|
|
<a href="/pages/login" class="btn-primary w-full">Login</a>
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{{end}}
|