{% extends 'base.html.twig' %} {% block title %}Landing Hero - Design System - Bubul{% endblock %} {% block body %}
Section hero principale de la landing page
Le Landing Hero est la section d'accroche principale. Il contient le titre, sous-titre, un bouton CTA et un indicateur de scroll. Le fond utilise un gradient doux avec des blobs animes pour creer une atmosphere moderne et dynamique.
2
Atomes
3
Blobs
4
Animations
100vh
Hauteur
Atomes utilises
button
CTA primary, size xl
icon
scroll indicator (CSS)
Exemple de code Twig
{% verbatim %}{% include '_organisms/landing/hero.html.twig' with {
surtitle: 'BUBUL, METTEZ DU PETILLANT DANS VOS FORMATIONS !',
title: 'Bubul, la plateforme IA qui permet aux formateurs de travailler l\'esprit leger !',
subtitle: 'Des bulles d\'IA au service de votre enseignement. Moodia pour vos cours Moodle complets...',
ctaUrl: '#beta-signup',
ctaLabel: 'Inscrivez-vous a la beta'
} only %}{% endverbatim %}
Representation visuelle du composant
SURTITLE
Sous-titre avec description et possibilite d'utiliser du HTML.
{% include '_atoms/button/button.html.twig' with { label: 'CTA Button', href: '#', variant: 'primary', size: 'lg' } only %}Effets d'animation CSS
3 blobs avec animations @keyframes differentes (floatBlob1, floatBlob2, floatBlob3) de 20-30 secondes.
Le contenu apparait avec un effet fadeInUp avec delais progressifs (0, 200ms, 400ms, 600ms).
L'indicateur de scroll utilise une animation bounce lente de 2 secondes.
Les blobs utilisent filter: blur(100px) pour un effet doux et moderne.
Adaptations selon la taille d'ecran
Desktop (lg+)
Titre 3.5rem, blobs 500-700px
Tablet (md-lg)
Titre 3rem, blobs 300-400px
Mobile (-md)
Titre 2.25rem, blobs 180-250px
| Blob | Desktop | Tablet | Mobile |
|---|---|---|---|
| Blob 1 (haut-droite) | 700px | 400px | 250px |
| Blob 2 (bas-gauche) | 600px | 350px | 200px |
| Blob 3 (centre) | 500px | 300px | 180px |
Options de configuration
| Parametre | Type | Defaut | Description |
|---|---|---|---|
surtitle |
string | '' | Texte au-dessus du titre (uppercase, tracking wide) |
title |
string | '' | Titre principal (h1) |
subtitle |
string | '' | Sous-titre (HTML autorise avec |raw) |
ctaUrl |
string | '#beta-signup' | URL du bouton CTA |
ctaLabel |
string | 'Inscrivez-vous a la beta' | Texte du bouton CTA |
showScroll |
bool | true | Afficher l'indicateur de scroll |
class |
string | '' | Classes CSS additionnelles sur la section |
Implementation
Le hero occupe 100% de la hauteur du viewport pour un impact visuel maximal.
Background (z-0) → Blobs (z-0) → Contenu (z-10) pour une superposition correcte.
Les animations CSS (@keyframes) sont definies dans une balise <style> directement dans le composant pour l'encapsulation.
Le parametre subtitle utilise |raw pour permettre le HTML (balises <strong>, etc.).