{% if resource.items is not empty %}
<section class="objects-pp">
<div class="object-overlay">
<div class="slick-arrows">
<div>
<button type="button" class="slick-prev slick-arrow" style=""><i class="fas fa-chevron-left"></i></button>
<button type="button" class="slick-next slick-arrow" style=""><i class="fas fa-chevron-right"></i></button>
</div>
</div>
<div class="object-box__text">
<h2 role="heading" aria-level="2"><span>{{ resource.header | nl2br }}</span></h2>
<a href="{{ resource.linkUrl|replace_url }}" class="btn btn--blue" {% if resource.linkNewWindow %}target="_blank" rel="noopener"{% endif %}>{{ resource.linkText }}</a>
</div>
</div>
<div class="objects-slider">
{% for item in resource.items | sortbyfield('displayOrder') %}
<div class="object-slide">
<div class="object-box">
<div class="object-box__text">
<div class="object-name">
<a href="{{ item.linkUrl | replace_url }}" {% if item.linkNewWindow %} target="_blank" rel="noopener"{% endif %}>
{{ item.name }}
</a>
</div>
</div>
<div class="object-box__img">
{% set img = (item.image) ? item.image : null %}
{% if img is null %}
{% set img = {
'url' : get_default_article_image(),
'mediaAlt' : 'GdyĆskie Centrum Sportu'
} %}
{% endif %}
{% if img is not null and img is not empty %}
{% set fullSrc = croppedImgSrc(img.url, item.cropping, { h: 630, w: 910, q: 80, fit: 'crop' }) %}
<a href="{{ item.linkUrl | replace_url }}" {% if item.linkNewWindow %} target="_blank" rel="noopener"{% endif %}>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice">
{% if item.imageAltText %}<title>{{ item.imageAltText }}</title>{% endif %}
<clipPath id="objectClip{{ item.id }}">
{# <polygon points="0, 0, 0.97, 0, 0.83, 1.0, 0, 1.0"/>#}
<polygon points="100 0, 100 100, 40 100, 0 30, 20 0" />
</clipPath>
<image height="90%" width="100%" preserveAspectRatio="xMidYMid slice" clip-path="url('#objectClip{{ item.id }}')" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{{ fullSrc }}" />
</svg>
{# <img src="{{ glideUrl('webimages', img.url) }}{{ cropString }}" {% if item.imageAltText %}alt="{{ item.imageAltText }}"{% endif %} />#}
</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% endif %}