feat: add logout buttons to admin and manage navigation bars

This commit is contained in:
Johan Lundberg 2026-02-20 15:41:45 +01:00
parent 7c9e426bb8
commit db94294d6d
No known key found for this signature in database
GPG key ID: A6C152738D03C7D1
3 changed files with 20 additions and 0 deletions

View file

@ -146,6 +146,24 @@ main {
border-bottom-color: var(--accent);
}
.nav-logout {
margin-left: auto;
background: none;
border: none;
color: var(--fg-muted);
font: inherit;
font-weight: 500;
font-size: var(--font-size-sm);
cursor: pointer;
padding: 0;
padding-bottom: var(--sp-3);
transition: color 0.15s ease;
}
.nav-logout:hover {
color: var(--fg);
}
/* ---------- Admin ---------- */
.admin-nav {

View file

@ -4,6 +4,7 @@
<nav class="admin-nav" aria-label="Administration">
<span class="admin-badge">Admin</span>
<a href="/admin/users" {% if active_page == "users" %}aria-current="page"{% endif %}>Users</a>
<button class="nav-logout" hx-post="/logout">Log out</button>
</nav>
{% block admin_content %}{% endblock %}
{% endblock %}

View file

@ -5,6 +5,7 @@
<a href="/manage/profile" {% if active_page == "profile" %}aria-current="page"{% endif %}>Profile</a>
<a href="/manage/credentials" {% if active_page == "credentials" %}aria-current="page"{% endif %}>Credentials</a>
{% if is_admin %}<a href="/admin/users">Admin</a>{% endif %}
<button class="nav-logout" hx-post="/logout">Log out</button>
</nav>
{% block manage_content %}{% endblock %}
{% endblock %}