Alex Dunmow 85d95d0545 fix(kindergarten): repair hero, grids, empty media + mobile whitespace
Remediate broken layout on the demo home page (persona intact):

- Hero rendered with no height: it relied on min-h-screen /
  responsive Tailwind that the host JIT drops on a cold provision.
  Drive hero sizing + type through compiled .kg-hero* CSS classes
  (input_css_append is compiled every build). Mascot repositioned to
  bottom-center behind readable content; confetti/ABC/reduced-motion
  fallback preserved. All builtin field reads unchanged.
- Landing header was position:absolute and overlapped the feature
  grid when the hero collapsed -> switch to the default's in-flow
  sticky header (collision gone).
- feature-grid columns never formed (lg:grid-cols-3 not compiled) ->
  route through compiled .kg-cols/.kg-cols-3 media-query grid.
- Empty art-wall polaroids ballooned into large blank squares ->
  graceful 4:3 capped placeholder with a playful crayon wash.
- Define .kg-section (was only in the dead assets/style.css, so
  persona sections had no padding) and add a consistent .kg-sect
  rhythm; trim oversized section padding.
- Alphabet strip now a single scrollable row (was flex-wrap) so the
  sticky header stays compact on mobile.
- Mobile: all layout-critical grids are compiled media-query CSS
  (mobile-first, 1 col), no fixed widths > viewport, tap targets ok.

No .reveal/scroll-hide pattern in this theme; whitespace was real
layout void. Colors stay semantic tokens; check-safety 32 checks OK.
No version bump.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 17:26:20 +08:00

19 lines
2.0 KiB
Plaintext

{# feature_grid kindergarten override: scanline hero overlay, mono eyebrow, heading, neon HUD cards. All field reads + control flow preserved. #}
<section class="kg-sect overflow-hidden bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="relative z-10 mx-auto max-w-6xl px-4">
{% if eyebrow %}<p class="kg-mono text-center text-xs font-semibold text-accent">{{ eyebrow }}</p>{% endif %}
{% if heading %}<h2 class="kg-display mt-2 text-center text-3xl font-semibold tracking-tight md:text-4xl">{{ heading }}</h2>{% endif %}
{% if intro %}<p class="mx-auto mt-4 max-w-2xl text-center text-lg text-muted-foreground">{{ intro }}</p>{% endif %}
<div class="mt-10 kg-cols {% if columns == 2 %}kg-cols-2{% elif columns == 4 %}kg-cols-4{% else %}kg-cols-3{% endif %}">
{% for item in items %}
<div class="{% if layout == "card" %}rounded-2xl border border-primary/40 bg-card p-6 text-card-foreground kg-crayon-shadow transition-transform hover:-translate-y-0.5{% elif layout == "centered" %}text-center{% endif %}">
{% if item.icon %}<div class="mb-4 inline-flex h-11 w-11 items-center justify-center rounded-2xl bg-primary/10 text-primary{% if layout == "centered" %} mx-auto{% endif %}"><svg class="h-6 w-6" aria-hidden="true"><use href="/icons/{{ item.icon|split:":"|first }}.svg#{{ item.icon|split:":"|last }}"></use></svg></div>{% endif %}
<h3 class="kg-display text-lg font-semibold">{% if item.linkUrl %}<a href="{{ item.linkUrl }}" class="transition-colors hover:text-primary">{{ item.title }}</a>{% else %}{{ item.title }}{% endif %}</h3>
{% if item.text %}<p class="mt-2 text-muted-foreground">{{ item.text }}</p>{% endif %}
{% if item.linkUrl and item.linkLabel %}<a href="{{ item.linkUrl }}" class="kg-mono mt-3 inline-flex items-center gap-1 text-sm font-medium text-primary hover:underline">{{ item.linkLabel }}<svg class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#arrow-right"></use></svg></a>{% endif %}
</div>
{% endfor %}
</div>
</div>
</section>