{% load wagtailcore_tags core_tags gem_tags %}
{% if article.title_highlight %}
  <h3 class="{{layouttype}}-teaser__title {{layouttype}}-teaser__title--highlight block-with-text">
      <a href="{% pageurl article.specific %}" class="{{layouttype}}-teaser__title-link">
           {{ article.title_highlight|smarttruncatechars:45|safe}}
      </a>
  </h3>
{% else %}
  <h3 class="{{layouttype}}-teaser__title block-with-text">
      <a href="{% pageurl article.specific %}" class="{{layouttype}}-teaser__title-link">
          {{ article.title|smarttruncatechars:45|safe}}
      </a>
  </h3>
{% endif %}

{% if article.subtitle_highlight or article.body_highlight %}
  <p class="carousel-teaser__subtitle highlight-description">
    {% if article.subtitle_highlight %}
      {{article.subtitle_highlight|smarttruncatechars:28|safe}}
    {% elif article.body_highlight %}
      {{article.body_highlight|smarttruncatechars:28|safe}}
    {% endif %}
  </p>
{% elif article.subtitle %}
  <p class="{{layouttype}}-teaser__subtitle block-with-text">
    {% if article.title.30 %}
      {{ article.subtitle|smarttruncatechars:28|safe}}
    {% else %}
      {{ article.subtitle|smarttruncatechars:50|safe}}
    {% endif %}
  </p>
{% endif %}
