src/Package/Openform/Front/Templates/Mak/_item.html.twig line 1

Open in your IDE?
  1. {% set img = openform_front_util.getImagePathByType(item.Thumb ?? '','list') %}
  2. {% set href = toolkit_route_localizer.generate('mak_item',{ 'makSlug': makSlug, 'slug' : item.Translation[app.request.locale].slug }, app.request.locale) %}
  3. <div class="news-item news-item--exh" aria-label="{{ 'T_READ_MORE'|trans({}, 'openform_front', app.request.locale) }} {{ item.Translation[app.request.locale].title }}"
  4.     >
  5.     {% if img %}
  6.         <a class="news-item__image" href="{{ href }}">
  7.         <img loading="lazy" src="{{asset(img)}}" alt="{{ item.Translation[app.request.locale].alt }}">
  8.         </a>
  9.     {% endif %}
  10.     <div class="news-item__content">
  11.         <a href="{{ href }}" class="news-item__title news-item__title--exh">{{ item.Translation[app.request.locale].titleHtml|raw }}</a>  
  12.         <div class="news-item__date-wrapper">
  13.             {# <time class="news-item__date">
  14.                 {{ item.publishDate|explodedDate(app.request.locale).D }}
  15.                 {{ item.publishDate|explodedDate(app.request.locale).month }}
  16.                 {{ item.publishDate|explodedDate(app.request.locale).y }}
  17.             </time> #}
  18.         </div>
  19.         <a href="{{ href }}" class="news-item__text news-item__text--exh">{{ item.Translation[app.request.locale].shortLead }}</a>
  20.         {% for sponsor in item.Sponsor %}
  21.             {% set imgLogo = openform_front_util.getImagePathByType(sponsor.Thumb ?? '','logo') %}
  22.             {% if sponsor.link %}
  23.                 <a href="{{sponsor.link}}" class="news-item__logotype">
  24.                     <img src="{{imgLogo}}" alt="{{sponsor.Translation[app.request.locale].alt}}" title="{{sponsor.Translation[app.request.locale].title}}">
  25.                 </a>
  26.             {% else %}
  27.                 <div class="news-item__logotype">
  28.                     <img src="{{imgLogo}}" alt="{{sponsor.Translation[app.request.locale].alt}}" title="{{sponsor.Translation[app.request.locale].title}}">
  29.                 </div>
  30.             {% endif %}
  31.             
  32.             
  33.         {% endfor %}
  34.     </div>
  35. </div>