NAHNAH AI

🌅 HérosGratuit · 0 NahnahPar NAHNAH AI

Héros minimal typographique

Sans image : un très grand titre, un mot souligné qui se dessine, un texte court et un bouton. Sobre et rapide à charger.

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-minimal-texte.liquid (Liquid, CSS et JS inclus).

{%- comment -%} NAHNAH AI · Héros minimal typographique (bibliothèque Sections & effets) {%- endcomment -%}
<div class="nn-hero-minimal-texte" 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-taille: {{ section.settings.taille }}px;">
  <div class="nn-hero-minimal-texte__cadre nn-hero-minimal-texte--{{ section.settings.alignement }}">
    {%- if section.settings.surtitre != blank -%}
      <p class="nn-hero-minimal-texte__surtitre">{{ section.settings.surtitre | escape }}</p>
    {%- endif -%}
    {%- if section.settings.titre != blank -%}
      <h2 class="nn-hero-minimal-texte__titre">{{ section.settings.titre }}</h2>
    {%- endif -%}
    {%- if section.settings.texte != blank -%}
      <div class="nn-hero-minimal-texte__texte">{{ section.settings.texte }}</div>
    {%- endif -%}
    {%- if section.settings.bouton_texte != blank or section.settings.bouton2_texte != blank -%}
      <div class="nn-hero-minimal-texte__boutons">
        {%- if section.settings.bouton_texte != blank -%}
          <a class="nn-hero-minimal-texte__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-minimal-texte__bouton nn-hero-minimal-texte__bouton--second" href="{{ section.settings.bouton2_lien | default: routes.collections_url }}">{{ section.settings.bouton2_texte | escape }}</a>
        {%- endif -%}
      </div>
    {%- endif -%}
    {%- if section.settings.points != blank -%}
      <ul class="nn-hero-minimal-texte__points" role="list">
        {%- assign points = section.settings.points | split: '·' -%}
        {%- for point in points -%}
          {%- assign point_net = point | strip -%}
          {%- if point_net != blank -%}<li>{{ point_net | escape }}</li>{%- endif -%}
        {%- endfor -%}
      </ul>
    {%- endif -%}
  </div>
</div>

{% schema %}
{
  "name": "Héros minimal typographiq",
  "tag": "section",
  "class": "nn-section-hero-minimal-texte",
  "settings": [
    {
      "type": "text",
      "id": "surtitre",
      "label": "Sur-titre (vide : masqué)",
      "default": "Boutique en ligne"
    },
    {
      "type": "inline_richtext",
      "id": "titre",
      "label": "Titre (mets un mot en italique pour le souligner)",
      "default": "Moins de choses, <em>mieux choisies</em>."
    },
    {
      "type": "richtext",
      "id": "texte",
      "label": "Texte",
      "default": "<p>Des produits utiles, durables et bien pensés. Rien de superflu.</p>"
    },
    {
      "type": "range",
      "id": "taille",
      "label": "Taille maximale du titre",
      "min": 40,
      "max": 120,
      "step": 4,
      "default": 96,
      "unit": "px"
    },
    {
      "type": "select",
      "id": "alignement",
      "label": "Alignement",
      "options": [
        {
          "value": "gauche",
          "label": "Gauche"
        },
        {
          "value": "centre",
          "label": "Centre"
        }
      ],
      "default": "gauche"
    },
    {
      "type": "text",
      "id": "points",
      "label": "Points forts (séparés par « · », vide : masqué)",
      "default": "Livraison suivie · Retours simplifiés · Paiement sécurisé"
    },
    {
      "type": "header",
      "content": "Boutons"
    },
    {
      "type": "text",
      "id": "bouton_texte",
      "label": "Texte du bouton (vide : masqué)",
      "default": "Voir la boutique"
    },
    {
      "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": "Nous contacter"
    },
    {
      "type": "url",
      "id": "bouton2_lien",
      "label": "Lien du bouton secondaire (vide : collections)"
    },
    {
      "type": "header",
      "content": "Couleurs"
    },
    {
      "type": "color",
      "id": "couleur_fond",
      "label": "Fond",
      "default": "#FFFFFF"
    },
    {
      "type": "color",
      "id": "couleur_texte",
      "label": "Texte",
      "default": "#111111"
    },
    {
      "type": "color",
      "id": "couleur_accent",
      "label": "Accent",
      "default": "#E4572E"
    },
    {
      "type": "color",
      "id": "couleur_bouton",
      "label": "Bouton",
      "default": "#111111"
    },
    {
      "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 minimal typographiq"
    }
  ]
}
{% endschema %}

