src/AppBundle/Resources/views/AreaIncludes/teaser/teaser.html.twig line 1

Open in your IDE?
  1. {% set fallbackLinkText = false %}
  2. {% if teaser|default(null) and teaser.getPage()|default(null) %}
  3. <div class="col">
  4.     <a href="{{ teaser.getPage().getFullPath() }}" class="card border-secondary card-w-image">
  5.         {% if teaser.getTeaserImage() %}
  6.             <div class="overflow-zoom bg-gray2">{{ teaser.getTeaserImage().getThumbnail('card-teaser-image'~(teaser.getTeaserImage().getMimetype() == 'image/png' ? '-png' : '')).getHtml({imgAttributes:{class:'card-img-top img-fluid'}})|raw }}</div>
  7.         {% else %}
  8.             <div class="card-img-top bg-gray2">
  9.                 <div class="embed-responsive embed-responsive-16by9">
  10.                     <img src="/_gfx/placeholder-camera-16by9.png" class="embed-responsive-item img-fluid mt-0" alt="no-image">
  11.                 </div>
  12.             </div>
  13.         {% endif %}
  14.         <div class="card-body">
  15.             <div class="text-uppercase text-right clearfix">
  16.                 {% for category in teaser.getTeaserCategories() %}
  17.                     {% if not fallbackLinkText and category.getLinkText() %}
  18.                         {% set fallbackLinkText = category.getLinkText() %}
  19.                     {% endif %}
  20.                     <span class="mark text-white text-left float-left">{{ category.getName() }}</span>
  21.                 {% endfor %}
  22.             </div>
  23.             <h3 class="card-title">{{ teaser.getTitle() }}</h3>
  24.             {#<div class="card-text">{{ teaser.getDescription() }}</div>#}
  25.         </div>
  26.         <div class="card-footer card-text">
  27.             {% if not fallbackLinkText %}
  28.                 {% set fallbackLinkText = 'teaser.news.read-more'|trans %}
  29.             {% endif %}
  30.             <span class="lorch-icon lorch-icon-next">{{ teaser.getLinkText()|default(fallbackLinkText) }}</span>
  31.         </div>
  32.     </a>
  33. </div>
  34. {% endif %}