{# # ============================================================================ # MOLECULE: SECTION HEADER # ============================================================================ # # Titre de section simple et élégant. # Utilisé pour délimiter les sections de contenu. # # ============================================================================ # COMPOSITION (Atomes utilisés) # ============================================================================ # # - Aucun (composant autonome) # # ============================================================================ # PARAMÈTRES # ============================================================================ # # | Paramètre | Type | Défaut | Description | # |---------------|---------|-----------|-----------------------------------| # | title | string | (requis) | Titre de la section | # | size | string | 'md' | sm, md, lg | # | class | string | '' | Classes additionnelles | # # ============================================================================ # EXEMPLES D'UTILISATION # ============================================================================ # # Simple: # {% include '_molecules/section-header/section-header.html.twig' with { # title: 'Activités & Contrats' # } %} # # Grande taille: # {% include '_molecules/section-header/section-header.html.twig' with { # title: 'Informations générales', # size: 'lg' # } %} # # ============================================================================ #} {# ============================================================================ CONFIGURATION DES VALEURS PAR DÉFAUT ============================================================================ #} {% set title = title ?? 'Section' %} {% set size = size ?? 'md' %} {% set class = class ?? '' %} {# ============================================================================ CLASSES TAILWIND ============================================================================ #} {% set sizeConfig = { 'sm': 'text-lg', 'md': 'text-xl', 'lg': 'text-2xl' } %} {% set textSize = sizeConfig[size] ?? sizeConfig['md'] %} {# ============================================================================ RENDU HTML ============================================================================ #}

{{ title }}