- seed: real Rootline Trust content — no 'example figures' placeholder copy; home composed as split hero (hands-soil image) + stats + feature-grid + botanical divider + field note + newsletter; About gap filled with fern image + impact report between story and pull-quote; first article expanded to ~10 field-notes paragraphs with inline forest image; 6 Pixabay images seeded via seed/media (id+file+alt) - article.ninjatpl: header slot now full-bleed (was max-w-3xl wrapped — the boxed-header artifact bracketing the nav with vertical rules) - landing.ninjatpl: main slot full-bleed so composed sections span the page - SVG geometry guard: every <use>-icon svg now carries explicit width/height matching its size class (18 files) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
50 lines
4.7 KiB
Plaintext
50 lines
4.7 KiB
Plaintext
{# countdown override — earthen: paper ground, soft botanical unit boxes, terracotta digits. Field reads, every data-countdown/data-countdown-timer/data-target/data-unit/data-countdown-expired hook, the <noscript> fallback and the entire tick <script> preserved verbatim from the builtin; only classes/style/fonts reskinned. #}
|
|
<section data-block-override="earthen:countdown" class="py-12 md:py-20 bg-paper-grain text-foreground{% if class %} {{ class }}{% endif %}">
|
|
<div class="mx-auto max-w-4xl px-4 text-center">
|
|
{% if heading %}<h2 class="text-3xl md:text-4xl font-semibold tracking-tight" style="font-family:var(--font-heading, 'Fraunces', 'Playfair Display', Georgia, serif);color:hsl(var(--primary))">{{ heading }}</h2>{% endif %}
|
|
{% if intro %}<p class="mx-auto mt-4 max-w-2xl text-lg text-muted-foreground" style="font-family:var(--font-body, 'Work Sans', ui-sans-serif, system-ui, sans-serif)">{{ 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" %}earthen-panel earthen-blob-soft min-w-[4.5rem] px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);color:hsl(var(--accent));" data-unit="days">--</span><span class="mt-1 text-xs uppercase tracking-wider text-muted-foreground">{{ labelDays|default:"Days" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}earthen-panel earthen-blob-soft min-w-[4.5rem] px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);color:hsl(var(--accent));" data-unit="hours">--</span><span class="mt-1 text-xs uppercase tracking-wider text-muted-foreground">{{ labelHours|default:"Hours" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}earthen-panel earthen-blob-soft min-w-[4.5rem] px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);color:hsl(var(--accent));" data-unit="minutes">--</span><span class="mt-1 text-xs uppercase tracking-wider text-muted-foreground">{{ labelMinutes|default:"Minutes" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}earthen-panel earthen-blob-soft min-w-[4.5rem] px-3 py-4{% endif %}"><span class="text-4xl font-bold tabular-nums sm:text-5xl" style="font-family:var(--font-mono, 'JetBrains Mono', ui-monospace, monospace);color:hsl(var(--accent));" data-unit="seconds">--</span><span class="mt-1 text-xs uppercase tracking-wider text-muted-foreground">{{ labelSeconds|default:"Seconds" }}</span></div>
|
|
</div>
|
|
<div class="mt-8 hidden" data-countdown-expired>
|
|
<p class="text-xl font-semibold" style="font-family:var(--font-heading, 'Fraunces', 'Playfair Display', Georgia, serif)">{{ expiredMessage|default:"This has started." }}</p>
|
|
{% if expiredUrl and expiredLabel %}<a href="{{ expiredUrl }}" class="earthen-cta mt-4 inline-flex items-center gap-2 px-5 py-3 font-semibold">{{ 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>
|