Changeset 337ec5a in Klonkt


Ignore:
Timestamp:
06/14/2026 03:42:44 PM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
a7e12de
Parents:
4c5169f
Message:

hub: minimal auth nav over the hero on the overview (login back)

The headerless landing had no login access. Now a slim nav over the hero:
logged out -> Login; logged in -> Admin (god/admin) · name · Logout.
No brand title or timeline/grid switcher. Text color adapts (white on
hero image, otherwise ink).

Co-Authored-By: Claude <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/hub-home.ejs

    r4c5169f r337ec5a  
    1 <div class="hub">
     1<div class="hub<%= hub.heroImage ? ' hub--img' : '' %>">
     2
     3  <%# ── Minimale nav (alleen auth) — over de hero, geen brand/switcher ── %>
     4  <nav class="hub-nav">
     5    <div class="hub-nav-inner container">
     6      <% if (user) { %>
     7        <% if (user.role === 'god' || user.role === 'admin') { %>
     8          <a class="hub-nav-link" href="/admin">Beheer</a>
     9        <% } %>
     10        <a class="hub-nav-link" href="/account"><%= user.username %></a>
     11        <a class="hub-nav-link" href="/auth/logout">Uitloggen</a>
     12      <% } else { %>
     13        <a class="hub-nav-link" href="/auth/login">Inloggen</a>
     14      <% } %>
     15    </div>
     16  </nav>
    217
    318  <%# ── HERO (label) — de pagina begint hier, geen header erboven ────── %>
     
    6176
    6277<style>
    63 .hub { width: 100%; }
     78.hub { width: 100%; position: relative; }
     79
     80/* ── Minimale auth-nav (over de hero) ─────────────────────────────── */
     81.hub-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 1rem 0; }
     82.hub-nav-inner { display: flex; justify-content: flex-end; align-items: center; gap: 1.4rem; }
     83.hub-nav-link {
     84  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; opacity: 0.85;
     85}
     86.hub-nav-link:hover { opacity: 1; color: var(--accent); }
     87.hub--img .hub-nav-link { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
     88.hub--img .hub-nav-link:hover { color: #fff; opacity: 1; }
    6489
    6590/* ── Hero ─────────────────────────────────────────────────────────── */
Note: See TracChangeset for help on using the changeset viewer.