themes-coffee/templates/overrides/coffee/page-suggestions.ninjatpl
Alex Dunmow beca13796d fix(coffee): pin explicit width/height on all <use> icon SVGs + Wave B gallery screenshots
Root cause: featured_pour's empty-media placeholder used an external <use>
SVG (svg class=h-24 w-24 + use href=/icons/lucide.svg#coffee) sized ONLY by
Tailwind utilities. The host Tailwind JIT does not reliably emit utility
classes used solely in a theme block template, so h-24/w-24 could be dropped
from the generated stylesheet; the SVG (no viewBox, no intrinsic size) then
ballooned to fill its aspect-square parent (~350-500px cup silhouettes over
the hero/blog cards). Fix pins width/height geometry attributes on every
<use> icon SVG so size is CSS-independent and deterministic.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 10:34:17 +08:00

21 lines
1.4 KiB
Plaintext

{# coffee page-suggestions — themed 404 helper. Suggestions (when the platform provides them) list {url|slug, title, excerpt}; otherwise a friendly hand-drawn "lost your way" panel with a route home. #}
<section class="py-16 md:py-24 bg-background text-foreground{% if class %} {{ class }}{% endif %}">
<div class="mx-auto max-w-3xl px-4 text-center">
<p class="coffee-hand text-3xl text-accent">Lost your way?</p>
<h2 class="coffee-display mt-1 text-3xl text-primary md:text-4xl">{{ title|default:"Were you looking for..." }}</h2>
{% if suggestions %}
<ul class="mt-8 space-y-3 text-left">
{% for s in suggestions %}
<li class="coffee-card p-4">
<a href="{{ s.url|default:s.slug }}" class="coffee-display text-lg text-primary transition-colors hover:text-accent">{{ s.title }}</a>
{% if showDescription and s.excerpt %}<p class="coffee-body mt-1 text-sm text-muted-foreground">{{ s.excerpt }}</p>{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<p class="coffee-body mx-auto mt-4 max-w-xl text-muted-foreground">{{ emptyMessage|default:"That page has wandered off. Head back to the counter and start again." }}</p>
{% endif %}
<a href="/" class="kraft-tag mt-8"><svg width="16" height="16" class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#home"></use></svg>Back home</a>
</div>
</section>