<div class="news-boxes row">
{% for article in news |slice(0, 6) %}
{% set newssnode = get_node_translation_for(article) %}
<article
class="news-box col-sm-4{% for tag in article.tags %}{% if tag.id == 3 %} photo{% endif %}{% if tag.id == 2 %} video{% endif %}{% endfor %}">
<a href="{{ path('_slug', {'url': newssnode.url}) }}{% if refererString is defined and refererString is not empty %}?path={{ refererString }}{% endif %}">
<div class="news-box__img">
{% if article.listImage and article.listImage is not empty %}
{% set img = article.listImage | first %}
{% elseif article.headerImage and article.headerImage is not empty %}
{% set img = article.headerImage | first %}
{% else %}
{% set img = {
'cropping' : null,
'media' : {
'url' : get_default_article_image(),
},
'mediaAlt' : 'GdyĆskie Centrum Sportu'
}
%}
{% endif %}
{% if img is defined and img is not empty %}
{% set fullSrc = croppedImgSrc(img.media.url, img.cropping, { w: 450, h: 300, q: 80 }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, jml_img_large.preview) %}
<img class="lazy"
src="{{ previewSrc }}" data-src="{{ fullSrc }}"
alt="{% if img.mediaAlt %}{{ img.mediaAlt }}{% else %}{{ article.title | striptags }}{% endif %}" />
{% else %}
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=="
alt="">
{% endif %}
{% set img = null %}
<div class="news-box__read-more">
{{ 'news.read-more' | trans }}
</div>
</div>
<div class="news-box__caption">
<h3 role="heading" aria-level="3">{{ article.title }}</h3>
</div>
<div class="news-box__date">
<time datetime="{{ article.date | date("d.m.Y") }}">{{ article.date | date("d.m.Y") }}</time>
</div>
</a>
</article>
{% endfor %}
</div>