🌅 HérosGratuit · 0 NahnahPar NAHNAH AI
Héros plein écran voilé
Photo en plein écran sous un voile réglable, texte placé à gauche, au centre ou en bas, avec un zoom lent facultatif.
Aperçu en direct
Données de démonstration (produits, menus, textes d’exemple) : dans ta boutique, ce sont les tiennes.
Code à copier
Fichier complet sections/nahnah-hero-plein-ecran.liquid (Liquid, CSS et JS inclus).
{%- comment -%} NAHNAH AI · Héros plein écran voilé (bibliothèque Sections & effets) {%- endcomment -%}
<div class="nn-hero-plein-ecran" style="--nn-mh: {{ section.settings.marge_haut }}px; --nn-mb: {{ section.settings.marge_bas }}px; --nn-fond: {{ section.settings.couleur_fond }}; --nn-texte: {{ section.settings.couleur_texte }}; --nn-accent: {{ section.settings.couleur_accent }}; --nn-bouton: {{ section.settings.couleur_bouton }}; --nn-texte-bouton: {{ section.settings.couleur_texte_bouton }}; --nn-voile: {{ section.settings.voile | divided_by: 100.0 }};">
<div class="nn-hero-plein-ecran__cadre nn-hero-plein-ecran--h-{{ section.settings.hauteur }} nn-hero-plein-ecran--pos-{{ section.settings.position }}{% if section.settings.zoom %} nn-hero-plein-ecran--zoom{% endif %}">
<div class="nn-hero-plein-ecran__media{% if section.settings.image_mobile != blank %} nn-hero-plein-ecran__media--double{% endif %}">
{%- if section.settings.image != blank -%}
{{ section.settings.image | image_url: width: 1600 | image_tag: class: 'nn-hero-plein-ecran__img', sizes: '100vw', widths: '600, 900, 1200, 1600', loading: 'eager' }}
{%- else -%}
{{ 'hero-apparel-1' | placeholder_svg_tag: 'nn-hero-plein-ecran__img nn-hero-plein-ecran__img--vide' }}
{%- endif -%}
{%- if section.settings.image_mobile != blank -%}
{{ section.settings.image_mobile | image_url: width: 900 | image_tag: class: 'nn-hero-plein-ecran__img nn-hero-plein-ecran__img--mobile', sizes: '100vw', widths: '450, 750, 900', loading: 'eager' }}
{%- endif -%}
</div>
<div class="nn-hero-plein-ecran__voile" aria-hidden="true"></div>
<div class="nn-hero-plein-ecran__contenu">
{%- if section.settings.surtitre != blank -%}
<p class="nn-hero-plein-ecran__surtitre">{{ section.settings.surtitre | escape }}</p>
{%- endif -%}
{%- if section.settings.titre != blank -%}
<h2 class="nn-hero-plein-ecran__titre">{{ section.settings.titre }}</h2>
{%- endif -%}
{%- if section.settings.texte != blank -%}
<div class="nn-hero-plein-ecran__texte">{{ section.settings.texte }}</div>
{%- endif -%}
{%- if section.settings.bouton_texte != blank or section.settings.bouton2_texte != blank -%}
<div class="nn-hero-plein-ecran__boutons">
{%- if section.settings.bouton_texte != blank -%}
<a class="nn-hero-plein-ecran__bouton" href="{{ section.settings.bouton_lien | default: routes.all_products_collection_url }}">{{ section.settings.bouton_texte | escape }}</a>
{%- endif -%}
{%- if section.settings.bouton2_texte != blank -%}
<a class="nn-hero-plein-ecran__bouton nn-hero-plein-ecran__bouton--second" href="{{ section.settings.bouton2_lien | default: routes.collections_url }}">{{ section.settings.bouton2_texte | escape }}</a>
{%- endif -%}
</div>
{%- endif -%}
</div>
</div>
</div>
{% schema %}
{
"name": "Héros plein écran voilé",
"tag": "section",
"class": "nn-section-hero-plein-ecran",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image (ordinateur)"
},
{
"type": "image_picker",
"id": "image_mobile",
"label": "Image mobile (facultative)"
},
{
"type": "range",
"id": "voile",
"label": "Opacité du voile",
"min": 0,
"max": 90,
"step": 5,
"default": 45,
"unit": "%"
},
{
"type": "checkbox",
"id": "zoom",
"label": "Zoom lent sur l’image",
"default": true
},
{
"type": "select",
"id": "hauteur",
"label": "Hauteur",
"options": [
{
"value": "petite",
"label": "Petite"
},
{
"value": "moyenne",
"label": "Moyenne"
},
{
"value": "grande",
"label": "Grande"
},
{
"value": "ecran",
"label": "Plein écran"
}
],
"default": "grande"
},
{
"type": "select",
"id": "position",
"label": "Position du texte",
"options": [
{
"value": "gauche",
"label": "Gauche"
},
{
"value": "centre",
"label": "Centre"
},
{
"value": "bas",
"label": "En bas à gauche"
}
],
"default": "gauche"
},
{
"type": "text",
"id": "surtitre",
"label": "Sur-titre (vide : masqué)",
"default": "Nouvelle saison"
},
{
"type": "inline_richtext",
"id": "titre",
"label": "Titre",
"default": "Le style qui accompagne tes journées"
},
{
"type": "richtext",
"id": "texte",
"label": "Texte",
"default": "<p>Des pièces faciles à porter, choisies avec soin et expédiées rapidement.</p>"
},
{
"type": "header",
"content": "Boutons"
},
{
"type": "text",
"id": "bouton_texte",
"label": "Texte du bouton (vide : masqué)",
"default": "Voir les nouveautés"
},
{
"type": "url",
"id": "bouton_lien",
"label": "Lien du bouton (vide : tous les produits)"
},
{
"type": "text",
"id": "bouton2_texte",
"label": "Texte du bouton secondaire (vide : masqué)",
"default": "Toutes les collections"
},
{
"type": "url",
"id": "bouton2_lien",
"label": "Lien du bouton secondaire (vide : collections)"
},
{
"type": "header",
"content": "Couleurs"
},
{
"type": "color",
"id": "couleur_fond",
"label": "Fond",
"default": "#0B1220"
},
{
"type": "color",
"id": "couleur_texte",
"label": "Texte",
"default": "#FFFFFF"
},
{
"type": "color",
"id": "couleur_accent",
"label": "Accent",
"default": "#2EE6A8"
},
{
"type": "color",
"id": "couleur_bouton",
"label": "Bouton",
"default": "#FFFFFF"
},
{
"type": "color",
"id": "couleur_texte_bouton",
"label": "Texte du bouton",
"default": "#0B1220"
},
{
"type": "header",
"content": "Espacement"
},
{
"type": "range",
"id": "marge_haut",
"label": "Marge haute",
"min": 0,
"max": 120,
"step": 4,
"unit": "px",
"default": 0
},
{
"type": "range",
"id": "marge_bas",
"label": "Marge basse",
"min": 0,
"max": 120,
"step": 4,
"unit": "px",
"default": 0
}
],
"presets": [
{
"name": "Héros plein écran voilé"
}
]
}
{% endschema %}
{% stylesheet %}
.nn-hero-plein-ecran {
position: relative;
display: block;
padding: var(--nn-mh) 0 var(--nn-mb);
background: var(--nn-fond);
color: var(--nn-texte);
overflow-x: clip;
}
.nn-hero-plein-ecran *, .nn-hero-plein-ecran *::before, .nn-hero-plein-ecran *::after { box-sizing: border-box; }
.nn-hero-plein-ecran :where(a, button):focus-visible { outline: 3px solid var(--nn-accent); outline-offset: 3px; }
.nn-hero-plein-ecran__surtitre { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nn-accent); }
.nn-hero-plein-ecran__titre { margin: 0 0 16px; font-size: clamp(32px, 6vw, 60px); line-height: 1.08; letter-spacing: -0.02em; overflow-wrap: anywhere; color: inherit; }
.nn-hero-plein-ecran__texte { margin: 0 0 28px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; opacity: 0.88; max-width: 560px; }
.nn-hero-plein-ecran__texte p { margin: 0 0 0.6em; }
.nn-hero-plein-ecran__boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.nn-hero-plein-ecran__bouton {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 48px;
max-width: 100%;
padding: 14px 28px;
border-radius: var(--nn-arrondi-bouton, 8px);
background: var(--nn-bouton);
color: var(--nn-texte-bouton);
font-size: 16px;
font-weight: 700;
line-height: 1.2;
text-align: center;
text-decoration: none;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.nn-hero-plein-ecran__bouton--second { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
@media (hover: hover) {
.nn-hero-plein-ecran__bouton:hover { transform: translateY(-2px); box-shadow: 0 12px 26px color-mix(in srgb, var(--nn-bouton) 35%, transparent); }
.nn-hero-plein-ecran__bouton--second:hover { box-shadow: inset 0 0 0 2px currentColor, 0 12px 26px rgba(0, 0, 0, 0.12); }
}
.nn-hero-plein-ecran__vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nn-hero-plein-ecran__cadre { position: relative; display: flex; isolation: isolate; overflow: hidden; }
.nn-hero-plein-ecran--h-petite { min-height: 380px; }
.nn-hero-plein-ecran--h-moyenne { min-height: clamp(440px, 62vh, 620px); }
.nn-hero-plein-ecran--h-grande { min-height: clamp(520px, 80vh, 780px); }
.nn-hero-plein-ecran--h-ecran { min-height: 100vh; min-height: 100svh; }
.nn-hero-plein-ecran__media { position: absolute; inset: 0; z-index: -2; }
.nn-hero-plein-ecran__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nn-hero-plein-ecran__img--mobile { display: none; }
@media (max-width: 749px) {
.nn-hero-plein-ecran__media--double .nn-hero-plein-ecran__img:not(.nn-hero-plein-ecran__img--mobile) { display: none; }
.nn-hero-plein-ecran__media--double .nn-hero-plein-ecran__img--mobile { display: block; }
}
.nn-hero-plein-ecran--zoom .nn-hero-plein-ecran__img { animation: nn-hero-plein-ecran-zoom 18s ease-out both; }
@keyframes nn-hero-plein-ecran-zoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.nn-hero-plein-ecran__voile { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, var(--nn-fond)); opacity: var(--nn-voile); }
.nn-hero-plein-ecran__voile::before { content: ""; position: absolute; inset: 0; background: var(--nn-fond); opacity: 0.6; }
.nn-hero-plein-ecran__contenu { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(40px, 8vw, 96px) 16px; animation: nn-hero-plein-ecran-entree 0.9s ease both; }
@media (min-width: 750px) { .nn-hero-plein-ecran__contenu { padding-inline: 32px; } }
.nn-hero-plein-ecran--pos-gauche { align-items: center; }
.nn-hero-plein-ecran--pos-gauche .nn-hero-plein-ecran__contenu > * { max-width: 620px; }
.nn-hero-plein-ecran--pos-centre { align-items: center; text-align: center; }
.nn-hero-plein-ecran--pos-centre .nn-hero-plein-ecran__texte { margin-inline: auto; }
.nn-hero-plein-ecran--pos-centre .nn-hero-plein-ecran__boutons { justify-content: center; }
.nn-hero-plein-ecran--pos-bas { align-items: flex-end; }
.nn-hero-plein-ecran--pos-bas .nn-hero-plein-ecran__contenu > * { max-width: 680px; }
.nn-hero-plein-ecran__titre { font-size: clamp(36px, 7vw, 76px); text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25); }
@keyframes nn-hero-plein-ecran-entree { from { transform: translateY(24px); } }
@media (prefers-reduced-motion: reduce) {
.nn-hero-plein-ecran, .nn-hero-plein-ecran *, .nn-hero-plein-ecran *::before, .nn-hero-plein-ecran *::after {
animation: none !important;
transition: none !important;
}
}
{% endstylesheet %}
Licence NAHNAH AI : utilisation libre dans tes boutiques (y compris commerciales), modification permise, revente de l’élément seul interdite.
Installer dans ma boutique
En un clic, la section est ajoutée à un thème de ta boutique Shopify connectée (un thème non publié par défaut).
Chargement de tes boutiques…
Installer dans Shopify
- Dans Shopify : Boutique en ligne → Thèmes → bouton « … » du thème → Modifier le code.
- Dossier « sections » → « Ajouter une section » (ou « Nouveau fichier ») → nomme-la « nahnah-hero-plein-ecran ».
- Efface le contenu proposé, colle le code de l’onglet Liquid (fichier complet), puis Enregistrer.
- Ouvre Personnaliser → Ajouter une section → choisis-la, règle les textes et les couleurs, puis Enregistrer.
Installer via le MCP
Depuis Claude, Claude Code ou ChatGPT connecté à NAHNAH AI, demande : « Donne-moi le code de l’élément hero-plein-ecran de la bibliothèque NAHNAH AI et les étapes pour l’installer ». L’assistant récupère le code et les étapes (outil obtenir_code_element), gratuitement.
Boutique connectée à NAHNAH AI : l’assistant peut aussi l’installer directement (outil installer_element).
Connecter le MCP