Third remediation pass, superseding the hand-rolled-CSS approach of 0b3013c now that the host Tailwind build scans theme .ninjatpl files. Hero blank-on-bare-string fix: - The four styled-text fields read field.text|default:field, which HARD-ERRORS when the seed passes a bare string (no .text attribute) and blanks the whole hero. Switch to field|get:"text"|default:field so the process-global get filter degrades gracefully on strings. Layout back to Tailwind (Alex rule: don't reimplement standard utilities): - Revert the .noir-cols*/.noir-cols-2up*/.noir-split/.noir-gap-*/.noir-hero-pad class swaps in 15 override templates back to plain grid/gap/padding utilities (grid-cols-*, gap-*, sm:/md:/lg: variants, py-*), and delete the matching hand-rolled media-query block from manifest css.input_css_append. - Hero split now uses grid grid-cols-1 lg:grid-cols-2 with a Tailwind min-h-80 media frame (guarded so empty seed media does not balloon); the centered hero uses py-16 md:py-20 lg:py-24 instead of min-h-[75vh], keeping the dead-vertical-band trim. Kept from the prior pass: robust .noir-reveal (instant reveal when already in view + load/1600ms safety nets + no-JS/reduced-motion visible), tightened section padding, and the genuinely bespoke safety CSS (empty-media img guards, overflow-wrap, block max-width) — none of which are Tailwind-utility duplicates. No version bump. make + check-safety both exit 0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
29 lines
2.7 KiB
Plaintext
29 lines
2.7 KiB
Plaintext
{# noir override — testimonial; preserves heading, layout, quotes[].rating/.quote/.avatar/.name/.role, star <svg><use> markup + {% img %} avatar verbatim. #}
|
|
<section data-block-override="noir:testimonial" class="py-16 md:py-24 bg-background text-foreground{% if class %} {{ class }}{% endif %}">
|
|
<div class="mx-auto max-w-6xl px-4">
|
|
{% if heading %}<h2 class="noir-heading text-center text-3xl md:text-4xl" style="color:hsl(var(--foreground));">{{ heading }}</h2>{% endif %}
|
|
<div class="mt-12 {% if layout == "single" %}mx-auto max-w-3xl{% elif layout == "carousel" %}flex snap-x snap-mandatory gap-6 overflow-x-auto pb-4{% else %}grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3{% endif %}">
|
|
{% for q in quotes %}
|
|
<figure class="noir-file flex flex-col p-6 text-card-foreground{% if layout == "carousel" %} min-w-[18rem] max-w-sm shrink-0 snap-start{% endif %}">
|
|
{% if q.rating %}<div class="mb-3 flex gap-0.5" aria-label="Rated {{ q.rating }} out of 5">
|
|
<svg class="h-4 w-4 {% if q.rating >= 1 %}text-primary{% else %}text-muted-foreground/30{% endif %}" aria-hidden="true"><use href="/icons/lucide.svg#star"></use></svg>
|
|
<svg class="h-4 w-4 {% if q.rating >= 2 %}text-primary{% else %}text-muted-foreground/30{% endif %}" aria-hidden="true"><use href="/icons/lucide.svg#star"></use></svg>
|
|
<svg class="h-4 w-4 {% if q.rating >= 3 %}text-primary{% else %}text-muted-foreground/30{% endif %}" aria-hidden="true"><use href="/icons/lucide.svg#star"></use></svg>
|
|
<svg class="h-4 w-4 {% if q.rating >= 4 %}text-primary{% else %}text-muted-foreground/30{% endif %}" aria-hidden="true"><use href="/icons/lucide.svg#star"></use></svg>
|
|
<svg class="h-4 w-4 {% if q.rating >= 5 %}text-primary{% else %}text-muted-foreground/30{% endif %}" aria-hidden="true"><use href="/icons/lucide.svg#star"></use></svg>
|
|
</div>{% endif %}
|
|
<blockquote class="noir-body flex-1 text-lg leading-relaxed" style="color:hsl(var(--card-foreground));">{% if q.quote %}“{{ q.quote }}”{% endif %}</blockquote>
|
|
<div class="my-4 flex items-center"><span class="noir-rule w-16"></span></div>
|
|
<figcaption class="flex items-center gap-3">
|
|
{% if q.avatar %}<span class="h-10 w-10 shrink-0 overflow-hidden rounded-full bg-muted grayscale">{% img q.avatar alt=q.name class="h-full w-full object-cover" %}</span>{% endif %}
|
|
<span>
|
|
{% if q.name %}<span class="noir-label block" style="color:hsl(var(--foreground));">{{ q.name }}</span>{% endif %}
|
|
{% if q.role %}<span class="noir-mono block text-sm" style="color:hsl(var(--muted-foreground));">{{ q.role }}</span>{% endif %}
|
|
</span>
|
|
</figcaption>
|
|
</figure>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</section>
|