{% extends 'base.html.twig' %}
{% set hasArticles = articles|length > 0 %}
{% block content %}
<!-- Heading breadcrumbs -->
{{ include('common/heading_breadcrumbs.html.twig', {
'imageUrl': "#{baseUrl}/assets/images/pages/ufficio_stampa/heading.jpg",
'title': "Comunicati stampa",
'subtitle': "Press Area",
'breadcrumb_tree': [ "Press Area", "Comunicati stampa" ]
}) }}
<!-- Page Contents-->
<section class="section-lg section bg-default">
<div class="container">
<div class="row justify-content-sm-center">
<div class="col-lg-12 col-xl-8">
<div class="row justify-content-sm-center">
{% if hasArticles %}
{% for a in articles %}
<div class="col-md-6
{% if loop.index == 2 %} offset-top-50 offset-sm-top-0 {% endif %}
{% if loop.index > 2 %} offset-top-50 offset-md-top-60 {% endif %}"
>
{{ include('common/thumbnail_article.html.twig', { 'article': a }) }}
</div>
{% endfor %}
{% else %}
<p>Nessun articolo da mostrare.</p>
{% endif %}
</div>
{% if hasArticles %}
<div class="offset-top-50 offset-lg-top-60 text-center">
<!-- Classic Pagination-->
<nav>
<ul class="pagination-classic">
{% if page-1 >= 1 %}
<li>
<a class="btn"
href="{{ baseUrl }}{{ uri }}?pagina={{ page-1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
<span class="fas fa-chevron-left"></span>
</a>
</li>
<li>
<a class="btn btn-darkest"
href="{{ baseUrl }}{{ uri }}?pagina={{ page-1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
{{ page-1 }}
</a>
</li>
{% endif %}
<li class="active"><span class="btn btn-darkest">{{ page }}</span></li>
{% if page+1 <= totPages %}
<li>
<a class="btn btn-darkest"
href="{{ baseUrl }}{{ uri }}?pagina={{ page+1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
{{ page+1 }}
</a>
</li>
<li>
<a class="btn"
href="{{ baseUrl }}{{ uri }}?pagina={{ page+1 }}{% if search is not empty %}&cerca={{ search|url_encode }}{% endif %}">
<span class="fas fa-chevron-right"></span>
</a>
</li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
<div class="col-md-10 col-lg-12 col-xl-4 offset-top-66 offset-md-top-90 offset-lg-top-0">
{{ include('common/aside_blog.html.twig') }}
</div>
</div>
</div>
</section>
<!-- Col cuore, per mano -->
{{ include('common/call_to_action_contattaci.html.twig') }}
{% endblock %}