{# Actualité Hub grid card. Parameters: - card (ActualiteHubCardModel or plain array with the same keys): title, slug, mainImagePath (nullable), tags ({id, name, slug}[]), publishedAt (display date), entity (Page, used only for page_url()). - theme (string, optional): "dark" (default) or "light" — light mode sets card text color to $color-primary-light (#F9F2EB) for use on dark backgrounds. `data-tags` carries a JSON array of tag slugs — this is the contract read by assets/ts/pages/actualite-hub-filter.ts to decide visibility on filter interaction. Kept as a dedicated partial (not a fork of the generic components/_card.html.twig) since the hub card needs tag pills + a data-tags contract that the generic card doesn't have. #} {% set tagSlugs = card.tags|map(t => t.slug) %}
{% if card.mainImagePath %} {% include 'components/_themed_img.html.twig' with {light: card.mainImagePath, dark: card.mainImageDarkPath|default(''), alt: card.title, class: 'actualite-hub-page__card-img', loading: 'lazy'} only %} {% else %} {% endif %}
{% if card.tags is not empty %}
{% for tag in card.tags %} {% include 'components/_tag.html.twig' with { label: tag.name, class: 'tag--light', disabled: true } only %} {% endfor %}
{% endif %}
{{ card.publishedAt|localized_date }}

{{ card.title }}