- hero: read styled-text fields as `field|get:"text"|default:field` so the home hero renders (bare-string seed values were hard-erroring the block to empty output — the "weird af header" root cause; page jumped navbar→audio). - light-mode: add a background-token radial scrim behind the hero headline (lightens the centre in light, darkens in dark) for legible text over the mesh. - seed media: ship 6 licensed stock images; wire 4 as Records cover art (chrome-liquid-metal/holographic-foil/abstract-neon/cassette) + the waveform now-playing cover (neon-rave) + a chrome image on About. - waveform: replace the "No audio source set yet." placeholder with a deliberate "SIDE A // live to tape" mono transport readout. - fonts: @font-face Orbitron/Inter/Share Tech Mono from /templates/y2k/fonts/* + typography refs in all presets (bundled fonts were inert dead code). - article: expand tracking-to-tape to 10 band-journal paragraphs (kills the ~350px blog dead space). - SVG geometry guard: explicit width/height on every sprite <use> icon + replace ::icon:: shortcodes with sized <svg> (Tailwind JIT balloon guard). - capture Wave B screenshots (home/about/article × light+dark, 2880×1800); preview.png = dark home (dark-canonical theme). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
51 lines
4.5 KiB
Plaintext
51 lines
4.5 KiB
Plaintext
{# countdown y2k override: neon HUD digit boxes, glitch heading. Timer script + data attributes preserved byte-for-byte. #}
|
|
<section class="relative overflow-hidden py-16 md:py-24 bg-background text-foreground{% if class %} {{ class }}{% endif %}">
|
|
<div aria-hidden="true" class="scanlines pointer-events-none absolute inset-0"></div>
|
|
<div class="relative z-10 mx-auto max-w-4xl px-4 text-center">
|
|
{% if heading %}<h2 class="y2k-display glitch text-3xl font-semibold tracking-tight md:text-4xl" data-text="{{ heading }}">{{ heading }}</h2>{% endif %}
|
|
{% if intro %}<p class="mx-auto mt-4 max-w-2xl text-lg text-muted-foreground">{{ 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" %}clip-cut min-w-[4.5rem] rounded-md border border-primary/50 bg-card px-3 py-4 text-card-foreground neon-edge-magenta{% endif %}"><span class="y2k-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="days">--</span><span class="y2k-mono mt-1 text-xs font-medium uppercase tracking-widest text-muted-foreground">{{ labelDays|default:"Days" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}clip-cut min-w-[4.5rem] rounded-md border border-primary/50 bg-card px-3 py-4 text-card-foreground neon-edge-magenta{% endif %}"><span class="y2k-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="hours">--</span><span class="y2k-mono mt-1 text-xs font-medium uppercase tracking-widest text-muted-foreground">{{ labelHours|default:"Hours" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}clip-cut min-w-[4.5rem] rounded-md border border-primary/50 bg-card px-3 py-4 text-card-foreground neon-edge-magenta{% endif %}"><span class="y2k-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="minutes">--</span><span class="y2k-mono mt-1 text-xs font-medium uppercase tracking-widest text-muted-foreground">{{ labelMinutes|default:"Minutes" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}clip-cut min-w-[4.5rem] rounded-md border border-primary/50 bg-card px-3 py-4 text-card-foreground neon-edge-magenta{% endif %}"><span class="y2k-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="seconds">--</span><span class="y2k-mono mt-1 text-xs font-medium uppercase tracking-widest text-muted-foreground">{{ labelSeconds|default:"Seconds" }}</span></div>
|
|
</div>
|
|
<div class="mt-8 hidden" data-countdown-expired>
|
|
<p class="y2k-display text-xl font-medium">{{ expiredMessage|default:"This has started." }}</p>
|
|
{% if expiredUrl and expiredLabel %}<a href="{{ expiredUrl }}" class="y2k-mono clip-cut rgb-split mt-4 inline-flex items-center gap-2 rounded-md bg-primary px-5 py-3 font-semibold uppercase tracking-wider text-primary-foreground transition-opacity hover:opacity-90">{{ expiredLabel }}<svg width="16" height="16" class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#arrow-right"></use></svg></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>
|