mirror of
https://github.com/ZTatman/myst.git
synced 2026-11-20 20:07:59 +00:00
Full-color brand art (cream + red) is hero/dark-ground only; on light ground the mark is a single-ink stamp that takes its context's text color. This is the one treatment that survives a future ash-and-ember dark mode with zero new assets — currentColor follows --color-foreground on flip. - Add partials/_brand.html: one currentColor Firebreak mark, colored by a text-* utility at each call site. - Header: mark + real-text wordmark in text-foreground (replaces the cold #17191C logo that clashed with the warm page); also fold the inline border style into border-b border-border. - Complete the account-dropdown Alpine migration (same file): wire the panel id/aria-controls, drive the open-state highlight and focus-return through Alpine, drop the <details> cruft, add a transition. - Setup: replace the invisible cream-on-light logo (and its compensating drop-shadow) with the ink mark. - 404: "Outside the break" copy, token-driven watermark at 25%, and a guard so the duplicate detail line no longer renders. - Delete 3 now-unused logo SVGs (black, red, brand). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
160 lines
8 KiB
HTML
160 lines
8 KiB
HTML
{% from "partials/_brand.html" import mark %}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>
|
|
{% block title %}Firebreak{% endblock %}
|
|
</title>
|
|
<link rel="preconnect" href="https://unpkg.com" />
|
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap"
|
|
rel="stylesheet" />
|
|
<link rel="stylesheet" href="/static/css/output.css" />
|
|
<script src="https://unpkg.com/htmx.org@2"></script>
|
|
<script defer
|
|
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
|
|
</head>
|
|
<body class="min-h-dvh flex flex-col bg-background text-sm text-foreground antialiased {% block body_class %}{% endblock %}">
|
|
<header class="sticky top-0 z-50 border-b border-border bg-header text-header-foreground {% block header_class %}{% endblock %}">
|
|
<div class="mx-auto flex w-full max-w-5xl items-center justify-between gap-5 px-4 py-3 sm:px-8">
|
|
<a href="/"
|
|
class="flex shrink-0 items-center gap-2.5 text-foreground"
|
|
aria-label="Firebreak home">
|
|
{{ mark("size-7 shrink-0") }}
|
|
<span class="text-base font-semibold">Firebreak</span>
|
|
</a>
|
|
<nav class="flex min-w-0 flex-1 items-center gap-5"
|
|
aria-label="Primary navigation">
|
|
{% if user %}
|
|
<a href="/dashboard"
|
|
class="btn-link"
|
|
{% if request.url.path == '/dashboard' %}aria-current="page"{% endif %}>Dashboard</a>
|
|
{% endif %}
|
|
</nav>
|
|
<div class="flex shrink-0 items-center">
|
|
{% if user %}
|
|
{% set account_name = user.display_name or user.email or "User" %}
|
|
<!-- Account Dropdown Menu -->
|
|
<div x-data="{
|
|
open: false,
|
|
close() {
|
|
this.open = false
|
|
},
|
|
toggle() {
|
|
this.open = !this.open
|
|
}
|
|
}"
|
|
x-id="['dropdown-menu']"
|
|
@keydown.escape.prevent.stop="close(); $refs.trigger?.focus()"
|
|
@click.outside="close()"
|
|
class="group/account relative"
|
|
>
|
|
<!-- Button -->
|
|
<button
|
|
type="button"
|
|
x-ref="trigger"
|
|
@click="toggle()"
|
|
x-bind:aria-expanded="open"
|
|
x-bind:aria-controls="$id('dropdown-menu')"
|
|
class="group/account-toggle flex cursor-pointer items-center justify-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
|
|
>
|
|
<span class="flex size-11 items-center justify-center rounded-full bg-secondary font-mono text-sm font-semibold text-header-foreground transition-colors group-hover/account-toggle:bg-secondary-hover"
|
|
x-bind:class="{ 'bg-secondary-hover': open }"
|
|
aria-hidden="true">{{ account_name[:1] | upper }}</span>
|
|
<span class="sr-only">Account menu</span>
|
|
</button>
|
|
<!-- Panel -->
|
|
<div
|
|
x-cloak
|
|
x-show="open"
|
|
x-transition.duration.150ms
|
|
x-bind:id="$id('dropdown-menu')"
|
|
class="absolute right-0 top-[calc(100%+0.75rem)] z-50 flex w-[min(20rem,calc(100vw-2rem))] origin-top-right flex-col overflow-hidden rounded-lg border border-border bg-card shadow-elevated"
|
|
>
|
|
<div class="border-b border-border px-4 py-3">
|
|
<p class="truncate text-sm font-semibold text-foreground">{{ account_name }}</p>
|
|
{% if user.email and user.email != account_name %}
|
|
<p class="mt-0.5 truncate text-xs text-muted-foreground">{{ user.email }}</p>
|
|
{% endif %}
|
|
</div>
|
|
<a href="/settings"
|
|
class="flex items-center gap-2.5 border-l-2 border-transparent px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:border-ember hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card aria-[current=page]:border-ember aria-[current=page]:bg-muted aria-[current=page]:text-foreground"
|
|
{% if request.url.path == '/settings' %}aria-current="page"{% endif %}>
|
|
<svg class="status-icon"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
aria-hidden="true">
|
|
<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" />
|
|
<circle cx="12" cy="12" r="3" />
|
|
</svg>
|
|
Settings
|
|
</a>
|
|
<a href="/auth/logout"
|
|
class="flex items-center gap-2.5 border-l-2 border-transparent px-4 py-3 text-sm font-medium text-muted-foreground transition-colors hover:border-ember hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-card aria-[current=page]:border-ember aria-[current=page]:bg-muted aria-[current=page]:text-foreground">
|
|
<svg class="status-icon"
|
|
viewBox="0 0 24 24"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
stroke-width="2"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
aria-hidden="true">
|
|
<path d="m16 17 5-5-5-5" />
|
|
<path d="M21 12H9" />
|
|
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
|
|
</svg>
|
|
Logout
|
|
</a>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<a href="/auth/login/forgejo" class="btn btn-sm btn-primary">
|
|
<img src="/static/img/forgejo-logo.svg"
|
|
alt=""
|
|
width="16"
|
|
height="16"
|
|
class="size-4 shrink-0 brightness-0 invert"
|
|
aria-hidden="true" />
|
|
<span>Sign In with Forgejo</span>
|
|
</a>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</header>
|
|
<main id="main"
|
|
class="{% block main_class %}flex-1 w-full px-4 py-8 mx-auto max-w-5xl sm:px-8{% endblock %}">
|
|
{% block content %}{% endblock %}
|
|
</main>
|
|
{% if debug %}
|
|
<!-- Live reload for CSS changes (development only; gated on the debug flag) -->
|
|
<script>
|
|
let lastCssMtime = null;
|
|
|
|
async function checkForCssChanges() {
|
|
try {
|
|
const response = await fetch('/api/dev/css-mtime');
|
|
const data = await response.json();
|
|
|
|
if (lastCssMtime === null) {
|
|
lastCssMtime = data.mtime;
|
|
} else if (data.mtime > lastCssMtime) {
|
|
lastCssMtime = data.mtime;
|
|
location.reload();
|
|
}
|
|
} catch (err) {
|
|
// Endpoint unavailable — stop polling rather than spamming errors.
|
|
}
|
|
}
|
|
|
|
setInterval(checkForCssChanges, 1000);
|
|
</script>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|