check / check (push) Waiting to run
Many controls were plain coloured text with no sign they could be clicked: Edit, Activate, Deactivate, Delete, Replay, Resubmit, both Add controls and the copy control beside each entrypoint URL. Every clickable control is now a real button or link in one of two shared styles: the buttons in input.css, now with a pointer cursor, and btn-small, a small bordered secondary action in style.css, which the layout now loads. The site name, the footer links and each webhook list card show at rest that they open something, with focus states. The copy control shows "Copied" after a click. Rows on the webhook page and in the event log wrap at phone width. The browser test covers the copy control. Model: opus-5-5
60 lines
2.7 KiB
HTML
60 lines
2.7 KiB
HTML
{{define "navbar"}}
|
|
<nav class="app-bar" x-data="collapsible">
|
|
<div class="max-w-6xl mx-auto flex justify-between items-center">
|
|
<div class="flex items-center gap-3">
|
|
<a href="/" class="btn-secondary text-xl">Webhooker</a>
|
|
</div>
|
|
|
|
<!-- Mobile menu button -->
|
|
{{if .User}}
|
|
<button type="button" @click="toggle" class="btn-secondary md:hidden p-2">
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path x-show="closed" 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>
|
|
{{end}}
|
|
|
|
<!-- Desktop navigation -->
|
|
<div class="hidden md:flex items-center gap-4">
|
|
{{if .User}}
|
|
<a href="/hooks" class="btn-secondary">Webhooks</a>
|
|
<a href="/settings" class="btn-secondary">Settings</a>
|
|
<a href="/user/{{.User.Username}}" class="btn-secondary">
|
|
<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>
|
|
{{/* An error page can be served before a form token is issued,
|
|
and a logout without one is refused. */}}
|
|
{{if .CSRFToken}}
|
|
<form method="POST" action="/pages/logout" class="inline">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<button type="submit" class="btn-secondary">Logout</button>
|
|
</form>
|
|
{{end}}
|
|
{{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="/hooks" class="btn-secondary w-full">Webhooks</a>
|
|
<a href="/settings" class="btn-secondary w-full">Settings</a>
|
|
<a href="/user/{{.User.Username}}" class="btn-secondary w-full">Profile</a>
|
|
{{if .CSRFToken}}
|
|
<form method="POST" action="/pages/logout">
|
|
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
|
<button type="submit" class="btn-secondary w-full">Logout</button>
|
|
</form>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
{{end}}
|