Alex Dunmow 6c03f6da6c feat(brutalist): Wave A override contract — 49 builtin overrides, 7 templates, seed
WO-TF-012. Neo-brutalist creative-studio theme brought up to the Wave A
OVERRIDE-CONTRACT (frozen against cms a0f07e2ae).

- Override all 49 mandatory builtin keys in templates/overrides/brutalist/
  (chrome, marketing, primitives, commerce, blog family, auth surface, 404),
  each carrying the brutalist chrome (chunky borders, hard offset shadows,
  hover snap, mono uppercase meta, candy accents) via a raw-CSS "bru-*" kit
  shipped in manifest.yaml. Load-bearing wiring (HTMX auth endpoints, signup
  form, contact-form submit + honeypot, facade scripts, lightbox) preserved
  verbatim.
- 7 page templates: default, full-width, landing, article, blog-index,
  contact, auth (fixed a bug where templates omitted the `dark` class so dark
  presets never activated).
- Blocks rework: removed 6 blocks that duplicated builtins (masthead,
  concrete_hero, meta_strip, caption_image, pull_quote, colophon) — now
  overrides; kept project_ledger; added persona blocks sticker_wall,
  changelog, spec_sheet (4 total).
- 4 dual-mode presets (all mode "both", 19 tokens light + dark): Concrete &
  Cadmium, Hazard, Riso, Acid.
- Bundled 8 latin-subset OFL woff2 (Space Grotesk, Archivo Black, Inter, IBM
  Plex Mono) in assets/fonts/ + LICENSES.md; fonts.json populated; all
  font-family via var(--font-*). RECOMMENDED_FONTS/ICONS updated;
  required_icon_packs declared.
- Email-safe themed wrapper (tables, inline styles) cleaned up.
- master_pages.json reworked to builtin navbar/hero/cta/footer.
- Demo seed (seed/seed.json + workflows.json, demo:true): home, about, blog
  (3 posts), contact (form + contact_submissions data table + row_inserted →
  email-admins workflow), login — studio voice.

Known codeless limitation: page-suggestions renders themed 404 chrome but the
similar-pages list (server-side DB query, no template provider) can't be
reproduced; auth-form captcha widget is server-generated and can't be emitted
(seed leaves captchaEnabled=false). Verified: make exit 0; check-safety
exit 0. Visual quality UNVERIFIED until Wave B.

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

34 lines
2.6 KiB
Plaintext

{# brutalist auth-status override — header login state. Logout/resend HTMX endpoints load-bearing. Context: context.isPublicLoggedIn, context.publicDisplayName, context.publicUsername, context.publicEmailVerified. #}
{% if not context.isPublicLoggedIn %}
<div class="auth-status flex items-center gap-2">
<a href="/login" class="bru-meta px-3 py-1.5 text-foreground hover:text-accent transition-colors">Login</a>
<a href="/login?tab=register" class="bru-btn bru-btn-solid" style="padding:0.4rem 0.9rem">Sign Up</a>
</div>
{% else %}
{% set displayName = context.publicDisplayName|default:context.publicUsername %}
{% if not context.publicEmailVerified %}<div class="fixed top-16 inset-x-0 z-40 text-center bru-meta" style="background:hsl(var(--accent));color:hsl(var(--accent-foreground));border-bottom:3px solid hsl(var(--border));padding:0.5rem 1rem">Please verify your email address. <button hx-post="/api/auth/resend-verification" hx-swap="outerHTML" class="underline">Resend verification email</button></div>{% endif %}
<div class="auth-status relative">
<button type="button" onclick="this.nextElementSibling.classList.toggle('hidden')" class="flex items-center gap-2 bru-meta px-3 py-1.5 text-foreground hover:text-accent transition-colors">
<span class="inline-flex items-center justify-center w-7 h-7 text-xs" style="background:hsl(var(--accent));color:hsl(var(--accent-foreground));border:2px solid hsl(var(--border));font-family:var(--font-heading,sans-serif);font-weight:700">{{ displayName|first }}</span>
<span>{{ displayName }}</span>
<svg class="w-3 h-3" aria-hidden="true"><use href="/icons/lucide.svg#chevron-down"></use></svg>
</button>
<div id="auth-dropdown-menu" class="hidden absolute right-0 top-full mt-2 w-48 bru-slab bru-shadow py-1 z-50">
<a href="/account" class="block px-4 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground">My Profile</a>
<a href="/account/reviews" class="block px-4 py-2 text-sm text-foreground hover:bg-accent hover:text-accent-foreground">My Reviews</a>
<hr class="my-1 bru-rule-thin">
<button hx-post="/api/auth/logout" hx-swap="none" class="block w-full text-left px-4 py-2 text-sm text-destructive hover:bg-accent">Logout</button>
</div>
<script>
(function(){
document.addEventListener('click', function(e) {
var menu = document.getElementById('auth-dropdown-menu');
var btn = document.querySelector('.auth-status > button');
if (!menu || !btn) return;
if (!btn.contains(e.target) && !menu.contains(e.target)) { menu.classList.add('hidden'); }
});
})();
</script>
</div>
{% endif %}