{% extends 'base.html.twig' %} {% set seo = article %} {% set seo_title = article.resolveTitle %} {% set og_type = 'article' %} {% set is_advice = article.kind.value == 'advice' %} {% set trail = [ { label: 'Accueil', url: path('home') }, { label: is_advice ? 'Conseils' : 'Actualités', url: path(is_advice ? 'advice_index' : 'news_index') }, { label: article.name, url: path(article.kind.routeName, { slug: article.slug }) } ] %} {% block schema %} {% endblock %} {% block body %}
{{ include('_partials/breadcrumb.html.twig') }}
{% if article.season %}

{{ article.season.preposition }}

{% endif %}

{{ article.heading }}

{% if article.intro %}

{{ article.intro }}

{% endif %} {% if article.kind.dated and article.publishedAt %}

Publié le {{ article.publishedAt|format_date(locale='fr', dateFormat='long') }} {%- if article.updatedAt and article.updatedAt > article.publishedAt %}, mis à jour le {{ article.updatedAt|format_date(locale='fr', dateFormat='long') }}{% endif %}

{% endif %}
{% if article.image %}
{{ include('_partials/photo.html.twig', { media: article.image, filter: 'hero', ratio: '16 / 9', loading: 'eager', sizes: '(min-width: 1024px) 60vw, 100vw' }) }}
{% endif %}
{{ article.body|rich }}
{# — Le maillage sortant. Un texte qui ne mène à aucune fiche ne fait venir personne, et une liste de noms ne donne envie d'aller nulle part : ce qui est nommé dans l'article se montre. — #} {% set citedPlants = article.plants|filter(p => p.published) %} {% set citedCategories = article.categories|filter(c => c.published) %} {% set citedServices = article.services|filter(s => s.published) %} {% if citedPlants|length or citedCategories|length or citedServices|length %}

Ce dont il est question

{% if citedPlants|length %}

Les plantes

{# Un article cite parfois toute une collection : la carte de catalogue, haute, en ferait un mur qu'on fait défiler sans le lire. Ici la photo tient la colonne de gauche. #}
{% for plant in citedPlants %}
{{ include('_partials/photo.html.twig', { media: plant.image, filter: 'card', ratio: '4 / 5', sizes: '80px', class: 'h-full w-full object-cover transition duration-500 group-hover:scale-[1.03]' }) }}

{{ plant.name }}

{{ plant.latinName }}

{% if plant.price %}

{{ plant.price|number_format(2, ',', ' ') }} €{% if plant.priceUnit %} {{ plant.priceUnit }}{% endif %}

{% endif %}
{% endfor %}
{% endif %} {% if citedCategories|length %}

Les familles

{% for category in citedCategories %}
{{ include('_partials/photo.html.twig', { media: category.image, filter: 'card', ratio: '16 / 10', sizes: '(min-width: 1024px) 25vw, 50vw', class: 'h-full w-full object-cover transition duration-500 group-hover:scale-[1.03]' }) }}

{{ category.name }}

Voir la sélection
{% endfor %}
{% endif %} {% if citedServices|length %}

Si vous préférez qu'on s'en charge

{% for service in citedServices %}
{{ include('_partials/photo.html.twig', { media: service.image, filter: 'card', ratio: '16 / 10', sizes: '(min-width: 1024px) 33vw, 100vw', class: 'h-full w-full object-cover transition duration-500 group-hover:scale-[1.03]' }) }}

{{ service.name }}

{% if service.intro %}

{{ service.intro }}

{% endif %}
{% endfor %}
{% endif %}
{% endif %} {% if neighbours|length %}

À lire aussi

{% for voisin in neighbours %} {{ include('_partials/article-card.html.twig', { article: voisin, sizes: '(min-width: 768px) 33vw, 100vw' }) }} {% endfor %}
{% endif %}
{{ include('_partials/cta.html.twig', { title: 'On en reparle sur place', text: "Apportez vos questions, on a les plants sous la main et le temps d'y répondre." }) }}
{% endblock %}