- Solution pillars (3 cards) : retirer le bloc icône — ne garder que h3 + p - Bento macro : supprimer la tuile grad-bg, rendre l'icône directement en text-brand-b1, watermark passe à grad-text opacity-20 (famille bleu marque, plus visible que white/[0.04]) - Conformité forteresse (4 cards) : supprimer la tuile grad-bg, rendre l'icône en text-brand-b1 - Bumper toutes les icônes bento (landing + fonctionnalites + default macro) et conformité de w-5 h-5 → w-7 h-7 maintenant qu'elles n'ont plus de backdrop - Mettre à jour test_bento_uses_flexihub_styling pour refléter la nouvelle structure (grad-text opacity-20 + text-brand-b1 mb-4 au lieu de white/[0.04] + grad-bg rounded-none) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
18 lines
1.5 KiB
HTML
18 lines
1.5 KiB
HTML
{# Reusable bento card macro. FlexiHub style: dark navy2 surface, decorative watermark number, gradient icon corner.
|
|
`span` controls column span via a static lookup table (Tailwind's content scanner only sees literal class strings,
|
|
so dynamic `col-span-{{ span }}` would produce dead classes — the lookup keeps the utilities discoverable).
|
|
`icon` is rendered via `| safe` so callers can pass either inline SVG markup (preferred) or a plain string.
|
|
The default is a small inline sparkle SVG to avoid any emoji fallback. #}
|
|
{% macro bento_card(number, title, description, icon=None, span='1') %}
|
|
{%- set span_classes = {'1': 'col-span-1', '2': 'sm:col-span-2', '3': 'sm:col-span-2 md:col-span-3'} -%}
|
|
{%- set default_icon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="w-7 h-7" aria-hidden="true"><path d="M12 3l1.8 5.4L19 10l-5.2 1.6L12 17l-1.8-5.4L5 10l5.2-1.6z"/></svg>' -%}
|
|
<div class="relative bg-brand-navy2 p-6 rounded overflow-hidden border border-white/[0.045] {{ span_classes.get(span, 'col-span-1') }}">
|
|
<div class="absolute top-2 right-4 text-[80px] font-black grad-text opacity-20 leading-none" aria-hidden="true">{{ number }}</div>
|
|
<div class="relative">
|
|
<div class="text-brand-b1 mb-4" aria-hidden="true">{{ (icon or default_icon) | safe }}</div>
|
|
<h3 class="text-lg font-bold mb-2 text-white">{{ title | safe }}</h3>
|
|
<p class="text-sm text-white/70">{{ description | safe }}</p>
|
|
</div>
|
|
</div>
|
|
{% endmacro %}
|