<section class="content">
{% if (resource.getMedia | length > 1) %}
<div class="gallery" id="gallery-{{ resource.id }}">
<div class="gallery-boxes">
{% for media in resource.getMedia %}
{% if ( media and media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set imgUrl = croppedImgSrc(media.url, null, { w: 1400, q: 80, fit: 'max' }) %}
{% set fullSrcUrl = croppedImgSrc(media.url, null, { w: 1920, q: 80 }) %}
{% set previewSrc = croppedImgSrc(media.url, null, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(fullSrcUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ media.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
alt="{{ 'gallery.image_alt' | trans }}" />
</a>
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-nav">
{% for media in resource.getMedia %}
{% if ( media and media.contentType != "application/octet-stream") %}
<div class="gallery-thumb">
{% set imgUrl = croppedImgSrc(media.url, null, { w: 180, q: 80, fit: 'crop' }) %}
{% set previewSrc = croppedImgSrc(media.url, null, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
alt="{{ 'gallery.image_alt' | trans }}" />
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-clearfix"></div>
</div>
<div class="gallery fullscreen" id="gallery-fullscreen-{{ resource.id }}">
<div class="gallery-boxes">
{% for media in resource.getMedia %}
{% if ( media and media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set imgUrl = croppedImgSrc(media.url, null, { w: 1920, q: 80, fit: 'max' }) %}
{% set previewSrc = croppedImgSrc(media.url, null, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(imgUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ media.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
alt="{{ 'gallery.image_alt' | trans }}" />
</a>
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-nav">
{% for media in resource.getMedia %}
{% if ( media and media.contentType != "application/octet-stream") %}
<div class="gallery-thumb">
{% set imgUrl = croppedImgSrc(media.url, null, { w: 180, q: 80, fit: 'crop' }) %}
{% set previewSrc = croppedImgSrc(media.url, null, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
alt="{{ 'gallery.image_alt' | trans }}" />
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-clearfix"></div>
<div class="gallery-close"><i class="fas fa-times"></i></div>
<div class="gallery-caption">
</div>
</div>
{% else %}
<div class="gallery" id="gallery-{{ resource.id }}">
<div class="gallery-boxes">
{% for media in resource.getMedia %}
{% if ( media and media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set imgUrl = croppedImgSrc(media.url, null, { w: 1400, q: 80, fit: 'max' }) %}
{% set fullSrcUrl = croppedImgSrc(media.url, null, { w: 1920, q: 80 }) %}
{% set previewSrc = croppedImgSrc(media.url, null, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(fullSrcUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ media.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
alt="{{ 'gallery.image_alt' | trans }}" />
</a>
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="gallery fullscreen" id="gallery-fullscreen-{{ resource.id }}">
<div class="gallery-boxes">
{% for media in resource.getMedia %}
{% if ( media and media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set imgUrl = croppedImgSrc(media.url, null, { w: 1920, q: 80, fit: 'max' }) %}
{% set previewSrc = croppedImgSrc(media.url, null, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(imgUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ media.id }}">
<img class="lazy" src="previewSrc" data-src="{{ imgUrl }}"
alt="{{ 'gallery.image_alt' | trans }}" />
</a>
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-clearfix"></div>
<div class="gallery-close"><i class="fas fa-times"></i></div>
<div class="gallery-caption">
</div>
</div>
{% endif %}
</section>