<section class="content">
{% if (resource.images | length > 1) %}
<div class="gallery" id="gallery-{{ resource.id }}">
<div class="gallery-boxes">
{% for image in resource.images %}
{% if ( image.media and image.media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set img = image ? image : null %}
{% if img is not null and img is not empty %}
{% set imgUrl = croppedImgSrc(img.media.url, img.cropping, { w: 1400, q: 80 }) %}
{% set fullSrcUrl = croppedImgSrc(img.media.url, img.cropping, { w: 1920, q: 80 }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(fullSrcUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ img.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
{% if img.altText %}alt="{{ img.altText }}"{% endif %} />
</a>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-nav">
{% for image in resource.images %}
{% if ( image.media and image.media.contentType != "application/octet-stream") %}
<div class="gallery-thumb">
{% set img = image ? image : null %}
{% if img is not null and img is not empty %}
{% set imgUrl = croppedImgSrc(img.media.url, img.cropping, { w: 180, q: 80, fit: 'crop' }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<img class="lazy"
src="{{ previewSrc }}" data-src="{{ imgUrl }}"
{% if img.altText %}alt="{{ img.altText }}"{% endif %} />
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-clearfix"></div>
</div>
<div class="gallery fullscreen" id="gallery-fullscreen-{{ resource.id }}">
<div class="gallery-boxes">
{% for image in resource.images %}
{% if ( image.media and image.media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set img = image ? image : null %}
{% if img is not null and img is not empty %}
{% set imgUrl = croppedImgSrc(img.media.url, img.cropping, { w: 1920, q: 80 }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(imgUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ img.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
{% if img.altText %}alt="{{ img.altText }}"{% endif %} />
</a>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
<div class="gallery-nav">
{% for image in resource.images %}
{% if ( image.media and image.media.contentType != "application/octet-stream") %}
<div class="gallery-thumb">
{% set img = image ? image : null %}
{% if img is not null and img is not empty %}
{% set imgUrl = croppedImgSrc(img.media.url, img.cropping, { w: 180, q: 80, fit: 'crop' }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
{% if img.altText %}alt="{{ img.altText }}"{% endif %} />
{% endif %}
</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 image in resource.images %}
{% if ( image.media and image.media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set img = image ? image : null %}
{% set cropSettings = "?fit=max&w=1400" %}
{% if img is not null and img is not empty %}
{% set imgUrl = croppedImgSrc(img.media.url, img.cropping, { w: 1400, q: 80, fit: 'max' }) %}
{% set fullSrcUrl = croppedImgSrc(img.media.url, img.cropping, { w: 1920, q: 80 }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(fullSrcUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ img.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
{% if img.altText %}alt="{{ img.altText }}"{% endif %} />
</a>
{% endif %}
</div>
{% endif %}
{% endfor %}
</div>
</div>
<div class="gallery fullscreen" id="gallery-fullscreen-{{ resource.id }}">
<div class="gallery-boxes">
{% for image in resource.images %}
{% if ( image.media and image.media.contentType != "application/octet-stream") %}
<div class="gallery-box">
{% set img = image ? image : null %}
{% if img is not null and img is not empty %}
{% set imgUrl = croppedImgSrc(img.media.url, img.cropping, { w: 1920, q: 80, fit: 'max' }) %}
{% set previewSrc = croppedImgSrc(img.media.url, img.cropping, { w: 75, h: 60, q: 50, blur: 20, fit: 'crop' }) %}
<a href="{{ asset(imgUrl) }}"
data-gallery-id="{{ resource.id }}" data-gallery-slide="{{ img.id }}">
<img class="lazy" src="{{ previewSrc }}" data-src="{{ imgUrl }}"
{% if img.altText %}alt="{{ img.altText }}"{% endif %} />
</a>
{% endif %}
</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>