{#
/**
 * @file
 * Partial template to display a node in teaser tile view mode.
 */
#}
{% if (teaser_mobile_layout == "2-col") %}
{% set classes = classes|merge(['mt-mobile-layout-2-col']) %}
{% else %}
{% set classes = classes|merge(['mt-mobile-layout-1-col']) %}
{% endif %}

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

  {% if image|render or image_caption|render or (display_submitted and date_overlay) %}
    <div class="teaser-tile-image-container">
      {% if image|render %}
        <div class="teaser-tile-image">
          {{ image }}
        </div>
      {% endif %}
      {% if display_submitted and date_overlay %}
        {{ metadata }}
        <div class="node__submitted-date mt-style-custom-tl region--default-background">
          <div class="day">{{ submitted_day }}</div>
          <div class="month-year">
            {{ submitted_month }}
            {{ submitted_year }}
          </div>
        </div>
      {% endif %}
      {% if image_caption|render %}
        <div class="image-caption">
          {{ image_caption }}
        </div>
      {% endif %}
    </div>
  {% endif %}
  <div class="mt-teaser-tile-card">
    <div class="row align-items-start mb-2">
      {% if not page %}
        <h4{{ title_attributes.addClass("mt-0 mb-0 node__title col") }}>
          <a href="{{ url }}" rel="bookmark">{{ label }}</a>
        </h4>
      {% endif %}
      {% if teaser_tile_subtitle|render %}
        <div class="teaser-tile-subtitle col-auto">
          {{ teaser_tile_subtitle }}
        </div>
      {% endif %}
    </div>

    {% if teaser_tile_pre_content_first|render or teaser_tile_pre_content_second|render %}
      <div class="teaser-tile-pre-content">
        {% if teaser_tile_pre_content_first|render %}
          <div class="teaser-tile-pre-content-item">
            {{ teaser_tile_pre_content_first }}
          </div>
        {% endif %}
        {% if teaser_tile_pre_content_second|render %}
          <div class="teaser-tile-pre-content-item">
            {{ teaser_tile_pre_content_second }}
          </div>
        {% endif %}
      </div>
    {% endif %}

    {% if teaser_tile_content|render %}
      <div class="teaser-tile-content">
        {{ teaser_tile_content }}
      </div>
    {% endif %}

    <div{{ content_attributes.addClass('node__content') }}>
      {{ rendered_content }}
    </div>
  </div>
</article>
