diff --git a/assets/style.css b/assets/style.css index 7a2562c..0d3ceb2 100644 --- a/assets/style.css +++ b/assets/style.css @@ -32,6 +32,10 @@ body.pd-paper { radial-gradient(50% 50% at 25% 90%, hsl(var(--primary) / 0.08) 0%, transparent 60%); background-attachment: fixed; background-repeat: no-repeat; + /* Guard against horizontal scroll on small screens from any off-canvas + * chrome (mobile drawer). `clip` does not create a scroll container, so + * it will not break the sticky navbar the way `hidden` can. */ + overflow-x: clip; } /* --- Type roles --------------------------------------------------------- */ @@ -247,3 +251,43 @@ body.pd-paper { animation: none; } } + +/* --- Layout helpers (theme-owned, semantic tokens only) ----------------- + * Installed .bnp themes live outside the host Tailwind @source globs, so the + * host build does NOT compile grid / aspect-ratio / gap / padding utilities + * that appear only in this theme's own templates. The theme therefore owns + * those layout primitives here as plain CSS: mobile-first, collapsing to a + * single column on small screens, with explicit media queries so the render + * is reliable regardless of the JIT content scan. No colors — layout only. */ +.pd-section { padding-top: 2.75rem; padding-bottom: 2.75rem; } +@media (min-width: 768px) { + .pd-section { padding-top: 4rem; padding-bottom: 4rem; } +} + +.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; } +@media (min-width: 640px) { + .pd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } +} +@media (min-width: 1024px) { + .pd-grid--lg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .pd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .pd-grid--lg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } +} + +/* Two-up menu board: one column on phones, two side by side from md. */ +.pd-menu-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 3rem; } +@media (min-width: 768px) { + .pd-menu-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } +} +.pd-menu-list { margin-top: 1rem; } +.pd-menu-list > li + li { margin-top: 1.25rem; } + +/* Media frames: a fixed aspect box so a photo fills gracefully. The EMPTY + * state is omitted in-template (no ballooning boxes when no photo is set). */ +.pd-media { position: relative; width: 100%; overflow: hidden; aspect-ratio: 4 / 3; } +.pd-media--square { aspect-ratio: 1 / 1; } +.pd-media img { display: block; width: 100%; height: 100%; object-fit: cover; } + +/* Card body padding (host may not emit p-5 for theme templates). */ +.pd-card-body { padding: 1.25rem 1.25rem 1.5rem; } +@media (min-width: 768px) { .pd-card-body { padding: 1.5rem; } } diff --git a/blocks/bakers_note.ninjatpl b/blocks/bakers_note.ninjatpl index fb007b6..96bf153 100644 --- a/blocks/bakers_note.ninjatpl +++ b/blocks/bakers_note.ninjatpl @@ -1,4 +1,4 @@ -
+
diff --git a/blocks/cake_gallery.ninjatpl b/blocks/cake_gallery.ninjatpl index b7d8d9b..89a738a 100644 --- a/blocks/cake_gallery.ninjatpl +++ b/blocks/cake_gallery.ninjatpl @@ -1,17 +1,15 @@ -
+
{% if heading %}

{{ heading }}

{% endif %} {% if intro %}

{{ intro }}

{% endif %}
{% if cakes %} -
+
{% for cake in cakes %} -
-
- {% if cake.image %}{% img cake.image alt=cake.name|default:"Cake" class="h-full w-full object-cover" %}{% else %}
Add a photo
{% endif %} -
-
+
+ {% if cake.image %}
{% img cake.image alt=cake.name|default:"Cake" class="h-full w-full object-cover" %}
{% endif %} +
{% if cake.name %}

{{ cake.name }}

{% endif %} diff --git a/blocks/order_ribbon.ninjatpl b/blocks/order_ribbon.ninjatpl index 0363fba..f2c2697 100644 --- a/blocks/order_ribbon.ninjatpl +++ b/blocks/order_ribbon.ninjatpl @@ -1,4 +1,4 @@ -
+
diff --git a/blocks/seasonal_specials.ninjatpl b/blocks/seasonal_specials.ninjatpl index c101b9c..f64082b 100644 --- a/blocks/seasonal_specials.ninjatpl +++ b/blocks/seasonal_specials.ninjatpl @@ -1,4 +1,4 @@ -
+
{% if kicker %}

{{ kicker }}

{% endif %} @@ -6,13 +6,11 @@ {% if intro %}

{{ intro }}

