{# # ============================================================================ # ORGANISM: CHOICE PAGE # ============================================================================ # # Page « comment voulez-vous commencer ? » : en-tête centré, cartes de méthode, # bouton de retour. Gabarit commun aux pages de création des outils. # # ============================================================================ # COMPOSITION # ============================================================================ # # - _atoms/icon/icon.html.twig # - _organisms/choice-card/choice-card.html.twig # - _atoms/button/button.html.twig (variant: back) # # ============================================================================ # PARAMÈTRES # ============================================================================ # # | Paramètre | Type | Défaut | Description | # |-----------|--------|-----------|----------------------------------------------| # | icon | string | (requis) | Nom d'atome de l'outil | # | color | object | null | Entrée de tool_color_details | # | title | string | (requis) | Titre de la page | # | subtitle | string | null | Sous-titre | # | choices | array | (requis) | Jeux de paramètres de choice-card | # | backLabel | string | 'Retour' | Libellé du bouton de retour | # | backHref | string | (requis) | Cible du bouton de retour | # | class | string | (voir ci-dessous) | Classes du conteneur | # # ============================================================================ # EXEMPLES D'UTILISATION # ============================================================================ # # {% include '_organisms/choice-page/choice-page.html.twig' with { # icon: 'bubul-slidia', color: tool_color_details['slidia'], # title: 'Créez votre présentation', # subtitle: 'Choisissez votre méthode.', # choices: [ # { title: 'Importer un document', description: '…', icon: 'document', color: 'primary', # features: [{ text: 'Structure automatique' }], href: path('app_slidia_configure', {method: 'pdf'}) } # ], # backLabel: 'Retour à mes présentations', backHref: path('app_slidia') # } only %} # # ============================================================================ #} {% set color = color ?? null %} {% set subtitle = subtitle ?? null %} {% set backLabel = backLabel ?? 'Retour' %} {% set class = class ?? 'min-h-screen max-w-6xl mx-auto px-4 sm:px-6 py-4 lg:py-8' %} {% set columns = choices|length >= 3 ? 'lg:grid-cols-3' : (choices|length == 2 ? 'lg:grid-cols-2' : 'lg:grid-cols-1') %}
{{ subtitle }}
{% endif %}