diff --git a/assets/style.css b/assets/style.css index 3b25961..dd435f8 100644 --- a/assets/style.css +++ b/assets/style.css @@ -98,22 +98,40 @@ body.coffee-paper { background-color: hsl(var(--muted)); } -/* --- Torn-paper edges --------------------------------------------------- */ +/* --- Torn-paper edges --------------------------------------------------- + * The deckled edge is a FIXED ~13px band at the named edge; the rest of the + * element is masked solid. (The old `mask-size:100% 100%` stretched the 12px + * torn SVG across the whole element, eating ~40% of tall cards as a transparent + * wavy cut-out — the source of the hero/featured-pour/footer clipping.) */ .coffee-torn-top { - -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"); - mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-size: 100% 100%; - mask-size: 100% 100%; + -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black); + mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black); + -webkit-mask-position: top, bottom; + mask-position: top, bottom; + -webkit-mask-size: 100% 13px, 100% calc(100% - 12px); + mask-size: 100% 13px, 100% calc(100% - 12px); + -webkit-mask-repeat: no-repeat, no-repeat; + mask-repeat: no-repeat, no-repeat; } .coffee-torn-bottom { - -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); - mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-size: 100% 100%; - mask-size: 100% 100%; + -webkit-mask-image: linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + mask-image: linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + -webkit-mask-position: top, bottom; + mask-position: top, bottom; + -webkit-mask-size: 100% calc(100% - 12px), 100% 13px; + mask-size: 100% calc(100% - 12px), 100% 13px; + -webkit-mask-repeat: no-repeat, no-repeat; + mask-repeat: no-repeat, no-repeat; +} +.coffee-torn-top.coffee-torn-bottom { + -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + -webkit-mask-position: top, center, bottom; + mask-position: top, center, bottom; + -webkit-mask-size: 100% 13px, 100% calc(100% - 24px), 100% 13px; + mask-size: 100% 13px, 100% calc(100% - 24px), 100% 13px; + -webkit-mask-repeat: no-repeat, no-repeat, no-repeat; + mask-repeat: no-repeat, no-repeat, no-repeat; } /* --- Surfaces ----------------------------------------------------------- */ @@ -149,12 +167,44 @@ body.coffee-paper { color: hsl(var(--background) / 0.72); } -/* --- Hours: today highlight --------------------------------------------- */ -.coffee-hours-today { - background-color: hsl(var(--accent) / 0.15); - color: hsl(var(--accent-foreground)); - border-left: 3px solid hsl(var(--accent)); +/* --- Hours: today highlight --------------------------------------------- + * Applied to the whole so both cells share one readable band. (Was on the + * only with accent-foreground text over a 15%-accent tint — light-on-light, + * unreadable.) accent text over a 12% tint of the same accent reads cleanly. */ +.coffee-hours-today > th, +.coffee-hours-today > td { + background-color: hsl(var(--accent) / 0.12); +} +.coffee-hours-today > th { + box-shadow: inset 3px 0 0 hsl(var(--accent)); padding-left: 0.75rem; + color: hsl(var(--accent)); +} + +/* --- Layout helpers ------------------------------------------------------ + * Explicit CSS so these layouts never depend on the host Tailwind JIT + * compiling arbitrary/responsive utilities out of THEME templates — it does + * not scan them reliably, so `min-h-[50vh]` / `md:grid-cols-[2fr_3fr]` / + * `md:grid-cols-2` in a theme file can silently vanish. Base is always a + * single column, so grids collapse on mobile regardless of the JIT. */ +.coffee-minh-50 { min-height: 50vh; } +.coffee-minh-75 { min-height: 75vh; } +.coffee-minh-screen { min-height: 100vh; } +.coffee-minh-400 { min-height: 400px; } +.coffee-minh-320 { min-height: 320px; } + +.coffee-split-2 { display: grid; grid-template-columns: 1fr; } +.coffee-pour-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; } +.coffee-menu-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem 3rem; } +.coffee-info-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; } + +@media (min-width: 768px) { + .coffee-pour-grid { grid-template-columns: 2fr 3fr; align-items: center; } + .coffee-menu-grid.coffee-menu-grid--2 { grid-template-columns: 1fr 1fr; } + .coffee-info-grid.coffee-info-grid--2 { grid-template-columns: 1fr 1fr; } +} +@media (min-width: 1024px) { + .coffee-split-2 { grid-template-columns: 1fr 1fr; } } /* --- Price + spec chips ------------------------------------------------- */ diff --git a/blocks/featured_pour.ninjatpl b/blocks/featured_pour.ninjatpl index 65e2223..92e5061 100644 --- a/blocks/featured_pour.ninjatpl +++ b/blocks/featured_pour.ninjatpl @@ -1,8 +1,8 @@
-
+
{{ label|default:"Featured pour" }}
- {% if image %}{% img image alt=name|default:"Featured pour" class="h-full w-full object-cover" %}{% else %}
Add a hero image
{% endif %} + {% if image %}{% img image alt=name|default:"Featured pour" class="h-full w-full object-cover" %}{% else %}
{% endif %}
{% if origin %}

{{ origin }}

{% endif %} diff --git a/manifest.yaml b/manifest.yaml index ba4b013..d1f94d3 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -206,22 +206,40 @@ css: background-color: hsl(var(--muted)); } - /* --- Torn-paper edges --------------------------------------------------- */ + /* --- Torn-paper edges --------------------------------------------------- + * The deckled edge is a FIXED ~13px band at the named edge; the rest of the + * element is masked solid. (The old `mask-size:100% 100%` stretched the 12px + * torn SVG across the whole element, eating ~40% of tall cards as a transparent + * wavy cut-out — the source of the hero/featured-pour/footer clipping.) */ .coffee-torn-top { - -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"); - mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-size: 100% 100%; - mask-size: 100% 100%; + -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black); + mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black); + -webkit-mask-position: top, bottom; + mask-position: top, bottom; + -webkit-mask-size: 100% 13px, 100% calc(100% - 12px); + mask-size: 100% 13px, 100% calc(100% - 12px); + -webkit-mask-repeat: no-repeat, no-repeat; + mask-repeat: no-repeat, no-repeat; } .coffee-torn-bottom { - -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); - mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); - -webkit-mask-repeat: no-repeat; - mask-repeat: no-repeat; - -webkit-mask-size: 100% 100%; - mask-size: 100% 100%; + -webkit-mask-image: linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + mask-image: linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + -webkit-mask-position: top, bottom; + mask-position: top, bottom; + -webkit-mask-size: 100% calc(100% - 12px), 100% 13px; + mask-size: 100% calc(100% - 12px), 100% 13px; + -webkit-mask-repeat: no-repeat, no-repeat; + mask-repeat: no-repeat, no-repeat; + } + .coffee-torn-top.coffee-torn-bottom { + -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 12 L0 6 Q 5 2 10 5 T 20 4 T 30 6 T 40 3 T 50 5 T 60 4 T 70 5 T 80 3 T 90 5 T 100 4 L100 12 Z' fill='black'/%3E%3C/svg%3E"), linear-gradient(black, black), url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L100 0 L100 6 Q 95 10 90 7 T 80 8 T 70 6 T 60 9 T 50 7 T 40 8 T 30 7 T 20 9 T 10 7 T 0 8 Z' fill='black'/%3E%3C/svg%3E"); + -webkit-mask-position: top, center, bottom; + mask-position: top, center, bottom; + -webkit-mask-size: 100% 13px, 100% calc(100% - 24px), 100% 13px; + mask-size: 100% 13px, 100% calc(100% - 24px), 100% 13px; + -webkit-mask-repeat: no-repeat, no-repeat, no-repeat; + mask-repeat: no-repeat, no-repeat, no-repeat; } /* --- Surfaces ----------------------------------------------------------- */ @@ -257,14 +275,46 @@ css: color: hsl(var(--background) / 0.72); } - /* --- Hours: today highlight --------------------------------------------- */ - .coffee-hours-today { - background-color: hsl(var(--accent) / 0.15); - color: hsl(var(--accent-foreground)); - border-left: 3px solid hsl(var(--accent)); + /* --- Hours: today highlight --------------------------------------------- + * Applied to the whole so both cells share one readable band. (Was on the + * only with accent-foreground text over a 15%-accent tint — light-on-light, + * unreadable.) accent text over a 12% tint of the same accent reads cleanly. */ + .coffee-hours-today > th, + .coffee-hours-today > td { + background-color: hsl(var(--accent) / 0.12); + } + .coffee-hours-today > th { + box-shadow: inset 3px 0 0 hsl(var(--accent)); padding-left: 0.75rem; + color: hsl(var(--accent)); } + /* --- Layout helpers ------------------------------------------------------ + * Explicit CSS so these layouts never depend on the host Tailwind JIT + * compiling arbitrary/responsive utilities out of THEME templates — it does + * not scan them reliably, so `min-h-[50vh]` / `md:grid-cols-[2fr_3fr]` / + * `md:grid-cols-2` in a theme file can silently vanish. Base is always a + * single column, so grids collapse on mobile regardless of the JIT. */ + .coffee-minh-50 { min-height: 50vh; } + .coffee-minh-75 { min-height: 75vh; } + .coffee-minh-screen { min-height: 100vh; } + .coffee-minh-400 { min-height: 400px; } + .coffee-minh-320 { min-height: 320px; } + + .coffee-split-2 { display: grid; grid-template-columns: 1fr; } + .coffee-pour-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; } + .coffee-menu-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem 3rem; } + .coffee-info-grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; } + + @media (min-width: 768px) { + .coffee-pour-grid { grid-template-columns: 2fr 3fr; align-items: center; } + .coffee-menu-grid.coffee-menu-grid--2 { grid-template-columns: 1fr 1fr; } + .coffee-info-grid.coffee-info-grid--2 { grid-template-columns: 1fr 1fr; } + } + @media (min-width: 1024px) { + .coffee-split-2 { grid-template-columns: 1fr 1fr; } + } + /* --- Price + spec chips ------------------------------------------------- */ .coffee-price { font-family: var(--font-mono, var(--coffee-mono-fallback)); diff --git a/templates/overrides/coffee/hero.ninjatpl b/templates/overrides/coffee/hero.ninjatpl index 149c6ae..4fae2af 100644 --- a/templates/overrides/coffee/hero.ninjatpl +++ b/templates/overrides/coffee/hero.ninjatpl @@ -22,14 +22,14 @@ {% if trustLogos %}

