<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/pl_PL/sdk.js#xfbml=1&version=v3.3"></script>
<div class="news-page">
{# Page Header #}
{% include 'Layout/_page-header.html.twig' with { 'page' : page } %}
{# Breadcrumbs #}
{% block breadcrumbs %}
{% include 'Layout/_breadcrumbs.html.twig' with { 'refererString' : app.request.get('path') } %}
{% endblock %}
{% set author = page.getAuthor() %}
<div class="content row">
<article class="blog-item col-lg-9">
<header class="blog-item__head">
<h2 class="blog-item__head__title simple" role="heading" aria-level="2">
{{ page.pageTitle }}
</h2>
<time class="blog-item__head__meta">
{{ page.date | date("d.m.Y")}}
{# {% if author is not empty %}#}
{# | <strong>{{ author.name }}</strong>#}
{# {% endif %}#}
</time>
<div class="article-categories">
{% for tag in page.tags %}
<span>{{ tag.name }}</span>
{% endfor %}
{# {% for category in page.categories %}#}
{# <span>{{ category.name }}</span>#}
{# {% endfor %}#}
</div>
</header>
{% if page.summary is defined and page.summary is not empty %}<p class="blog-item--summary">{{ page.summary }}</p>{% endif %}
{{ render_pageparts(page, 'newsmain') }}
<div class="fb-share-button" data-href="{{ app.request.uri }}" data-layout="button" data-size="large"><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{ app.request.uri }}&src=sdkpreparse" class="fb-xfbml-parse-ignore">Udostępnij</a></div>
</article>
<div class="latest-news col-lg-3">
<h2 role="heading" aria-level="2">{{ 'news.latest_news.read-more' | trans }}</h2>
{{ render_esi(controller('App\\Controller\\NewsArticleController:lastNews', { 'limit' : 3, 'categories' : page.getCategoriesIds } )) }}
<div class="text--right">
{% set categoriesList = "" %}
{% for categoryId in page.getCategoriesIds %}
{% set categoriesList = categoriesList ~ categoryId %}
{% if not loop.last %}
{% set categoriesList = categoriesList ~ ',' %}
{% endif %}
{% endfor %}
<a href="{{ get_url_by_internal_name('news', app.request.locale) }}?category={{ categoriesList }}" class="btn btn--blue">{{ 'news.latest_news.read-more' | trans }}</a>
</div>
</div>
</div>
</div>