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

50 lines
3.7 KiB
Plaintext

{# brutalist countdown override — mono digit slabs, timer script + data hooks kept verbatim. Fields: heading, intro, target, variant, labelDays/Hours/Minutes/Seconds, expiredMessage, expiredUrl, expiredLabel. #}
<section class="bru-section bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="bru-wrap-mid text-center">
{% if heading %}<h2 class="bru-kicker" style="font-size:clamp(1.75rem,4vw,3rem)">{{ heading }}</h2>{% endif %}
{% if intro %}<p class="mx-auto mt-4 text-lg text-muted-foreground" style="max-width:44rem">{{ intro }}</p>{% endif %}
<div class="mt-10" data-countdown>
<div class="flex items-start justify-center gap-3 sm:gap-6" data-countdown-timer data-target="{{ target }}" role="timer" aria-label="Time remaining">
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] bru-slab bru-shadow-sm px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono)" data-unit="days">--</span><span class="bru-meta mt-2 text-muted-foreground">{{ labelDays|default:"Days" }}</span></div>
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] bru-slab bru-shadow-sm px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono)" data-unit="hours">--</span><span class="bru-meta mt-2 text-muted-foreground">{{ labelHours|default:"Hours" }}</span></div>
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] bru-slab bru-shadow-sm px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono)" data-unit="minutes">--</span><span class="bru-meta mt-2 text-muted-foreground">{{ labelMinutes|default:"Minutes" }}</span></div>
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] bru-slab bru-shadow-sm px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono)" data-unit="seconds">--</span><span class="bru-meta mt-2 text-muted-foreground">{{ labelSeconds|default:"Seconds" }}</span></div>
</div>
<div class="mt-8 hidden" data-countdown-expired>
<p class="bru-kicker" style="font-size:1.35rem">{{ expiredMessage|default:"This has started." }}</p>
{% if expiredUrl and expiredLabel %}<a href="{{ expiredUrl }}" class="bru-btn bru-btn-solid mt-4">{{ expiredLabel }} →</a>{% endif %}
</div>
</div>
<noscript><p class="mt-6 text-muted-foreground">Counting down to <time datetime="{{ target }}">{{ target }}</time>.</p></noscript>
</div>
</section>
<script>
(function(){
var timers = document.querySelectorAll('[data-countdown-timer]');
timers.forEach(function(el){
var target = new Date(el.getAttribute('data-target')).getTime();
if (isNaN(target)) return;
var wrap = el.closest('[data-countdown]');
var expired = wrap ? wrap.querySelector('[data-countdown-expired]') : null;
function pad(n){ return (n < 10 ? '0' : '') + n; }
function set(unit, value){ var node = el.querySelector('[data-unit="' + unit + '"]'); if (node) node.textContent = value; }
var interval;
function tick(){
var diff = target - Date.now();
if (diff <= 0){
el.style.display = 'none';
if (expired) expired.classList.remove('hidden');
if (interval) clearInterval(interval);
return;
}
set('days', Math.floor(diff / 86400000));
set('hours', pad(Math.floor(diff % 86400000 / 3600000)));
set('minutes', pad(Math.floor(diff % 3600000 / 60000)));
set('seconds', pad(Math.floor(diff % 60000 / 1000)));
}
tick();
interval = setInterval(tick, 1000);
});
})();
</script>