Regulars love

{% 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-60" %}{% 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" %}{% endif %}
+
+
{% if hasImage %}{% img backgroundImage alt=headlineText class="absolute inset-0 h-full w-full object-cover" layout="hero" %}{% 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 %}
{% endif %}
{{ herocontent(align) }}
diff --git a/templates/overrides/coffee/hours-location.ninjatpl b/templates/overrides/coffee/hours-location.ninjatpl index 954f336..9abb39c 100644 --- a/templates/overrides/coffee/hours-location.ninjatpl +++ b/templates/overrides/coffee/hours-location.ninjatpl @@ -1,7 +1,7 @@
{% if heading %}

{{ heading }}

{% endif %} -
+
{% if hours %} @@ -34,7 +34,7 @@ var today=days[new Date().getDay()]; document.querySelectorAll('[data-coffee-hours] tr[data-day]').forEach(function(tr){ var d=(tr.getAttribute('data-day')||'').trim(); - if(d.toLowerCase().indexOf(today.toLowerCase())===0){tr.querySelector('th').classList.add('coffee-hours-today');} + if(d.toLowerCase().indexOf(today.toLowerCase())===0){tr.classList.add('coffee-hours-today');} }); })(); diff --git a/templates/overrides/coffee/image.ninjatpl b/templates/overrides/coffee/image.ninjatpl index e0a5475..97a4e0a 100644 --- a/templates/overrides/coffee/image.ninjatpl +++ b/templates/overrides/coffee/image.ninjatpl @@ -1,7 +1,7 @@ {% with size=size|default:"full" align=align|default:"center" %}
- {% if src %}{% img src alt=alt class="block h-auto w-full rounded-sm object-cover" layout=size %}{% else %}
Add an image
{% endif %} + {% if src %}{% img src alt=alt class="block h-auto w-full rounded-sm object-cover" layout=size %}{% else %}
{% endif %}
{% if caption %}
{{ caption }}
{% endif %}
diff --git a/templates/overrides/coffee/menu-list.ninjatpl b/templates/overrides/coffee/menu-list.ninjatpl index 0948ee7..390d623 100644 --- a/templates/overrides/coffee/menu-list.ninjatpl +++ b/templates/overrides/coffee/menu-list.ninjatpl @@ -3,7 +3,7 @@ {% if heading %}

{{ heading }}

{% endif %} {% if intro %}

{{ intro }}

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