Alex Dunmow ad1a1d83aa fix(earthen): repair blank hero (.text hard-error) + trim section whitespace
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 <noreply@anthropic.com>
2026-07-05 17:52:46 +08:00

31 lines
3.4 KiB
Plaintext

{# menu-list override — a field-kitchen menu card: Fraunces section titles, dotted leader rules, terracotta prices. Fields mirror builtin: heading, intro, columns, sections[].title/.note/.items[].name/.badges/.description/.price, currency, footnote. #}
<section data-block-override="earthen:menu-list" class="py-12 md:py-20 bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="mx-auto max-w-5xl px-4 text-center">
{% if heading %}<h2 class="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-3 max-w-2xl text-lg italic" style="color:hsl(var(--muted-foreground));font-family:var(--font-body, 'Work Sans', ui-sans-serif, system-ui, sans-serif);">{{ intro }}</p>{% endif %}
<div class="mx-auto mt-6 mb-4 flex justify-center" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="30" height="30" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" style="color:hsl(var(--primary));"><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>
<div class="mt-6 grid grid-cols-1 gap-x-14 gap-y-12 text-left {% if columns == 2 %}md:grid-cols-2{% endif %}">
{% for section in sections %}
<div class="menu-section">
{% if section.title %}<h3 class="border-b pb-2 text-center text-xl font-semibold" style="font-family:var(--font-heading, 'Fraunces', 'Playfair Display', Georgia, serif);color:hsl(var(--primary));border-color:hsl(var(--border));">{{ section.title }}</h3>{% endif %}
{% if section.note %}<p class="mt-2 text-center text-sm italic" style="color:hsl(var(--muted-foreground));">{{ section.note }}</p>{% endif %}
<ul class="mt-5 space-y-5">
{% for item in section.items %}
<li>
<div class="flex items-baseline gap-3">
<span class="shrink-0 font-medium" style="color:hsl(var(--foreground));">{{ item.name }}</span>
<span class="min-w-6 flex-1 translate-y-[-2px] border-b border-dotted" style="border-color:hsl(var(--primary)/0.5);" aria-hidden="true"></span>
{% if item.price %}<span class="shrink-0 font-semibold tabular-nums" style="color:hsl(var(--accent));">{% if currency %}{{ currency }}{% endif %}{{ item.price }}</span>{% endif %}
</div>
{% if item.badges %}<div class="mt-1 flex flex-wrap gap-1.5">{% for badge in item.badges %}{% if badge.label %}<span class="inline-block rounded-full border px-2 py-0.5 text-[0.65rem] uppercase tracking-wide" style="color:hsl(var(--muted-foreground));border-color:hsl(var(--border));">{{ badge.label }}</span>{% endif %}{% endfor %}</div>{% endif %}
{% if item.description %}<p class="mt-1 text-sm italic" style="color:hsl(var(--muted-foreground));font-family:var(--font-body, 'Work Sans', ui-sans-serif, system-ui, sans-serif);">{{ item.description }}</p>{% endif %}
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
{% if footnote %}<p class="mt-12 text-xs" style="color:hsl(var(--muted-foreground));">{{ footnote }}</p>{% endif %}
</div>
</section>