{{ 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 %}
Sa carte d'identité
-
{% for fact in facts %}
- {{ fact.label }}
- {{ fact.value }}
{% 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 %}
{# La colonne collante : l'appel à venir suit le lecteur jusqu'en
bas de page, là où la décision se prend. #}
{% for chapter in chapters %}
{% if chapter.brut|default(false) %}
{% endif %}
{% endfor %}
{{ chapter.title }}
{{ chapter.body }}
{% else %}{{ chapter.title }}
{{ chapter.body|rich }}{{ plant.availability.value == 'available' ? 'À planter avec elle' : 'Disponibles en ce moment' }}
{% for other in alternatives %}
{{ include('_partials/plant-card.html.twig', { plant: other }) }}
{% endfor %}