{% endif %}
{% if items %} -
+
{% for item in items %} -
-
- {% if item.image %}{% img item.image alt=item.name|default:"Seasonal special" class="h-full w-full object-cover" %}{% else %}
Add a photo
{% endif %} -
-
+
+ {% if item.image %}
{% img item.image alt=item.name|default:"Seasonal special" class="h-full w-full object-cover" %}
{% endif %} +

{{ item.name }}

{% if item.price %}{% if currency %}{{ currency }}{% endif %}{{ item.price }}{% endif %} diff --git a/manifest.yaml b/manifest.yaml index 64cf80d..2f8ec41 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -141,6 +141,10 @@ css: radial-gradient(50% 50% at 25% 90%, hsl(var(--primary) / 0.08) 0%, transparent 60%); background-attachment: fixed; background-repeat: no-repeat; + /* Guard against horizontal scroll on small screens from any off-canvas + * chrome (mobile drawer). `clip` does not create a scroll container, so + * it will not break the sticky navbar the way `hidden` can. */ + overflow-x: clip; } /* --- Type roles --------------------------------------------------------- */ @@ -356,3 +360,43 @@ css: animation: none; } } + + /* --- Layout helpers (theme-owned, semantic tokens only) ----------------- + * Installed .bnp themes live outside the host Tailwind @source globs, so the + * host build does NOT compile grid / aspect-ratio / gap / padding utilities + * that appear only in this theme's own templates. The theme therefore owns + * those layout primitives here as plain CSS: mobile-first, collapsing to a + * single column on small screens, with explicit media queries so the render + * is reliable regardless of the JIT content scan. No colors — layout only. */ + .pd-section { padding-top: 2.75rem; padding-bottom: 2.75rem; } + @media (min-width: 768px) { + .pd-section { padding-top: 4rem; padding-bottom: 4rem; } + } + + .pd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; } + @media (min-width: 640px) { + .pd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + } + @media (min-width: 1024px) { + .pd-grid--lg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + .pd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .pd-grid--lg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } + } + + /* Two-up menu board: one column on phones, two side by side from md. */ + .pd-menu-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 3rem; } + @media (min-width: 768px) { + .pd-menu-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } + } + .pd-menu-list { margin-top: 1rem; } + .pd-menu-list > li + li { margin-top: 1.25rem; } + + /* Media frames: a fixed aspect box so a photo fills gracefully. The EMPTY + * state is omitted in-template (no ballooning boxes when no photo is set). */ + .pd-media { position: relative; width: 100%; overflow: hidden; aspect-ratio: 4 / 3; } + .pd-media--square { aspect-ratio: 1 / 1; } + .pd-media img { display: block; width: 100%; height: 100%; object-fit: cover; } + + /* Card body padding (host may not emit p-5 for theme templates). */ + .pd-card-body { padding: 1.25rem 1.25rem 1.5rem; } + @media (min-width: 768px) { .pd-card-body { padding: 1.5rem; } } diff --git a/templates/overrides/pastel-dream/cta.ninjatpl b/templates/overrides/pastel-dream/cta.ninjatpl index 4486c91..9606489 100644 --- a/templates/overrides/pastel-dream/cta.ninjatpl +++ b/templates/overrides/pastel-dream/cta.ninjatpl @@ -1,4 +1,4 @@ -
+
diff --git a/templates/overrides/pastel-dream/feature-grid.ninjatpl b/templates/overrides/pastel-dream/feature-grid.ninjatpl index 1f82389..16ce693 100644 --- a/templates/overrides/pastel-dream/feature-grid.ninjatpl +++ b/templates/overrides/pastel-dream/feature-grid.ninjatpl @@ -3,7 +3,7 @@ {% 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/pastel-dream/hours-location.ninjatpl b/templates/overrides/pastel-dream/hours-location.ninjatpl index 81d2f27..016f1aa 100644 --- a/templates/overrides/pastel-dream/hours-location.ninjatpl +++ b/templates/overrides/pastel-dream/hours-location.ninjatpl @@ -1,7 +1,7 @@ -
+
{% if heading %}

{{ heading }}

{% endif %} -
+
{% if hours %} diff --git a/templates/overrides/pastel-dream/menu-list.ninjatpl b/templates/overrides/pastel-dream/menu-list.ninjatpl index 9c3360b..e96a758 100644 --- a/templates/overrides/pastel-dream/menu-list.ninjatpl +++ b/templates/overrides/pastel-dream/menu-list.ninjatpl @@ -1,14 +1,14 @@ -
+
{% if heading %}

{{ heading }}

{% endif %} {% if intro %}

{{ intro }}

{% endif %}
-
+
{% for section in sections %}