{# Template : News Listings #}

{% extends ('layouts/' ~ page_meta.layout) %}

{% block content %}

    {% set title = p.pagedata['Title'][0]['Title']['value']  %}

    {% if title is empty %}
        {% set title = p.title  %}
    {% endif %}

    {% include 'includes/page_blocks/title_banner.twig' with {
        banner: p.pagedata['Title Banner with graphic'][0],
        dark_background: false
    }%}

    {% include 'navigation/breadcrumbs.twig' %}


    <div class="blogWrapper">

        <div class="articlesWrap">

            {% if news_list is not empty %}
                <ul class="blogGrid">

                    {% for article in news_list %}

                        <li class="blogGrid__item">

                            {% include '/includes/partials/blog_article_card.twig' with{
                                article: article
                            }%}

                        </li>

                    {% endfor %}

                </ul>

                {{ pagination|raw }}
            {% else %}
                <div class="emptyBlog">
                    <h2>No articles found</h2>
                    <p>Please check back again soon</p>
                </div> <!-- .emptyBlog -->
            {% endif %}

        </div> <!-- .articlesWrap -->

    </div> <!-- .blogWrapper -->

    




{% endblock %}
