.wordmark-project was Manrope 500 — visually a sans-serif label next to a serif-italic gradient noun. Switches to Newsreader 400 so the wordmark reads as one continuous editorial mark, with the italic + gradient on 'Bifrost' doing the visual lift instead of a family contrast. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
302 lines
8.3 KiB
Text
302 lines
8.3 KiB
Text
---
|
|
import BaseLayout from './BaseLayout.astro';
|
|
import type { UserPublic } from '../lib/db';
|
|
|
|
interface Props {
|
|
title: string;
|
|
user: UserPublic;
|
|
}
|
|
|
|
const { title, user } = Astro.props;
|
|
|
|
const navLinks = [
|
|
{ href: '/pulse', label: 'Pulse' },
|
|
{ href: '/roadmap', label: 'Roadmap' },
|
|
];
|
|
|
|
const footerLinks = [
|
|
{ href: '/vision', label: 'Vision' },
|
|
];
|
|
|
|
const currentPath = Astro.url.pathname;
|
|
const year = new Date().getFullYear();
|
|
---
|
|
<BaseLayout title={title}>
|
|
<div class="app">
|
|
<header class="nav" role="banner">
|
|
<div class="nav-inner">
|
|
<a href="/" class="wordmark-link" aria-label="Project Bifrost — home">
|
|
<img src="/logo.svg" alt="Fenja AI" class="wordmark" />
|
|
<span class="wordmark-sep" aria-hidden="true">·</span>
|
|
<span class="wordmark-project">Project <em class="wordmark-bifrost">Bifrost</em></span>
|
|
</a>
|
|
|
|
<nav class="nav-right" aria-label="Main navigation">
|
|
{navLinks.map(({ href, label }) => (
|
|
<a
|
|
href={href}
|
|
class:list={['nav-link', { active: currentPath === href || (href !== '/' && currentPath.startsWith(href)) }]}
|
|
>
|
|
{label}
|
|
</a>
|
|
))}
|
|
{user.role === 'fenja' && (
|
|
<a
|
|
href="/admin"
|
|
class:list={['nav-link', { active: currentPath.startsWith('/admin') }]}
|
|
>
|
|
Admin
|
|
</a>
|
|
)}
|
|
<span class="nav-divider" aria-hidden="true"></span>
|
|
<a href="/account" class="nav-user-name body-sm">{user.name}</a>
|
|
<form method="POST" action="/api/logout" class="nav-logout-form">
|
|
<button type="submit" class="logout-btn label-sm">Sign out</button>
|
|
</form>
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
|
|
<main class="main-content">
|
|
<slot />
|
|
</main>
|
|
|
|
<footer class="footer" role="contentinfo">
|
|
<div class="footer-inner">
|
|
<div class="footer-left">
|
|
<img src="/logo-icon.svg" alt="" class="footer-mark" />
|
|
<span class="footer-copy label-sm">© {year} Fenja AI</span>
|
|
</div>
|
|
<nav class="footer-links" aria-label="Secondary">
|
|
{footerLinks.map(({ href, label }) => (
|
|
<a href={href} class="footer-link label-sm">{label}</a>
|
|
))}
|
|
</nav>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</BaseLayout>
|
|
|
|
<style>
|
|
.app {
|
|
min-height: 100vh;
|
|
background: var(--background);
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* ── Nav ────────────────────────────────────────────────────────── */
|
|
.nav {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
background: var(--glass-surface);
|
|
backdrop-filter: var(--glass-blur);
|
|
-webkit-backdrop-filter: var(--glass-blur);
|
|
border-bottom: var(--ghost-border);
|
|
}
|
|
|
|
.nav-inner {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-6);
|
|
padding: 0 var(--space-10);
|
|
height: 56px;
|
|
max-width: var(--content-max);
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.wordmark-link {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
border-bottom: none;
|
|
color: var(--on-surface);
|
|
}
|
|
.wordmark-link:hover {
|
|
border-bottom: none;
|
|
color: var(--on-surface);
|
|
}
|
|
.wordmark {
|
|
height: 22px;
|
|
width: auto;
|
|
display: block;
|
|
}
|
|
.wordmark-sep {
|
|
color: var(--on-surface-muted);
|
|
font-size: 1rem;
|
|
line-height: 1;
|
|
}
|
|
.wordmark-project {
|
|
font-family: var(--font-serif);
|
|
font-size: var(--text-body-md);
|
|
font-weight: 400;
|
|
color: var(--on-surface);
|
|
letter-spacing: 0;
|
|
}
|
|
.wordmark-bifrost {
|
|
font-family: var(--font-serif);
|
|
font-style: italic;
|
|
font-weight: 400;
|
|
background-image: linear-gradient(
|
|
90deg,
|
|
var(--pigment-terracotta) 0%,
|
|
var(--pigment-ochre) 28%,
|
|
var(--pigment-copper) 54%,
|
|
var(--pigment-indigo) 78%,
|
|
var(--pigment-heather) 100%
|
|
);
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
color: transparent;
|
|
}
|
|
|
|
/* ── Nav links ──────────────────────────────────────────────────── */
|
|
.nav-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-1);
|
|
margin-left: auto;
|
|
}
|
|
.nav-divider {
|
|
display: inline-block;
|
|
width: 1px;
|
|
height: 18px;
|
|
background: rgba(0, 0, 0, 0.15);
|
|
margin: 0 18px;
|
|
transform: scaleX(0.5);
|
|
transform-origin: center;
|
|
}
|
|
.nav-logout-form { display: inline-flex; }
|
|
|
|
.nav-link {
|
|
position: relative;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-label-md);
|
|
font-weight: 500;
|
|
letter-spacing: var(--tracking-wide);
|
|
text-transform: uppercase;
|
|
color: var(--on-surface-variant);
|
|
text-decoration: none;
|
|
padding: var(--space-2) var(--space-3);
|
|
border-radius: var(--radius-sm);
|
|
border-bottom: none;
|
|
transition: color var(--duration-fast) var(--ease-standard);
|
|
}
|
|
.nav-link:hover {
|
|
color: var(--on-surface);
|
|
border-bottom: none;
|
|
}
|
|
/* Active nav link: terracotta color + a serif italic "·" bracket. The
|
|
prefix dot acts as a 'you are here' marker without floating below
|
|
the link the way the previous indicator did. Switching from sans
|
|
uppercase to terracotta serif italic also doubles as a typography
|
|
cue, so the active state reads even before colour processes. */
|
|
.nav-link.active {
|
|
color: var(--pigment-terracotta);
|
|
font-family: var(--font-serif);
|
|
font-style: italic;
|
|
font-weight: 400;
|
|
letter-spacing: var(--tracking-snug);
|
|
text-transform: none;
|
|
font-size: 15px;
|
|
}
|
|
.nav-link.active::before {
|
|
content: '·';
|
|
margin-right: 6px;
|
|
color: var(--pigment-terracotta);
|
|
}
|
|
|
|
/* ── User zone ──────────────────────────────────────────────────── */
|
|
.nav-user-name {
|
|
color: var(--on-surface-variant);
|
|
text-decoration: none;
|
|
border-bottom: none;
|
|
transition: color var(--duration-fast) var(--ease-standard);
|
|
}
|
|
.nav-user-name:hover {
|
|
color: var(--on-surface);
|
|
border-bottom: none;
|
|
}
|
|
|
|
.logout-btn {
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
font-family: var(--font-sans);
|
|
font-size: var(--text-label-md);
|
|
letter-spacing: var(--tracking-wide);
|
|
text-transform: uppercase;
|
|
color: var(--on-surface-muted);
|
|
padding: var(--space-2) var(--space-3);
|
|
border-radius: var(--radius-sm);
|
|
transition: color var(--duration-fast) var(--ease-standard),
|
|
background var(--duration-fast) var(--ease-standard);
|
|
}
|
|
.logout-btn:hover {
|
|
color: var(--on-surface);
|
|
background: var(--surface-container-low);
|
|
}
|
|
|
|
/* ── Content ────────────────────────────────────────────────────── */
|
|
.main-content {
|
|
flex: 1;
|
|
}
|
|
|
|
/* ── Footer ─────────────────────────────────────────────────────── */
|
|
.footer {
|
|
margin-top: var(--space-16);
|
|
padding: var(--space-6) 0;
|
|
border-top: var(--ghost-border);
|
|
}
|
|
|
|
.footer-inner {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-6);
|
|
padding: 0 var(--space-10);
|
|
max-width: var(--content-max);
|
|
margin: 0 auto;
|
|
width: 100%;
|
|
}
|
|
|
|
.footer-left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.footer-mark {
|
|
height: 16px;
|
|
width: auto;
|
|
display: block;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.footer-copy {
|
|
color: var(--on-surface-muted);
|
|
letter-spacing: var(--tracking-wide);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.footer-links {
|
|
display: flex;
|
|
gap: var(--space-5);
|
|
}
|
|
|
|
.footer-link {
|
|
color: var(--on-surface-muted);
|
|
text-decoration: none;
|
|
border-bottom: none;
|
|
letter-spacing: var(--tracking-wide);
|
|
text-transform: uppercase;
|
|
transition: color var(--duration-fast) var(--ease-standard);
|
|
}
|
|
.footer-link:hover {
|
|
color: var(--on-surface-variant);
|
|
border-bottom: none;
|
|
}
|
|
</style>
|