templates/news/overview.html.twig line 1

Open in your IDE?
  1. {% extends base_layout() %}
  2. {% block content %}
  3.     <div class="container mb-5">
  4.         {{ include('includes/title.html.twig') }}
  5.         <div class="row">
  6.             <div class="col-12">
  7.                 {{ include('includes/default-content.html.twig') }}
  8.             </div>
  9.         </div>
  10.     </div>
  11.     <section class="">
  12.         <div class="container pb-5">
  13.             <div class="row">
  14.                 <div class="col-12">
  15.                     {% if news is defined %}
  16.                         <div class="row row-cols-lg-3 g-3">
  17.                             {% if news is defined %}
  18.                                 {% for new in news %}
  19.                                     <div class="col homenews-item">
  20.                                         <div class="bg-light-grey h-100">
  21.                                             {% if not new.getEditable('publicationHeader').isEmpty() %}
  22.                                                 <a href="{{ new.getFullPath() }}">
  23.                                                     <div class="image position-relative">
  24.                                                         <img class="w-100 h-auto"
  25.                                                              src="{% if new.getEditable('publicationHeader') %}{{ new.getEditable('publicationHeader').getThumbnail('homepage-news') }}{% else %}{{ app_placeholderImage().getThumbnail('homepage-news') }}{% endif %}">
  26.                                                     </div>
  27.                                                 </a>
  28.                                             {% endif %}
  29.                                             <div class="p-3 h-100">
  30.                                                 <header class="mt-2 mb-1 text-primary fs-3">
  31.                                                     <a href="{{ new.getFullPath() }}">
  32.                                                         {{ new.getEditable('newsTitle') }}</a>
  33.                                                 </header>
  34.                                                 {% if not new.getEditable('publicationDate').isEmpty() %}
  35.                                                     {#                        <small class="text-uppercase">{{ app_blog_date(article.getEditable('publicationDate').getData()) }}</small>#}
  36.                                                     <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>
  37.                                                 {% endif %}
  38.                                                 {% if new.getEditable('newsContent') is defined %}
  39.                                                     <div class="d-inline-block mt-2">
  40.                                                         <p><a class="text-black" href="{{ new.getFullPath() }}">
  41.                                                                 {{ new.getEditable('newsContent')|truncate(230, '...') }}</a>
  42.                                                         </p>
  43.                                                     </div>
  44.                                                 {% endif %}
  45.                                                 {#
  46.                                                 <div class="position-absolute pos-b-0 mt-1">
  47.                                                     <a class="btn btn-primary" href="{{ new.getFullPath() }}">
  48.                                                                 <span class="mr-2">
  49.                                                                     {{ 'lees meer'|trans }}
  50.                                                                 </span>
  51.                                                         <i class="fas fa-long-arrow-alt-right"></i>
  52.                                                     </a>
  53.                                                 </div> #}
  54.                                             </div>
  55.                                         </div>
  56.                                     </div>
  57.                                 {% endfor %}
  58.                             {% endif %}
  59.                             {#
  60.                             {{ include('includes/news/detail.html.twig', {
  61.                                 'news': news
  62.                             }) }} #}
  63.                         </div>
  64.                         <div class="load-more-items py-3">
  65.                             <div class="aligner">
  66.                                 <div class="loading-circle loading-bar-primary loading-bg-default mx-auto"></div>
  67.                             </div>
  68.                             <input type="hidden" class="pageCounter" value="1">
  69.                         </div>
  70.                     {% endif %}
  71.                 </div>
  72.             </div>
  73.         </div>
  74.     </section>
  75. {% endblock %}