templates/includes/news/detail.html.twig line 1

Open in your IDE?
  1. {% if news is defined %}
  2.     {% for new in news %}
  3.         <div class="col homenews-item">
  4.             <div class="bg-white h-100">
  5.                 {% if not new.getEditable('publicationHeader').isEmpty() %}
  6.                     <a href="{{ new.getFullPath() }}">
  7.                         <div class="image position-relative">
  8.                             <img class="w-100 h-auto"
  9.                                  src="{% if new.getEditable('publicationHeader') %}{{ new.getEditable('publicationHeader').getThumbnail('homepage-news') }}{% else %}{{ app_placeholderImage().getThumbnail('homepage-news') }}{% endif %}">
  10.                         </div>
  11.                     </a>
  12.                 {% endif %}
  13.                 <div class="p-3 h-100">
  14.                     <header class="mt-2 mb-1 text-primary fs-3">
  15.                         <a href="{{ new.getFullPath() }}">
  16.                             {{ new.getEditable('newsTitle') }}</a>
  17.                     </header>
  18.                     {% if not new.getEditable('publicationDate').isEmpty() %}
  19.                         {#                        <small class="text-uppercase">{{ app_blog_date(article.getEditable('publicationDate').getData()) }}</small>#}
  20.                         <small class="text-uppercase fst-italic text-black text-opacity-50">{{ new.getEditable('publicationDate').getData()|format_date('none', 'd MMM Y', null, 'gregorian', app.request.locale) }}</small>
  21.                     {% endif %}
  22.                     {% if new.getEditable('newsContent') is defined %}
  23.                         <div class="d-inline-block mt-2">
  24.                             <p><a class="text-black" href="{{ new.getFullPath() }}">
  25.                                     {{ new.getEditable('newsContent')|truncate(230, '...') }}</a>
  26.                             </p>
  27.                         </div>
  28.                     {% endif %}
  29.                     {#
  30.                         <div class="position-absolute pos-b-0 mt-1">
  31.                             <a class="btn btn-primary" href="{{ new.getFullPath() }}">
  32.                                         <span class="mr-2">
  33.                                             {{ 'lees meer'|trans }}
  34.                                         </span>
  35.                                 <i class="fas fa-long-arrow-alt-right"></i>
  36.                             </a>
  37.                         </div> #}
  38.                 </div>
  39.             </div>
  40.         </div>
  41.     {% endfor %}
  42. {% endif %}