{# /** * @file * Implementation to display a node card. * * @todo This markup is largely duplicated from the card component. Once we can * either get the src and alt from the image to pass to the component, or * populate a slot with an image in XB, we can consolidate. */ #} {{ attach_library('core/components.drupal_cms_olivero--card')}} {% set classes = [ 'node', 'node--type-' ~ node.bundle|clean_class, node.isPromoted() ? 'node--promoted', node.isSticky() ? 'node--sticky', not node.isPublished() ? 'node--unpublished', view_mode ? 'node--view-mode-' ~ view_mode|clean_class, ] %} {% set has_image = content.field_featured_image|render|striptags('img')|trim %}
{{ title_suffix }} {% if has_image %}
{{ content.field_featured_image }}
{% endif %}

{{ label }}

{% if display_submitted %}
{{ date }} {{ metadata }}
{% endif %}
{{ content|without('field_featured_image', 'links') }}