refactor(ui): éliminer tous les emojis (SVG inline + texte propre, look pro/moderne)
Pass de modernisation visuelle : remplacement de TOUS les emojis Unicode dans les templates marketing/legal/billing/auth par des SVG inline (style heroicons) ou par du texte propre, pour un look SaaS pro à la Linear/Vercel/Stripe. Mapping principal : - ✓ / ✗ / ⚠ → SVG check / x / triangle (text-brand-b3 / red / amber) - → / ← / ↗ → SVG arrow-right / arrow-left / arrow-up-right - 🍁 / 🏛️ / ⚖️ / 🔓 → SVG map-pin / building / scale / code-brackets - 🎙️ / 👥 / 📝 / 💬 / 📄 / 🔌 → 6 SVG bento icons (microphone, users, doc, chat, export, plug) - ✉️ / ☎️ / 📬 → SVG envelope / phone / map-pin - ↺ → SVG refresh-counter-clockwise - ★ → SVG star (RECOMMANDÉ badge) - 🎯/🏢/📺/🤝/📰 → SVG target / office / play / handshake / news (raccourcis contact) - ⚖️/📊/🏛️ (testimonials) → SVG scale / bar-chart / building - ✦ (default bento icon) → SVG sparkle inline Tous les SVG utilisent stroke="currentColor" pour héritage Tailwind text-*. Les SVG informationnels du tableau comparatif portent un aria-label sémantique (Conforme/Non conforme/Partiel) ; les SVG décoratifs portent aria-hidden. Tests : - 18/18 legal pages passent (test_legal_pages.py) - test_comparatif_check_marks_consistently_mean_good ajusté pour asserter sur les aria-label SVG plutôt que les caractères ✓/✗ - 4 échecs pré-existants non liés (manque /blog dans nav, SOC 2 hedge dans conformite.html, gitea.innova-ai.ca url) — confirmés présents avant ce commit Fichiers modifiés (14) : - templates/macros/{bento,pricing_card}.html (sources de vérité) - templates/marketing/{base,_footer,landing,fonctionnalites,tarifs,conformite,contact}.html - templates/legal/{_layout,index}.html - templates/billing/{cancel,success}.html - tests/test_marketing_landing_template.py (assert sur aria-label) Audit final : 0 emoji restant dans les fichiers in-scope ; 0 emoji dans le HTML rendu de toutes les pages marketing/legal vérifiées. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
{# 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). #}
|
||||
{% macro bento_card(number, title, description, icon='✦', span='1') %}
|
||||
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-5 h-5 text-white" 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 text-white/[0.04]" aria-hidden="true">{{ number }}</div>
|
||||
<div class="relative">
|
||||
<div class="w-10 h-10 grad-bg rounded-none mb-4 flex items-center justify-center text-lg">{{ icon }}</div>
|
||||
<div class="w-10 h-10 grad-bg rounded-none mb-4 flex items-center justify-center text-white" 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>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
(verified: "DictIA 8", "DictIA 16", "DictIA Cloud" are all entity-free). #}
|
||||
{%- macro pricing_card(slug, name, price_setup, price_monthly, target, features, recommended=False, cta_url='/checkout') -%}
|
||||
<div class="relative {% if recommended %}grad-bg p-[1.5px] rounded{% endif %}">
|
||||
{% if recommended %}<span class="absolute -top-3 left-1/2 -translate-x-1/2 grad-bg text-white text-xs font-bold px-3 py-1 rounded-full shadow-cta">★ RECOMMANDÉ</span>{% endif %}
|
||||
{% if recommended %}<span class="absolute -top-3 left-1/2 -translate-x-1/2 grad-bg text-white text-xs font-bold px-3 py-1 rounded-full shadow-cta inline-flex items-center gap-1.5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="w-3 h-3" aria-hidden="true"><path d="M12 2l2.9 6.9L22 10l-5.5 4.8L18 22l-6-3.6L6 22l1.5-7.2L2 10l7.1-1.1z"/></svg>RECOMMANDÉ</span>{% endif %}
|
||||
<div class="bg-white p-8 rounded border border-brand-border h-full flex flex-col">
|
||||
<div class="mb-6">
|
||||
<h3 class="text-xl font-black mb-1 text-brand-navy">{{ name | safe }}</h3>
|
||||
@@ -29,7 +29,7 @@
|
||||
<ul class="space-y-3 mb-8 flex-grow">
|
||||
{% for f in features %}
|
||||
<li class="flex items-start gap-2 text-sm text-brand-navy/80">
|
||||
<span class="grad-text font-black flex-shrink-0" aria-hidden="true">✓</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4 mt-0.5 flex-shrink-0 text-brand-b3" aria-hidden="true"><path d="M5 13l4 4L19 7"/></svg>
|
||||
<span>{{ f | safe }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user