From ad1a1d83aa9cfa042b06e321be700ba31a64ded9 Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Sun, 5 Jul 2026 17:52:46 +0800 Subject: [PATCH] fix(earthen): repair blank hero (.text hard-error) + trim section whitespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hero blank-band bug (root cause): - The hero override read styled-text fields as `field.text|default:field` (eyebrow/headline/subheadline/description). The ninjatpl engine hard-errors on attribute-access-against-a-bare-string, and the demo seed passes these fields as bare strings, so the whole hero errored and rendered as an empty ~75vh band on the landing page. Switched to `field|get:"text"|default:field` — the process-global `get` filter degrades gracefully on a bare string (returns nothing, so `|default:` falls back to the string) and still reads `.text` from the admin/editor `{text,color}` object form. Matches the fixed sibling lanes (terminal, scifi-clean). navbar `cta.text` left as-is: that field is always a link object, never a bare string (terminal did the same). Whitespace pass: - Trimmed oversized marketing section padding py-16 md:py-24 -> py-12 md:py-20 across 15 blocks (cta, feature-grid, pricing, stats, team, testimonial, timeline, faq, countdown, rich-section, contact-card, contact-form, event-list, menu-list, hours-location) to remove dead inter-section bands. Tailwind classes only — the host Tailwind build now scans theme .ninjatpl, so responsive utilities compile; no duplicate hand-rolled media-query CSS added. No new CSS (earthen's manifest CSS is all bespoke aesthetic — nothing duplicated a utility). No scroll-reveal system exists to harden; the stats count-up already no-ops under reduced-motion / no-JS and renders final values. Codeless build OK (earthen@0.2.1). check-safety: 32 checks 19 ok 13 skip -> OK. No version bump. Co-Authored-By: Claude Opus 4.8 --- templates/overrides/earthen/contact-card.ninjatpl | 2 +- templates/overrides/earthen/contact-form.ninjatpl | 2 +- templates/overrides/earthen/countdown.ninjatpl | 2 +- templates/overrides/earthen/cta.ninjatpl | 2 +- templates/overrides/earthen/event-list.ninjatpl | 2 +- templates/overrides/earthen/faq.ninjatpl | 2 +- templates/overrides/earthen/feature-grid.ninjatpl | 2 +- templates/overrides/earthen/hero.ninjatpl | 8 ++++---- templates/overrides/earthen/hours-location.ninjatpl | 2 +- templates/overrides/earthen/menu-list.ninjatpl | 2 +- templates/overrides/earthen/pricing.ninjatpl | 2 +- templates/overrides/earthen/rich-section.ninjatpl | 2 +- templates/overrides/earthen/stats.ninjatpl | 2 +- templates/overrides/earthen/team.ninjatpl | 2 +- templates/overrides/earthen/testimonial.ninjatpl | 2 +- templates/overrides/earthen/timeline.ninjatpl | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/templates/overrides/earthen/contact-card.ninjatpl b/templates/overrides/earthen/contact-card.ninjatpl index fa48718..49d0f3f 100644 --- a/templates/overrides/earthen/contact-card.ninjatpl +++ b/templates/overrides/earthen/contact-card.ninjatpl @@ -1,5 +1,5 @@ {# contact-card override — cream contact tiles with moss icon chips. Fields mirror builtin: heading, description, columns, channels[].icon/.label/.value/.link. Icons via sprite . Wiring preserved. #} -
+
{% if heading %}

{{ heading }}

{% endif %} {% if description %}

{{ description }}

{% endif %} diff --git a/templates/overrides/earthen/contact-form.ninjatpl b/templates/overrides/earthen/contact-form.ninjatpl index c7fb566..858abe2 100644 --- a/templates/overrides/earthen/contact-form.ninjatpl +++ b/templates/overrides/earthen/contact-form.ninjatpl @@ -1,6 +1,6 @@ {# contact-form override — SEED-CRITICAL. ALL form wiring preserved verbatim from builtin: bid, {% form %} action/hx attrs, honeypot input name, field loop, form.submitted/errors, submit target. Only inputs restyled and copy reworded to earthen. #} {% with bid=_block_id|default:context.blockId %} -
+
{% if form.submitted %}
diff --git a/templates/overrides/earthen/countdown.ninjatpl b/templates/overrides/earthen/countdown.ninjatpl index 00d4dbc..2926ff6 100644 --- a/templates/overrides/earthen/countdown.ninjatpl +++ b/templates/overrides/earthen/countdown.ninjatpl @@ -1,5 +1,5 @@ {# 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