{# # ============================================================================ # ATOM: LOGO WITH TEXT # ============================================================================ # # Logo Bubul avec texte et badge BETA - 100% Tailwind CSS # # ============================================================================ # PARAMÈTRES # ============================================================================ # # | Paramètre | Type | Défaut | Description | # |-----------|--------|--------|------------------------------------------| # | showIcon | bool | true | Afficher l'icône SVG | # | showText | bool | true | Afficher le texte "Bubul" | # | showBadge | bool | true | Afficher le badge "BETA" | # | size | string | 'md' | Taille: sm, md, lg, xl | # | inline | bool | false | Version inline (pour titres) | # # ============================================================================ # EXEMPLES D'UTILISATION # ============================================================================ # # Complet: # {% include '_atoms/logo/logo-with-text.html.twig' %} # # Sans badge: # {% include '_atoms/logo/logo-with-text.html.twig' with { showBadge: false } %} # # Texte seul inline: # {% include '_atoms/logo/logo-with-text.html.twig' with { showIcon: false, inline: true } %} # # ============================================================================ #} {% set showIcon = showIcon ?? true %} {% set showText = showText ?? true %} {% set showBadge = showBadge ?? true %} {% set size = size ?? 'md' %} {% set inline = inline ?? false %} {% set subtitle = subtitle ?? null %} {% set variant = variant ?? 'bubul' %} {% set disabled = disabled ?? false %} {% set isSamVariant = variant == 'sam' %} {# ============================================================================ CLASSES TAILWIND - TAILLES ============================================================================ #} {% set iconSizes = { 'sm': 'w-6 h-6', 'md': 'w-8 h-8', 'lg': 'w-10 h-10', 'xl': 'w-12 h-12', '2xl': 'w-24 h-24' } %} {% set textSizes = { 'sm': 'text-lg', 'md': 'text-xl', 'lg': 'text-2xl', 'xl': 'text-3xl' } %} {% set badgeSizes = { 'sm': 'text-[8px] px-1 py-0.5', 'md': 'text-[10px] px-1.5 py-0.5', 'lg': 'text-xs px-2 py-1', 'xl': 'text-sm px-2.5 py-1' } %} {# ============================================================================ RENDU HTML ============================================================================ #} {% set containerTag = inline ? 'span' : 'div' %} {% set baseClass = inline ? 'inline-flex items-center gap-1.5' : 'flex items-center gap-2' %} {% set containerClass = baseClass ~ (disabled ? ' grayscale opacity-40' : '') %} <{{ containerTag }} class="{{ containerClass }}"> {# Icône : Bubul simple avec tinte cohorts pour SAM, neutre pour Bubul #} {% if showIcon %} {% include '_atoms/logo/logo.html.twig' with { variant: 'simple', size: size, tint: isSamVariant ? 'cohorts' : null } only %} {% endif %} {# Bloc texte : nom + sous-titre optionnel #} {% if showText %} {% set gradientClasses = isSamVariant ? 'bg-gradient-to-r from-gradient-cohorts-start via-gradient-cohorts-middle to-gradient-cohorts-end bg-clip-text text-transparent' : 'bg-gradient-to-r from-gradient-start via-gradient-middle to-gradient-end bg-clip-text text-transparent' %} {% set brandName = isSamVariant ? 'SAM' : 'Bubul' %} {% if subtitle %}