{% extends 'base.html.twig' %} {% set seo = plant %} {% set seo_title = plant.resolveTitle %} {% set category = plant.primaryCategory %} {% set trail = [{ label: 'Accueil', url: path('home') }, { label: 'Nos plantes', url: path('plant_index') }] %} {% if category %} {% for ancestor in category.ancestry %} {% set trail = trail|merge([{ label: ancestor.name, url: path('category_show', { slug: ancestor.slug }) }]) %} {% endfor %} {% endif %} {% set trail = trail|merge([{ label: plant.name, url: path('plant_show', { slug: plant.slug }) }]) %} {% block schema %} {% endblock %} {% block body %}
{{ include('_partials/breadcrumb.html.twig') }}
{{ include('_partials/photo.html.twig', { media: plant.image, filter: 'plant', ratio: '4 / 5', loading: 'eager', sizes: '(min-width: 1024px) 45vw, 100vw' }) }}
{% if category %}

{{ category.name }}

{% endif %}

{{ plant.heading }}

{% if plant.latinName %}

{{ plant.latinName }}

{% endif %} {# La réponse directe : le seul passage de la page qui doit se lire seul, parce que c'est celui qu'un moteur reprend. #} {% if plant.intro %}

{{ plant.intro }}

{% endif %}
{{ include('_partials/availability.html.twig') }} {% if plant.price %} {{ plant.price|number_format(2, ',', ' ') }} €{{ plant.priceUnit }} {% endif %} {% if plant.organic %}Culture biologique certifiée{% endif %} {% if plant.promotionLabel %}{{ plant.promotionLabel }}{% endif %}
{% if plant.availabilityNote %}

{{ plant.availabilityNote }}

{% endif %}
{# Rien ne se réserve ni ne s'achète en ligne : le bouton mène au comptoir, pas à un panier. #} Venez la voir {{ plant.availability.value == 'available' ? 'Poser une question' : 'Savoir quand elle revient' }}
{% if plant.traits|length %}
    {% for trait in plant.traits %} {% if trait.published %}
  • {{ trait.name }}
  • {% endif %} {% endfor %}
{% endif %}
{# — La carte d'identité. Des champs, pas de la prose : c'est ce qu'on vient vérifier avant d'acheter, et personne ne le lit en phrases. — #} {% set facts = [ { label: 'Hauteur adulte', value: plant.matureHeightCm|plant_size }, { label: 'Largeur adulte', value: plant.matureWidthCm|plant_size }, { label: 'Distance de plantation', value: plant.spacingCm|plant_size }, { label: 'Exposition', value: plant.exposure ? plant.exposure.label : null }, { label: 'Sol', value: plant.soil }, { label: 'Rusticité', value: plant.hardinessCelsius ? plant.hardinessCelsius ~ ' °C' : null }, { label: 'Arrosage', value: plant.watering }, { label: 'Vigueur', value: plant.vigour }, { label: 'Plantation', value: plant.plantingSeasons|length ? plant.plantingSeasons|map(s => s.label)|join(', ') : null }, { label: 'Floraison', value: plant.floweringSeasons|length ? plant.floweringSeasons|map(s => s.label)|join(', ') : null }, { label: 'Récolte', value: plant.harvestSeasons|length ? plant.harvestSeasons|map(s => s.label)|join(', ') : null }, { label: 'Conservation', value: plant.conservation }, { label: 'Pollinisateurs', value: plant.pollinators }, { label: 'Origine', value: plant.origin } ]|filter(fact => fact.value) %} {% if facts|length %}

Sa carte d'identité

{% for fact in facts %}
{{ fact.label }}
{{ fact.value }}
{% endfor %}
{% endif %} {# — Le texte. — #}
{% set chapters = [ { id: 'le-fruit', title: 'Le fruit', body: plant.fruitDescription, brut: true }, { id: 'ce-que-c-est', title: 'Ce que c’est', body: plant.description }, { id: 'la-planter', title: 'La planter', body: plant.plantingAdvice }, { id: 'l-entretenir', title: 'L’entretenir', body: plant.careAdvice }, { id: 'l-associer', title: 'Avec quoi l’associer', body: plant.companionAdvice }, { id: 'en-cuisine', title: 'En cuisine', body: plant.culinaryAdvice } ]|filter(chapter => chapter.body) %}
{# Un sommaire, dès que la fiche a de quoi se perdre dedans. Il tient en liens d'ancre : aucun script, et il fonctionne même quand la page n'a pas fini de charger. #} {% if chapters|length > 2 %} {% endif %}
{% for chapter in chapters %}
{% if chapter.brut|default(false) %}

{{ chapter.title }}

{{ chapter.body }}

{% else %}

{{ chapter.title }}

{{ chapter.body|rich }}
{% endif %}
{% endfor %}
{# La colonne collante : l'appel à venir suit le lecteur jusqu'en bas de page, là où la décision se prend. #}
{# — Ce qu'on propose à la place, ou en plus. Une fiche épuisée qui ne renvoie nulle part renvoie au moteur de recherche. — #} {% if alternatives|length %}

{{ plant.availability.value == 'available' ? 'À planter avec elle' : 'Disponibles en ce moment' }}

{% for other in alternatives %} {{ include('_partials/plant-card.html.twig', { plant: other }) }} {% endfor %}
{% endif %}
{{ include('_partials/cta.html.twig', { title: 'Voyez-la de vos yeux', text: "Une photo ne dit ni le port, ni le parfum, ni la vigueur d'un plant. Passez, on vous la montre dans l'allée." }) }}
{% endblock %}