diff --git a/manifest.yaml b/manifest.yaml index 6be2b51..4e47d10 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -297,12 +297,101 @@ css: overflow: hidden; } + /* ---- Robust responsive layout ------------------------------ */ + /* The host Tailwind JIT scans rendered BUILT-IN html and lags on + theme-only classes, so every layout-critical grid, section + rhythm, and hero size is driven by these compiled-every-build + rules — never by responsive Tailwind utilities in the theme + templates (which are dropped on a cold provision). All are + mobile-first: 1 column by default, widening at breakpoints. */ + + .kg-section { padding-block: clamp(2rem, 5vw, 3rem); } + .kg-sect { padding-block: clamp(2.25rem, 5vw, 3.5rem); position: relative; } + + .kg-cols { display: grid; grid-template-columns: 1fr; gap: 1.5rem; } + @media (min-width: 640px) { + .kg-cols-2, .kg-cols-3, .kg-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + } + @media (min-width: 1024px) { + .kg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .kg-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } + } + + /* Hero — full sizing + type in CSS so it never depends on the + (unreliable) min-h-screen / responsive Tailwind in the template. */ + .kg-hero { + position: relative; + overflow: hidden; + display: flex; + flex-direction: column; + justify-content: center; + min-height: clamp(24rem, 58vh, 38rem); + padding-block: clamp(2.5rem, 7vw, 4.5rem); + background-color: hsl(var(--accent) / 0.15); + color: hsl(var(--foreground)); + } + .kg-hero-media { position: absolute; inset: 0; z-index: 0; } + .kg-hero-media > img { width: 100%; height: 100%; object-fit: cover; } + .kg-hero-overlay { position: absolute; inset: 0; background-color: hsl(var(--foreground) / 0.4); } + .kg-hero-mascot { + position: absolute; + left: 50%; + bottom: -0.25rem; + transform: translateX(-50%); + width: clamp(88px, 16vw, 150px); + pointer-events: none; + } + .kg-hero-mascot svg { width: 100%; height: auto; display: block; } + .kg-hero-inner { + position: relative; + z-index: 10; + width: 100%; + max-width: 56rem; + margin-inline: auto; + padding-inline: 1.5rem; + } + .kg-hero--center { text-align: center; } + .kg-hero-title { margin-top: 1rem; font-size: clamp(2.25rem, 6vw, 3.75rem); line-height: 1.06; } + .kg-hero-abc { display: inline-flex; gap: 0.35rem; margin-top: 1.1rem; font-size: clamp(1.5rem, 4vw, 2rem); } + .kg-hero-abc .kg-wiggle-letter:nth-child(1) { color: hsl(var(--primary)); } + .kg-hero-abc .kg-wiggle-letter:nth-child(2) { color: hsl(var(--secondary)); } + .kg-hero-abc .kg-wiggle-letter:nth-child(3) { color: hsl(var(--accent)); } + .kg-hero-sub { margin-top: 1rem; font-size: clamp(1.125rem, 2.5vw, 1.5rem); color: hsl(var(--muted-foreground)); max-width: 42rem; } + .kg-hero-desc { margin-top: 0.75rem; color: hsl(var(--muted-foreground)); max-width: 36rem; line-height: 1.6; } + .kg-hero--center .kg-hero-sub, + .kg-hero--center .kg-hero-desc { margin-inline: auto; } + .kg-hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; } + .kg-hero--center .kg-hero-cta { justify-content: center; } + .kg-hero-trust { margin-top: 2.5rem; } + .kg-hero-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 0.75rem; } + .kg-hero--center .kg-hero-logos { justify-content: center; } + + /* Chunky rounded buttons (crayon sticker edge). */ + .kg-btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 0.5rem; + border-radius: 9999px; + padding: 0.85rem 1.75rem; + font-family: var(--font-heading, "Baloo 2", "Quicksand", sans-serif); + font-weight: 700; + font-size: 1.05rem; + line-height: 1.1; + text-decoration: none; + } + .kg-btn-primary { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); box-shadow: 0 4px 0 0 hsl(var(--foreground) / 0.15); } + .kg-btn-outline { background-color: hsl(var(--background)); color: hsl(var(--primary)); border: 3px solid hsl(var(--primary)); } + /* Alphabet strip (persona block). */ .kg-alphabet-strip { display: flex; - flex-wrap: wrap; + flex-wrap: nowrap; gap: 0.6rem; - padding: 1rem; + padding: 0.6rem 1rem; + overflow-x: auto; + scrollbar-width: thin; + -webkit-overflow-scrolling: touch; } .kg-alphabet-letter { flex: 0 0 auto; @@ -369,8 +458,7 @@ css: .kg-polaroid:nth-child(2n) { transform: rotate(1.5deg); } .kg-polaroid:nth-child(3n) { transform: rotate(-0.5deg); } .kg-polaroid:hover { transform: rotate(0deg); } - .kg-polaroid > img, - .kg-polaroid > .kg-polaroid-image { + .kg-polaroid > img { display: block; width: 100%; aspect-ratio: 1 / 1; @@ -378,6 +466,23 @@ css: border-radius: 0.5rem; background-color: hsl(var(--muted)); } + /* Empty-media graceful state: a compact, playful crayon wash — NOT a + ballooning blank square. Shorter aspect + capped height so three + imageless polaroids never dominate the page. */ + .kg-polaroid > .kg-polaroid-image { + display: block; + width: 100%; + aspect-ratio: 4 / 3; + max-height: 220px; + border-radius: 0.5rem; + background-color: hsl(var(--accent) / 0.16); + background-image: + radial-gradient(circle at 50% 46%, hsl(var(--primary) / 0.38) 0 9%, transparent 10%), + radial-gradient(circle, hsl(var(--foreground) / 0.10) 1.5px, transparent 2px); + background-size: 100% 100%, 20px 20px; + background-position: center center, center center; + background-repeat: no-repeat, repeat; + } .kg-polaroid-caption { text-align: center; margin-top: 0.75rem; @@ -419,6 +524,7 @@ css: with JS off. No canvas anywhere else in the theme. */ .kg-mascot { + display: inline-block; transform-origin: center bottom; animation: kg-bounce 2.4s ease-in-out infinite; } diff --git a/templates/kindergarten/landing.ninjatpl b/templates/kindergarten/landing.ninjatpl index 220ec3d..c97dde0 100644 --- a/templates/kindergarten/landing.ninjatpl +++ b/templates/kindergarten/landing.ninjatpl @@ -3,7 +3,7 @@ {{ head_html|safe }} {{ admin_banner_html|safe }} -
{{ slots.header|safe }}
+
{{ slots.header|safe }}
{% if slots.main %}{{ slots.main|safe }}{% else %}
No content blocks assigned to this page yet.
{% endif %}
{{ body_end_html|safe }} diff --git a/templates/overrides/kindergarten/cta.ninjatpl b/templates/overrides/kindergarten/cta.ninjatpl index 8426816..83943a8 100644 --- a/templates/overrides/kindergarten/cta.ninjatpl +++ b/templates/overrides/kindergarten/cta.ninjatpl @@ -1,5 +1,5 @@ {# cta kindergarten override: scanline overlay, heading, kg-pop CTAs. All field reads preserved. #} -
+
diff --git a/templates/overrides/kindergarten/feature-grid.ninjatpl b/templates/overrides/kindergarten/feature-grid.ninjatpl index dd46d53..cec6a65 100644 --- a/templates/overrides/kindergarten/feature-grid.ninjatpl +++ b/templates/overrides/kindergarten/feature-grid.ninjatpl @@ -1,10 +1,10 @@ {# feature_grid kindergarten override: scanline hero overlay, mono eyebrow, heading, neon HUD cards. All field reads + control flow preserved. #} -
+
{% if eyebrow %}

{{ eyebrow }}

{% endif %} {% if heading %}

{{ heading }}

{% endif %} {% if intro %}

{{ intro }}

{% endif %} -
+
{% for item in items %}
{% if item.icon %}
{% endif %} diff --git a/templates/overrides/kindergarten/hero.ninjatpl b/templates/overrides/kindergarten/hero.ninjatpl index 4694957..48793e0 100644 --- a/templates/overrides/kindergarten/hero.ninjatpl +++ b/templates/overrides/kindergarten/hero.ninjatpl @@ -1,4 +1,4 @@ -{# hero kindergarten override (GO-BIG showpiece): a bouncing mascot, wiggling ABC letters, and a dependency-free confetti canvas fill the panel when there is no backgroundImage. The canvas lazy-inits on view, honours prefers-reduced-motion, and degrades to a static confetti wash with JS off. All builtin field reads + macro + branch structure are preserved from the default hero — only the styling changes. #} +{# hero kindergarten override (GO-BIG showpiece): a bouncing mascot, wiggling ABC letters, and a dependency-free confetti canvas fill the panel when there is no backgroundImage. The canvas lazy-inits on view, honours prefers-reduced-motion, and degrades to a static confetti wash with JS off. Sizing + typography are driven by compiled .kg-hero* CSS (NOT min-h-screen / responsive Tailwind, which the host JIT drops on a cold provision). All builtin field reads are preserved from the default hero. #} {% set eyebrowText = eyebrow.text|default:eyebrow %} {% set headlineText = headline.text|default:headline %} {% set subText = subheadline.text|default:subheadline %} @@ -10,35 +10,26 @@ {% set variant = template|default:"centered" %} {% set hasImage = backgroundImage %} {% set showOverlay = hasImage and overlayColor != "none" and overlayColor != "" %} -{% macro playmascot() %}{% endmacro %} -{% macro herocontent(align) %} -{% if eyebrowText %}{{ eyebrowText }}{% endif %} -{% if headlineText %}

{{ headlineText }}

{% endif %} - -{% if subText %}

{{ subText }}

{% endif %} -{% if descText %}

{{ descText }}

{% endif %} -{% if pText or sText %}
-{% if pText and pUrl %}{{ pText }}{% endif %} -{% if sText and sUrl %}{{ sText }}{% endif %} -
{% endif %} -{% if trustLogos %}
-

Loved by families at

-
{% for logo in trustLogos %}{% if logo.url %}{% img logo.image alt=logo.alt class="h-8 w-auto" %}{% else %}{% img logo.image alt=logo.alt class="h-8 w-auto opacity-70" %}{% endif %}{% endfor %}
-
{% endif %} -{% endmacro %} -{% if variant == "split" %} -
-
{% if hasImage %}{% img backgroundImage alt=headlineText class="absolute inset-0 h-full w-full object-cover" layout="hero" %}{% else %}{{ playmascot() }}{% endif %}
-
{{ herocontent("left") }}
-
-{% 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 %}
{% else %}
{{ playmascot() }}
{% endif %} -
{{ herocontent(align) }}
+{% if variant == "left-aligned" or variant == "split" %}{% set align = "left" %}{% endif %} +
+{% if hasImage %}
{% img backgroundImage alt=headlineText class="h-full w-full object-cover" layout="hero" %}{% if showOverlay %}
{% endif %}
{% else %}{% endif %} +
+{% if eyebrowText %}{{ eyebrowText }}{% endif %} +{% if headlineText %}

{{ headlineText }}

{% endif %} + +{% if subText %}

{{ subText }}

{% endif %} +{% if descText %}

{{ descText }}

{% endif %} +{% if pText or sText %}
+{% if pText and pUrl %}{{ pText }}{% endif %} +{% if sText and sUrl %}{{ sText }}{% endif %} +
{% endif %} +{% if trustLogos %}
+

Loved by families at

+
{% for logo in trustLogos %}{% if logo.url %}{% img logo.image alt=logo.alt class="h-8 w-auto" %}{% else %}{% img logo.image alt=logo.alt class="h-8 w-auto opacity-70" %}{% endif %}{% endfor %}
+
{% endif %} +
-{% endif %}