Deliver the full conservation-nonprofit theme per OVERRIDE-CONTRACT (Wave A).
- 49 mandatory builtin overrides in templates/overrides/earthen/ (chrome,
marketing, primitives, commerce, blog family, auth surface, page-suggestions),
re-skinned from the frozen builtins into botanical/paper-grain chrome with
all content fields, custom tags, provider vars, HTMX/auth wiring and JS
preserved verbatim. Stale button/card/image/text/heading overrides fixed to
the new field contract (link/style/label, media/text via {% img %}).
- 7 page templates: default, full-width, landing, article, blog-index, contact,
auth.
- Blocks rework: impact_metrics/partner_logos/botanical_divider/footer converted
to builtin overrides (deleted as theme blocks); donation_cta and field_note
kept; impact_report added. Persona blocks now 3.
- 5 presets (all 19 tokens; mossbed/sage-morning/ember-loam are dual-mode).
- Bundled Fraunces + Work Sans woff2 (OFL) in assets/fonts/; fonts.json,
RECOMMENDED_FONTS.md, RECOMMENDED_ICONS.md; required_icon_packs=[lucide].
- Seed: home/about/blog(3 posts)/contact/login as Rootline Trust, contact-form
formConfig.targetTable=contact_submissions + row_inserted email-admins workflow.
- Themed email-safe wrapper; on-theme master pages; CSS-first botanical motion.
Verified: make (build) exit 0, make archive-check exit 0, check-safety exit 0.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
51 lines
3.6 KiB
Plaintext
51 lines
3.6 KiB
Plaintext
{# stats override — earthen: big terracotta numbers with a botanical fern flourish (impact-metrics DNA). Field reads, columns control flow, countUp data-stats/data-countup-value hooks and the entire count-up <script> preserved verbatim from the builtin; only classes/style/fonts reskinned. #}
|
|
<section data-block-override="earthen:stats" class="py-16 md:py-24 bg-paper-grain text-foreground{% if class %} {{ class }}{% endif %}"{% if countUp %} data-stats{% endif %}>
|
|
<div class="mx-auto max-w-6xl px-4">
|
|
{% if heading %}<h2 class="text-center text-3xl md:text-4xl font-semibold" 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-center 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-8 flex justify-center" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="48" height="48" class="earthen-glyph" style="color:hsl(var(--primary));" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M24 44V8"></path><path d="M24 12c-4-2-7-2-9 0M24 12c4-2 7-2 9 0"></path><path d="M24 18c-6-2-10-1-12 1M24 18c6-2 10-1 12 1"></path><path d="M24 25c-7-1-12 0-14 3M24 25c7-1 12 0 14 3"></path><path d="M24 33c-7 0-11 2-12 5M24 33c7 0 11 2 12 5"></path></svg></div>
|
|
<dl class="mt-8 grid grid-cols-2 gap-8 {% if columns == 2 %}md:grid-cols-2{% elif columns == 3 %}md:grid-cols-3{% else %}md:grid-cols-4{% endif %}">
|
|
{% for item in items %}
|
|
<div class="px-2 text-center">
|
|
<dd class="text-4xl md:text-5xl font-semibold tracking-tight" style="font-family:var(--font-heading, 'Fraunces', 'Playfair Display', Georgia, serif);color:hsl(var(--accent))">{% if item.prefix %}{{ item.prefix }}{% endif %}<span{% if countUp %} data-countup-value="{{ item.value }}"{% endif %}>{{ item.value }}</span>{% if item.suffix %}{{ item.suffix }}{% endif %}</dd>
|
|
{% if item.label %}<dt class="mt-2 text-xs uppercase tracking-wider text-muted-foreground" style="font-family:var(--font-body, 'Work Sans', ui-sans-serif, system-ui, sans-serif)">{{ item.label }}</dt>{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</dl>
|
|
</div>
|
|
</section>
|
|
{% if countUp %}<script>
|
|
(function(){
|
|
var sections = document.querySelectorAll('[data-stats]');
|
|
var reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
function animate(section){
|
|
var nodes = section.querySelectorAll('[data-countup-value]');
|
|
nodes.forEach(function(node){
|
|
var raw = node.getAttribute('data-countup-value') || '';
|
|
var target = parseFloat(raw.replace(/[^0-9.\-]/g, ''));
|
|
if (isNaN(target)) return;
|
|
var decimals = (raw.split('.')[1] || '').length;
|
|
var start = null, dur = 1200;
|
|
function step(ts){
|
|
if (start === null) start = ts;
|
|
var p = Math.min((ts - start) / dur, 1);
|
|
var eased = 1 - Math.pow(1 - p, 3);
|
|
node.textContent = (target * eased).toFixed(decimals);
|
|
if (p < 1) requestAnimationFrame(step);
|
|
else node.textContent = target.toFixed(decimals);
|
|
}
|
|
requestAnimationFrame(step);
|
|
});
|
|
}
|
|
sections.forEach(function(section){
|
|
if (reduce || !('IntersectionObserver' in window)) return;
|
|
var io = new IntersectionObserver(function(entries){
|
|
entries.forEach(function(e){
|
|
if (e.isIntersecting){ animate(section); io.disconnect(); }
|
|
});
|
|
}, { threshold: 0.3 });
|
|
io.observe(section);
|
|
});
|
|
})();
|
|
</script>{% endif %}
|