Alex Dunmow a66113fce0 feat(editorial): Wave A theme lane (WO-TF-017) — personal essayist
Deliver the full Wave A contract for the editorial theme (personal
essayist / independent newsletter persona).

- 49 mandatory builtin overrides in templates/overrides/editorial/,
  re-skinned from the frozen builtins: hairline rules, small-caps labels,
  drop caps, narrow reading measure, oxblood accent. All content fields,
  provider fields, custom tags ({% img %}/{% form %}/{% signup_form %}),
  hx wiring, navbar drawer JS and auth/contact form wiring preserved
  verbatim; legacy button/card field reads reconciled (link/style/label,
  media/text).
- 7 page templates (default, full-width, landing, article, blog-index,
  contact, auth); article is the reading centrepiece with drop-cap opener,
  marginalia rail and a CSS-only reading-progress underline. All set the
  html.dark class and route body font through var(--font-body).
- Block rework: masthead/byline/pullquote/section_label/colophon deleted
  (now overrides of navbar/post-metadata/quote/divider/footer). Persona
  blocks: dropcap_intro, marginalia, reading_list, field_notes.
- 4 presets, all mode "both", book-paper light + sepia-on-charcoal dark.
- Bundled Playfair Display + Source Serif 4 (OFL, latin subset) in
  assets/fonts with license record; fonts.json populated; every
  font-family via var(--font-heading|body|mono, fallback).
- Themed email-safe wrapper (tables, inline styles, literal fonts).
- Master pages + seed demo site (home, about, blog with 3 essays,
  contact with form + data table + row_inserted email-admins workflow,
  login) in essayist voice.
- required_icon_packs=["lucide"]; RECOMMENDED_FONTS/ICONS updated.

Motion tier: CSS-first (progress underline, marginalia fade-in;
prefers-reduced-motion honored). Verified: make + ninja plugin verify +
check-safety all exit 0. Visual quality UNVERIFIED until Wave B.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 11:22:07 +08:00

34 lines
3.9 KiB
Plaintext

{# auth-form (editorial) — typographic login/register in an editorial-panel with small-caps labels, hairline tab rules and oxblood active tab. Wiring UNTOUCHABLE: single shared #auth-message, /api/auth/login (email,password) and /api/auth/register (username,email,password), hx-target #auth-message, captcha injected from _captcha_widget. #}
{% if context.isPublicLoggedIn %}
<div data-block-override="editorial:auth-form" class="auth-form-logged-in mx-auto max-w-md text-center py-8">
<p class="italic" style="color:hsl(var(--muted-foreground));font-family:var(--font-body, 'Source Serif 4', 'Source Serif Pro', Georgia, serif);">You are signed in as <strong style="color:hsl(var(--foreground));">{{ context.publicUsername }}</strong></p>
<a href="/account" class="editorial-link mt-3 inline-block">My account</a>
</div>
{% else %}
<div data-block-override="editorial:auth-form" class="auth-form editorial-panel mx-auto max-w-md bg-card p-8">
<div id="auth-message"></div>
<div class="mb-6 flex border-b border-[hsl(var(--border))]">
<button type="button" onclick="document.getElementById('login-panel').classList.remove('hidden');document.getElementById('register-panel').classList.add('hidden');this.setAttribute('data-active','1');this.nextElementSibling.removeAttribute('data-active');" data-auth-tab {% if default_tab != "register" %}data-active="1"{% endif %} class="editorial-caps flex-1 py-2 text-center text-xs border-b-2 border-transparent data-[active]:border-[hsl(var(--accent))] data-[active]:text-[hsl(var(--accent))]">Sign in</button>
<button type="button" onclick="document.getElementById('register-panel').classList.remove('hidden');document.getElementById('login-panel').classList.add('hidden');this.setAttribute('data-active','1');this.previousElementSibling.removeAttribute('data-active');" data-auth-tab {% if default_tab == "register" %}data-active="1"{% endif %} class="editorial-caps flex-1 py-2 text-center text-xs border-b-2 border-transparent data-[active]:border-[hsl(var(--accent))] data-[active]:text-[hsl(var(--accent))]">Register</button>
</div>
<div id="login-panel" class="{% if default_tab == "register" %}hidden{% endif %}">
<form hx-post="/api/auth/login" hx-target="#auth-message" hx-swap="innerHTML">
<div class="mb-3"><label class="editorial-caps text-muted-foreground block text-xs mb-1">Email</label><input type="email" name="email" required class="w-full editorial-input" /></div>
<div class="mb-4"><label class="editorial-caps text-muted-foreground block text-xs mb-1">Password</label><input type="password" name="password" required class="w-full editorial-input" /></div>
{% if _captcha_widget %}{{ _captcha_widget|safe }}{% endif %}
<button type="submit" class="editorial-button w-full" hx-disabled-elt="this">Sign in</button>
<p class="text-center mt-3 text-sm"><a href="/forgot-password" class="editorial-link">Forgot password?</a></p>
</form>
</div>
<div id="register-panel" class="{% if default_tab != "register" %}hidden{% endif %}">
<form hx-post="/api/auth/register" hx-target="#auth-message" hx-swap="innerHTML">
<div class="mb-3"><label class="editorial-caps text-muted-foreground block text-xs mb-1">Username</label><input type="text" name="username" required pattern="[a-zA-Z0-9_-]{3,30}" class="w-full editorial-input" /></div>
<div class="mb-3"><label class="editorial-caps text-muted-foreground block text-xs mb-1">Email</label><input type="email" name="email" required class="w-full editorial-input" /></div>
<div class="mb-4"><label class="editorial-caps text-muted-foreground block text-xs mb-1">Password</label><input type="password" name="password" required minlength="8" class="w-full editorial-input" /></div>
{% if _captcha_widget %}{{ _captcha_widget|safe }}{% endif %}
<button type="submit" class="editorial-button w-full" hx-disabled-elt="this">Create account</button>
</form>
</div>
</div>
{% endif %}