← back to NationalPaperHangers
views/partials/header.ejs
34 lines
<header class="site-header">
<div class="header-inner">
<a href="/" class="brand">
<span class="brand-mark">N · P · H</span>
<span class="brand-name">National Paper Hangers</span>
</a>
<% const _navPath = (typeof path === 'string') ? path : ''; %>
<nav class="primary-nav" aria-label="Primary">
<a href="/find" class="<%= _navPath === '/find' ? 'is-current' : '' %>">Find an installer</a>
<a href="/map" class="<%= _navPath === '/map' ? 'is-current' : '' %>">Map</a>
<a href="/papers" class="<%= _navPath.startsWith('/papers') ? 'is-current' : '' %>">Papers</a>
<a href="/measure" class="<%= _navPath === '/measure' ? 'is-current' : '' %>">Measure</a>
<a href="/watch" class="<%= _navPath === '/watch' ? 'is-current' : '' %>">Watch</a>
<a href="/for-installers" class="<%= _navPath === '/for-installers' ? 'is-current' : '' %>">For installers</a>
<a href="/about" class="<%= _navPath === '/about' ? 'is-current' : '' %>">About</a>
</nav>
<div class="header-actions">
<button type="button" class="theme-toggle" aria-label="Toggle theme" data-theme-toggle>
<span class="t-light" aria-hidden="true">☼</span>
<span class="t-dark" aria-hidden="true">☾</span>
</button>
<% /* Bug fix 2026-05-06: was reading `locals.installer`, but on
/installer/:slug routes that variable is the profile being
VIEWED, not the logged-in user. attachInstaller now sets
`currentInstaller` for unambiguous identity. */ %>
<% if (locals.currentInstaller) { %>
<a href="/admin" class="btn btn-ghost">Dashboard</a>
<% } else { %>
<a href="/login" class="btn btn-ghost">Installer login</a>
<% } %>
</div>
</div>
</header>