{% stylesheet %}
.nn-hero-minimal-texte {
  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-minimal-texte *, .nn-hero-minimal-texte *::before, .nn-hero-minimal-texte *::after { box-sizing: border-box; }
.nn-hero-minimal-texte :where(a, button):focus-visible { outline: 3px solid var(--nn-accent); outline-offset: 3px; }
.nn-hero-minimal-texte__surtitre { margin: 0 0 12px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--nn-accent); }
.nn-hero-minimal-texte__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-minimal-texte__texte { margin: 0 0 28px; font-size: clamp(16px, 1.6vw, 19px); line-height: 1.6; opacity: 0.88; max-width: 560px; }
.nn-hero-minimal-texte__texte p { margin: 0 0 0.6em; }
.nn-hero-minimal-texte__boutons { display: flex; flex-wrap: wrap; gap: 12px; }
.nn-hero-minimal-texte__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-minimal-texte__bouton--second { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
@media (hover: hover) {
  .nn-hero-minimal-texte__bouton:hover { transform: translateY(-2px); box-shadow: 0 12px 26px color-mix(in srgb, var(--nn-bouton) 35%, transparent); }
  .nn-hero-minimal-texte__bouton--second:hover { box-shadow: inset 0 0 0 2px currentColor, 0 12px 26px rgba(0, 0, 0, 0.12); }
}
.nn-hero-minimal-texte__vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nn-hero-minimal-texte__cadre { max-width: 1200px; margin: 0 auto; padding: clamp(56px, 10vw, 140px) 16px; }
@media (min-width: 750px) { .nn-hero-minimal-texte__cadre { padding-inline: 32px; } }
.nn-hero-minimal-texte--centre { text-align: center; }
.nn-hero-minimal-texte--centre .nn-hero-minimal-texte__texte { margin-inline: auto; }
.nn-hero-minimal-texte--centre .nn-hero-minimal-texte__boutons, .nn-hero-minimal-texte--centre .nn-hero-minimal-texte__points { justify-content: center; }
.nn-hero-minimal-texte__surtitre { color: inherit; opacity: 0.6; letter-spacing: 0.2em; }
.nn-hero-minimal-texte__titre { max-width: 14ch; font-size: clamp(38px, 10vw, var(--nn-taille)); line-height: 0.98; letter-spacing: -0.045em; font-weight: 800; }
.nn-hero-minimal-texte--centre .nn-hero-minimal-texte__titre { margin-inline: auto; }
.nn-hero-minimal-texte__titre em { position: relative; display: inline-block; font-style: italic; color: var(--nn-accent); }
.nn-hero-minimal-texte__titre em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.04em;
  height: 0.08em;
  border-radius: 1em;
  background: currentColor;
  transform-origin: left;
  animation: nn-hero-minimal-texte-trait 1s 0.4s cubic-bezier(0.6, 0, 0.2, 1) both;
}
@keyframes nn-hero-minimal-texte-trait { from { transform: scaleX(0); } }
.nn-hero-minimal-texte__texte { font-size: clamp(17px, 2vw, 21px); }
.nn-hero-minimal-texte__bouton { border-radius: 0; }
.nn-hero-minimal-texte__points { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid color-mix(in srgb, var(--nn-texte) 15%, transparent); list-style: none; font-size: 14px; opacity: 0.75; }
.nn-hero-minimal-texte__points li { display: inline-flex; align-items: center; gap: 8px; }
.nn-hero-minimal-texte__points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--nn-accent); }
@media (prefers-reduced-motion: reduce) {
  .nn-hero-minimal-texte, .nn-hero-minimal-texte *, .nn-hero-minimal-texte *::before, .nn-hero-minimal-texte *::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

  1. Dans Shopify : Boutique en ligne → Thèmes → bouton « … » du thème → Modifier le code.
  2. Dossier « sections » → « Ajouter une section » (ou « Nouveau fichier ») → nomme-la « nahnah-hero-minimal-texte ».
  3. Efface le contenu proposé, colle le code de l’onglet Liquid (fichier complet), puis Enregistrer.
  4. 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-minimal-texte 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

Dans la même catégorie