{% extends "@templates/"~template~"/view/base.html.twig" %}
{% set displaySlider = false %}
{% block meta %}{{ getMeta(category)|raw }}{% endblock %}

{% block breadcrumbs %}
    <div class="padding80">{{ wo_render_breadcrumbs() }}</div>
{% endblock %}

{% block content %}
    <div class="grid-container">
        <div>
            <h1>Blog</h1>
        </div>

        <div class="grid-x grid-margin-x " style="padding-bottom: 80px">
            {% for News in news %}
                <div class="singleArticle cell large-4 medium-6">
                    <div class="blog-post callout">
                        <div class="postText">
                            <h6 class="title">{{ News.title }}</h6>
                            <p class="date">Opublikowany - {{ News.dateOfPublication|date("d.m.Y") }}</p>
                            <p class="blogCategories">
                                kategorie:
                                {% for category in News.categories %}
                                    <a href="{{ getCanonical(category) }}">{{ category.name }}</a>,
                                {% endfor %}
                            </p>
                            <p class="desc">{{ News.shortcut }}</p>
                        </div>
                        {% if(News.image) %}
                            <div class="img"> <img src="{{ asset(News.image('thumbnail')) }}" alt=""></div>
                        {% endif %}
                        <div class="postButton">
                            <a  class="readmore button tiny" href="{{ getCanonical(News) }}">Czytaj więcej</a>
                        </div>
                    </div>
                </div>
            {% endfor %}
        </div>
        <div class="navigation">
            {{ knp_pagination_render(news, '@KnpPaginator/Pagination/sliding.html.twig') }}
        </div>
    </div>
{% endblock %}
