templates/pages/press_area/notizie.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% set hasArticles = articles|length > 0 %}
  3. {% block content %}
  4.     <!-- Heading breadcrumbs -->
  5.     {{ include('common/heading_breadcrumbs.html.twig', {
  6.         'imageUrl':         "#{baseUrl}/assets/images/pages/ufficio_stampa/heading.jpg",
  7.         'title':            "Comunicati stampa",
  8.         'subtitle':         "Press Area",
  9.         'breadcrumb_tree':  [ "Press Area", "Comunicati stampa" ]
  10.     }) }}
  11.     <!-- Page Contents-->
  12.     <section class="section-lg section bg-default">
  13.         <div class="container">
  14.             <div class="row justify-content-sm-center">
  15.                 <div class="col-lg-12 col-xl-8">
  16.                     <div class="row justify-content-sm-center">
  17.                         {% if hasArticles %}
  18.                             {% for a in articles %}
  19.                                 <div class="col-md-6
  20.                                     {% if loop.index == 2 %} offset-top-50 offset-sm-top-0 {% endif %}
  21.                                     {% if loop.index > 2 %} offset-top-50 offset-md-top-60 {% endif %}"
  22.                                 >
  23.                                     {{ include('common/thumbnail_article.html.twig', { 'article': a }) }}
  24.                                 </div>
  25.                             {% endfor %}
  26.                         {% else %}
  27.                             <p>Nessun articolo da mostrare.</p>
  28.                         {% endif %}
  29.                     </div>
  30.                     {% if hasArticles %}
  31.                         <div class="offset-top-50 offset-lg-top-60 text-center">
  32.                             <!-- Classic Pagination-->
  33.                             <nav>
  34.                                 <ul class="pagination-classic">
  35.                                     {% if page-1 >= 1 %}
  36.                                         <li>
  37.                                             <a class="btn"
  38.                                                href="{{ baseUrl }}{{ uri }}?pagina={{ page-1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
  39.                                                 <span class="fas fa-chevron-left"></span>
  40.                                             </a>
  41.                                         </li>
  42.                                         <li>
  43.                                             <a class="btn btn-darkest"
  44.                                                href="{{ baseUrl }}{{ uri }}?pagina={{ page-1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
  45.                                                 {{ page-1 }}
  46.                                             </a>
  47.                                         </li>
  48.                                     {% endif %}
  49.                                     <li class="active"><span class="btn btn-darkest">{{ page }}</span></li>
  50.                                     {% if page+1 <= totPages %}
  51.                                         <li>
  52.                                             <a class="btn btn-darkest"
  53.                                                href="{{ baseUrl }}{{ uri }}?pagina={{ page+1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
  54.                                                 {{ page+1 }}
  55.                                             </a>
  56.                                         </li>
  57.                                         <li>
  58.                                             <a class="btn"
  59.                                                href="{{ baseUrl }}{{ uri }}?pagina={{ page+1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
  60.                                                 <span class="fas fa-chevron-right"></span>
  61.                                             </a>
  62.                                         </li>
  63.                                     {% endif %}
  64.                                 </ul>
  65.                             </nav>
  66.                         </div>
  67.                     {% endif %}
  68.                 </div>
  69.                 <div class="col-md-10 col-lg-12 col-xl-4 offset-top-66 offset-md-top-90 offset-lg-top-0">
  70.                     {{ include('common/aside_blog.html.twig') }}
  71.                 </div>
  72.             </div>
  73.         </div>
  74.     </section>
  75.     <!-- Col cuore, per mano -->
  76.     {{ include('common/call_to_action_contattaci.html.twig') }}
  77. {% endblock %}