{{ attach_library('localgov_base/card') }}
{{ attach_library('localgov_base_france/card') }}

{%
  set classes = [
    'lgd-card',
    content_type ? 'lgd-card--' ~ content_type|clean_class : '',
    card_image ? 'lgd-card--has-image' : 'lgd-card--no-image',
    not node.isPublished() ? 'node--unpublished',
  ]
%}

<article{{ attributes.addClass(classes).removeAttribute('role') }}>

  {% if card_image %}
    <div class="lgd-card__image">
      {{ card_image }}
    </div>
  {% endif %}

  <div class="lgd-card__content">

    {{ title_prefix }}
    {% if card_title %}
      <h3{{ title_attributes }}>
        <a href="{{ card_url }}" rel="bookmark">{{ card_title }}</a>
      </h3>
    {% endif %}
    {{ title_suffix }}

    {{ card_content }}
  </div>

</article>
