feat: add logout buttons to admin and manage navigation bars
This commit is contained in:
parent
7c9e426bb8
commit
db94294d6d
3 changed files with 20 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
|
|
@ -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 %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue