{#
/**
 * @file
 * Template for a Node.
 */
#}
{%
  set classes = [
  'node',
  node.isPromoted() ? 'node--promoted',
  node.isSticky() ? 'node--sticky',
  not node.isPublished() ? 'node--unpublished',
  node.bundle|clean_class,
  node.bundle|clean_class ~ '--' ~ view_mode|clean_class,
]|merge(utility_classes ? utility_classes : [])
%}
{%
    set title_classes = [
        'node__title'
    ]|merge(title_classes ? title_classes : [])
%}
{%
    set title_link_classes = [
        'node__title-link'
    ]|merge(title_link_classes ? title_link_classes : [])
%}
{%
    set content_classes  = [
        'node__content'
    ]|merge(content_classes ? content_classes : [])
%}

<article{{ attributes.addClass(classes) }}>
  {{ title_prefix }}
  {{ title_suffix }}

  {% if not node.isPublished() and not node.get('moderation_state').getString() %}
    <div class="node__published-status">Unpublished</div>
  {% endif %}

  {% block content %}
    {% if not page and label %}
      <{{ title_tag|default('h2') }}{{ title_attributes.addClass(title_classes) }}>
        <a href="{{ url }}" {{ title_link_attributes.addClass(title_link_classes) }}>{{- label -}}</a>
      </{{ title_tag|default('h2') }}>
    {% endif %}

    {% if display_submitted %}
      <footer>
        {{- author_picture -}}
        <div{{ author_attributes }}>
          {% trans %}Submitted by {{ author_name }} on {{ date }}{% endtrans %}
          {{- metadata -}}
        </div>
      </footer>
    {% endif %}

    <div{{ content_attributes.addClass(content_classes) }}>
      {{- content -}}
    </div>
  {% endblock %}
</article>

{% if libraries %}
  {% for library in libraries %}
    {{ attach_library(library) }}
  {% endfor %}
{% endif %}
