{% extends 'base.html.twig' %} {% block title %}Landing Header - Design System - Bubul{% endblock %} {% block body %}
Header de navigation pour la landing page
Le Landing Header est le premier element visible par les visiteurs. Il est transparent par defaut et devient blanc avec blur apres 100px de scroll. Il inclut le logo, la navigation et les actions (login + CTA).
3
Atomes
100px
Seuil scroll
fixed
Position
1
Controller
Atomes utilises
logo-with-text
Bubul + BETA
button
CTA primary
icon
menu hamburger
Exemple de code Twig
{% verbatim %}{% include '_organisms/landing/header.html.twig' with {
loginUrl: path('app_login'),
ctaUrl: '#beta-signup',
ctaLabel: 'Inscrivez-vous à la bêta',
navItems: [
{ label: 'Fonctionnalités', href: '#features' },
{ label: 'Nos outils', href: '#how-it-works' },
{ label: 'Tarifs', href: '#pricing' },
{ label: 'FAQ', href: '#faq' }
]
} only %}{% endverbatim %}
Transparent → Blanc au scroll (seuil 100px)
Stimulus Controller : Le controller shared--landing-header
ajoute/retire la classe .scrolled automatiquement apres 100px de scroll.
Adaptations selon la taille d'ecran
Desktop (lg+)
Nav visible + Connexion
Tablet (sm-lg)
Connexion + Hamburger
Mobile (-sm)
CTA + Hamburger
Options de configuration
| Parametre | Type | Defaut | Description |
|---|---|---|---|
navItems |
array | [] | Array de {label, href} pour la navigation |
loginUrl |
string | '#' | URL du lien Connexion |
ctaUrl |
string | '#beta-signup' | URL du bouton CTA principal |
ctaLabel |
string | 'Inscrivez-vous à la bêta' | Texte du bouton CTA |
Implementation
Le header est en position: fixed pour rester visible lors du scroll.
Apres 100px de scroll, la classe .scrolled est ajoutee pour le fond blanc + blur.
Les liens internes (#) utilisent le smooth scroll avec offset automatique.