From 486d3a283e6ff1cd750e40ea5caac1e9075bb610 Mon Sep 17 00:00:00 2001 From: Alex Dunmow Date: Sun, 5 Jul 2026 17:20:44 +0800 Subject: [PATCH] fix(gotham): remediate whitespace stranding, imageless hero void, mobile grid collapse - Robust scroll-reveal: replace observer-only reveal (which stranded below-fold .reveal blocks at opacity:0 while they still occupied layout height, producing a huge dead band before the footer) with an instant in-view pass + scroll/resize/load listeners + safety-net full reveal. Applied identically to all 8 page templates. Never strands content; fixes the invisible hero text and the giant empty band. - Imageless hero: cap to a compact 520px (380px mobile) letterboxed text plate with a token spotlight backdrop instead of a 75vh empty void. Height moved to a raw manifest CSS class (JIT-scan-independent). - Mobile safety net: raw @media(max-width:640px) rules force the events, membership and feature-grid layouts to a single column so a dropped responsive Tailwind prefix can never strand a wide grid on a phone. - Shorten reveal transition .7s -> .5s for screenshot-safe opacity. check-safety: 32 checks 19 ok 13 skip -> OK; codeless build exit 0. Co-Authored-By: Claude Opus 4.8 --- manifest.yaml | 19 ++++++++++++++++++- templates/gotham/article.ninjatpl | 2 +- templates/gotham/auth.ninjatpl | 2 +- templates/gotham/blog-index.ninjatpl | 2 +- templates/gotham/centered.ninjatpl | 2 +- templates/gotham/contact.ninjatpl | 2 +- templates/gotham/default.ninjatpl | 2 +- templates/gotham/full-width.ninjatpl | 2 +- templates/gotham/landing.ninjatpl | 2 +- templates/overrides/gotham/hero.ninjatpl | 2 +- 10 files changed, 27 insertions(+), 10 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index 466d788..f7e0333 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -217,9 +217,26 @@ css: /* reveal — MID-tier scroll reveal. No JS = visible; reduced-motion honoured. */ .reveal { opacity: 1; } - .gotham-js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; } + .gotham-js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; } .gotham-js .reveal.is-visible { opacity: 1; transform: none; } @media (prefers-reduced-motion: reduce) { .gotham-js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; } } } + + /* Raw CSS (outside @layer, JIT-scan-independent) — layout guarantees the + * host Tailwind scan may not reliably emit from theme .ninjatpl files. + * Imageless hero: a compact letterboxed text plate, never a 75vh void. */ + .gotham-hero-plate { min-height: 520px; } + @media (max-width: 640px) { .gotham-hero-plate { min-height: 380px; } } + + /* Mobile collapse safety net — guarantee persona/override grids fall to a + * single column at ~<=640px even if the responsive prefix classes are not + * compiled from the theme templates. Base is already 1-col in the markup; + * this hard-forces it so a dropped sm:/md:/lg: prefix can never strand a + * wide multi-column grid on a phone (no horizontal overflow). */ + @media (max-width: 640px) { + [data-block="gotham:events_marquee"] ul > li { grid-template-columns: 1fr !important; } + [data-block="gotham:membership_tiers"] .grid, + [data-block-override="gotham:feature-grid"] .grid { grid-template-columns: 1fr !important; } + } diff --git a/templates/gotham/article.ninjatpl b/templates/gotham/article.ninjatpl index a0ea1f6..c81989c 100644 --- a/templates/gotham/article.ninjatpl +++ b/templates/gotham/article.ninjatpl @@ -17,7 +17,7 @@ {{ body_end_html|safe }} diff --git a/templates/gotham/auth.ninjatpl b/templates/gotham/auth.ninjatpl index 420c839..c764385 100644 --- a/templates/gotham/auth.ninjatpl +++ b/templates/gotham/auth.ninjatpl @@ -15,7 +15,7 @@ {{ body_end_html|safe }} diff --git a/templates/gotham/blog-index.ninjatpl b/templates/gotham/blog-index.ninjatpl index 0b17027..0bdb48c 100644 --- a/templates/gotham/blog-index.ninjatpl +++ b/templates/gotham/blog-index.ninjatpl @@ -20,7 +20,7 @@ {% if slots.footer %}
{{ slots.footer|safe }}
{% endif %} {{ body_end_html|safe }} diff --git a/templates/gotham/centered.ninjatpl b/templates/gotham/centered.ninjatpl index ff43912..7356f0e 100644 --- a/templates/gotham/centered.ninjatpl +++ b/templates/gotham/centered.ninjatpl @@ -10,7 +10,7 @@
{{ slots.footer|safe }}
{{ body_end_html|safe }} diff --git a/templates/gotham/contact.ninjatpl b/templates/gotham/contact.ninjatpl index 4115730..c323c55 100644 --- a/templates/gotham/contact.ninjatpl +++ b/templates/gotham/contact.ninjatpl @@ -19,7 +19,7 @@ {% if slots.footer %}
{{ slots.footer|safe }}
{% endif %} {{ body_end_html|safe }} diff --git a/templates/gotham/default.ninjatpl b/templates/gotham/default.ninjatpl index 2117930..695884e 100644 --- a/templates/gotham/default.ninjatpl +++ b/templates/gotham/default.ninjatpl @@ -14,7 +14,7 @@ {{ body_end_html|safe }} diff --git a/templates/gotham/full-width.ninjatpl b/templates/gotham/full-width.ninjatpl index 4313c3a..c44c7a5 100644 --- a/templates/gotham/full-width.ninjatpl +++ b/templates/gotham/full-width.ninjatpl @@ -12,7 +12,7 @@ {{ body_end_html|safe }} diff --git a/templates/gotham/landing.ninjatpl b/templates/gotham/landing.ninjatpl index 9b8d9c6..7fe8ea7 100644 --- a/templates/gotham/landing.ninjatpl +++ b/templates/gotham/landing.ninjatpl @@ -13,7 +13,7 @@ {{ body_end_html|safe }} diff --git a/templates/overrides/gotham/hero.ninjatpl b/templates/overrides/gotham/hero.ninjatpl index 00b5b96..2159768 100644 --- a/templates/overrides/gotham/hero.ninjatpl +++ b/templates/overrides/gotham/hero.ninjatpl @@ -32,7 +32,7 @@ {% else %} {% set align = "center" %} {% if variant == "left-aligned" %}{% set align = "left" %}{% endif %} -
+
{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}
{% endif %}