{# # ============================================================================ # ORGANISM: FEATURES ALTERNATING # ============================================================================ # # Section features avec disposition alternée texte/visuel. # Chaque feature alterne gauche/droite. Support placeholder ou vraie image. # # ============================================================================ # PARAMÈTRES # ============================================================================ # # | Paramètre | Type | Défaut | Description | # |-----------|-------|--------|------------------------------------------------| # | features | array | [] | Liste des features (voir structure ci-dessous) | # | class | string| '' | Classes additionnelles sur la section | # | id | string| 'features' | Ancre HTML | # # ============================================================================ # STRUCTURE D'UNE FEATURE (features[]) # ============================================================================ # # | Clé | Type | Description | # |----------------|--------|-----------------------------------------------| # | tagLabel | string | Étiquette mono en haut (ex: 'Création flexible')| # | titleHtml | string | H3 avec HTML autorisé (em.serif pour italique)| # | desc | string | Paragraphe descriptif | # | bullets | array | Liste de strings pour les points clés | # | stat | object | {val: '36×', text: 'plus rapide...'} optionnel| # | icon | string | Nom de l'icône Solar pour le placeholder | # | iconColor | string | Couleur token pour l'icône (ex: 'primary') | # | screenshotNote | string | Texte du placeholder (si pas d'image) | # | image | string | Chemin image réelle (null = placeholder) | # | imageAlt | string | Texte alt SEO | # | accentColor | string | Couleur hex d'accent (défaut: '#1281E4') | # # ============================================================================ #} {% set features = features ?? [] %} {% set class = class ?? '' %} {% set id = id ?? 'features' %} {% set sectionStyle = sectionStyle ?? '' %}
{% for feature in features %} {% set accent = feature.accentColor ?? '#1281E4' %} {% set isReversed = loop.index is even %}
{# Text block #}
{# Tag label — couleur dynamique via customColor #} {% if feature.tagLabel is defined and feature.tagLabel %}
{% include '_atoms/badge/badge.html.twig' with { label: feature.tagLabel, customColor: accent, dot: true, size: 'sm', rounded: 'full' } only %}
{% endif %} {# Title #} {% if feature.titleHtml is defined and feature.titleHtml %}

{{ feature.titleHtml|raw }}

{% endif %} {# Description #} {% if feature.desc is defined and feature.desc %}

{{ feature.desc }}

{% endif %} {# Bullet points #} {% if feature.bullets is defined and feature.bullets|length > 0 %}
    {% for bullet in feature.bullets %}
  • {{ bullet }}
  • {% endfor %}
{% endif %} {# Optional stat #} {% if feature.stat is defined and feature.stat %}
{% if feature.stat.before is defined %} {# Before/after design #}
{{ feature.stat.label ?? '' }}
{# Avant #}
Avant {{ feature.stat.before }}
{# Séparateur central avec badge #}
{{ feature.stat.val }}
{# Après #}
Après {{ feature.stat.after }}
{% else %} {# Simple stat design #}
{{ feature.stat.label ?? '' }}
{{ feature.stat.val }} {{ feature.stat.text|raw }}
{% endif %}
{% endif %}
{# Visual block #}
{% if feature.visualHtml is defined and feature.visualHtml %} {{ feature.visualHtml|raw }} {% elseif feature.image is defined and feature.image %}
{{ feature.imageAlt ?? '' }}
{% else %}
{% if feature.icon is defined and feature.icon %} {% include '_atoms/icon/icon.html.twig' with { name: feature.icon, size: '5xl', color: feature.iconColor ?? 'primary' } only %} {% endif %} {% if feature.screenshotNote is defined and feature.screenshotNote %} {{ feature.screenshotNote }} {% endif %} Votre screenshot ici
{% endif %}
{% endfor %}