🌅 HérosGratuit · 0 NahnahPar NAHNAH AI
Héros mosaïque 3 images
Titre centré au-dessus de trois images en triptyque (celle du centre plus haute) qui apparaissent en cascade ; léger zoom au survol.
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-mosaique-trois.liquid (Liquid, CSS et JS inclus).
{%- comment -%} NAHNAH AI · Héros mosaïque 3 images (bibliothèque Sections & effets) {%- endcomment -%}
<div class="nn-hero-mosaique-trois" 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-arrondi: {{ section.settings.arrondi }}px;">
<div class="nn-hero-mosaique-trois__cadre">
<div class="nn-hero-mosaique-trois__contenu">
{%- if section.settings.surtitre != blank -%}
<p class="nn-hero-mosaique-trois__surtitre">{{ section.settings.surtitre | escape }}</p>
{%- endif -%}
{%- if section.settings.titre != blank -%}
<h2 class="nn-hero-mosaique-trois__titre">{{ section.settings.titre }}</h2>
{%- endif -%}
{%- if section.settings.texte != blank -%}
<div class="nn-hero-mosaique-trois__texte">{{ section.settings.texte }}</div>
{%- endif -%}
{%- if section.settings.bouton_texte != blank or section.settings.bouton2_texte != blank -%}
<div class="nn-hero-mosaique-trois__boutons">
{%- if section.settings.bouton_texte != blank -%}
<a class="nn-hero-mosaique-trois__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-mosaique-trois__bouton nn-hero-mosaique-trois__bouton--second" href="{{ section.settings.bouton2_lien | default: routes.collections_url }}">{{ section.settings.bouton2_texte | escape }}</a>
{%- endif -%}
</div>
{%- endif -%}
</div>
<div class="nn-hero-mosaique-trois__images">
<div class="nn-hero-mosaique-trois__case nn-hero-mosaique-trois__case--1">
{%- if section.settings.image_1 != blank -%}
{{ section.settings.image_1 | image_url: width: 1600 | image_tag: class: 'nn-hero-mosaique-trois__img', sizes: '(min-width: 750px) 33vw, 33vw', widths: '600, 900, 1200, 1600' }}
{%- else -%}
{{ 'lifestyle-1' | placeholder_svg_tag: 'nn-hero-mosaique-trois__img nn-hero-mosaique-trois__img--vide' }}
{%- endif -%}
</div>
<div class="nn-hero-mosaique-trois__case nn-hero-mosaique-trois__case--2">
{%- if section.settings.image_2 != blank -%}
{{ section.settings.image_2 | image_url: width: 1600 | image_tag: class: 'nn-hero-mosaique-trois__img', sizes: '(min-width: 750px) 33vw, 33vw', widths: '600, 900, 1200, 1600', loading: 'eager' }}
{%- else -%}
{{ 'lifestyle-2' | placeholder_svg_tag: 'nn-hero-mosaique-trois__img nn-hero-mosaique-trois__img--vide' }}
{%- endif -%}
</div>
<div class="nn-hero-mosaique-trois__case nn-hero-mosaique-trois__case--3">
{%- if section.settings.image_3 != blank -%}
{{ section.settings.image_3 | image_url: width: 1600 | image_tag: class: 'nn-hero-mosaique-trois__img', sizes: '(min-width: 750px) 33vw, 33vw', widths: '600, 900, 1200, 1600' }}
{%- else -%}
{{ 'lifestyle-1' | placeholder_svg_tag: 'nn-hero-mosaique-trois__img nn-hero-mosaique-trois__img--vide' }}
{%- endif -%}
</div>
</div>
</div>
</div>
{% schema %}
{
"name": "Héros mosaïque 3 images",
"tag": "section",
"class": "nn-section-hero-mosaique-trois",
"settings": [
{
"type": "text",
"id": "surtitre",
"label": "Sur-titre (vide : masqué)",
"default": "Lookbook"
},
{
"type": "inline_richtext",
"id": "titre",
"label": "Titre",
"default": "Trois façons de le porter"
},
{
"type": "richtext",
"id": "texte",
"label": "Texte",
"default": "<p>Inspire-toi de nos associations préférées, puis compose la tienne.</p>"
},
{
"type": "header",
"content": "Boutons"
},
{
"type": "text",
"id": "bouton_texte",
"label": "Texte du bouton (vide : masqué)",
"default": "Voir le lookbook"
},
{
"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": "Toute la boutique"
},
{
"type": "url",
"id": "bouton2_lien",
"label": "Lien du bouton secondaire (vide : collections)"
},
{
"type": "header",
"content": "Images"
},
{
"type": "image_picker",
"id": "image_1",
"label": "Image de gauche"
},
{
"type": "image_picker",
"id": "image_2",
"label": "Image du centre"
},
{
"type": "image_picker",
"id": "image_3",
"label": "Image de droite"
},
{
"type": "range",
"id": "arrondi",
"label": "Arrondi des images",
"min": 0,
"max": 40,
"step": 2,
"default": 20,
"unit": "px"
},
{
"type": "header",
"content": "Couleurs"
},
{
"type": "color",
"id": "couleur_fond",
"label": "Fond",
"default": "#FFF8F1"
},
{
"type": "color",
"id": "couleur_texte",
"label": "Texte",
"default": "#2A1E17"
},
{
"type": "color",
"id": "couleur_accent",
"label": "Accent",
"default": "#D9653B"
},
{
"type": "color",
"id": "couleur_bouton",
"label": "Bouton",
"default": "#2A1E17"
},
{
"type": "color",
"id": "couleur_texte_bouton",
"label": "Texte du bouton",
"default": "#FFFFFF"
},
{
"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 mosaïque 3 images"
}
]
}
{% endschema %}
{% stylesheet %}
.nn-hero-mosaique-trois {
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-mosaique-trois *, .nn-hero-mosaique-trois *::before, .nn-hero-mosaique-trois *::after { box-sizing: border-box; }
.nn-hero-mosaique-trois :where(a, button):focus-visible { outline: 3px solid var(--nn-accent); outline-offset: 3px; }
.nn-hero-mosaique-trois__surtitre { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nn-accent); }
.nn-hero-mosaique-trois__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-mosaique-trois__texte { margin: 0 0 28px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; opacity: 0.88; max-width: 560px; }
.nn-hero-mosaique-trois__texte p { margin: 0 0 0.6em; }
.nn-hero-mosaique-trois__boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.nn-hero-mosaique-trois__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-mosaique-trois__bouton--second { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
@media (hover: hover) {
.nn-hero-mosaique-trois__bouton:hover { transform: translateY(-2px); box-shadow: 0 12px 26px color-mix(in srgb, var(--nn-bouton) 35%, transparent); }
.nn-hero-mosaique-trois__bouton--second:hover { box-shadow: inset 0 0 0 2px currentColor, 0 12px 26px rgba(0, 0, 0, 0.12); }
}
.nn-hero-mosaique-trois__vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nn-hero-mosaique-trois__cadre { max-width: 1240px; margin: 0 auto; padding: clamp(48px, 8vw, 110px) 16px; text-align: center; }
@media (min-width: 750px) { .nn-hero-mosaique-trois__cadre { padding-inline: 32px; } }
.nn-hero-mosaique-trois__contenu { max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.nn-hero-mosaique-trois__texte { margin-inline: auto; }
.nn-hero-mosaique-trois__boutons { justify-content: center; }
.nn-hero-mosaique-trois__images { display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: clamp(8px, 2vw, 24px); }
.nn-hero-mosaique-trois__case { position: relative; min-width: 0; overflow: hidden; border-radius: var(--nn-arrondi); background: color-mix(in srgb, var(--nn-texte) 8%, transparent); aspect-ratio: 3 / 4; animation: nn-hero-mosaique-trois-monte 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.nn-hero-mosaique-trois__case--2 { aspect-ratio: 3 / 4.6; animation-delay: 0.12s; }
.nn-hero-mosaique-trois__case--3 { animation-delay: 0.24s; }
.nn-hero-mosaique-trois__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes nn-hero-mosaique-trois-monte { from { transform: translateY(40px); opacity: 0; } }
@media (hover: hover) { .nn-hero-mosaique-trois__case:hover .nn-hero-mosaique-trois__img { transform: scale(1.06); } }
.nn-hero-mosaique-trois__bouton { border-radius: 999px; }
@media (prefers-reduced-motion: reduce) {
.nn-hero-mosaique-trois, .nn-hero-mosaique-trois *, .nn-hero-mosaique-trois *::before, .nn-hero-mosaique-trois *::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-mosaique-trois ».
- 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-mosaique-trois 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