2
0
mirror of https://github.com/inventree/inventree-website.git synced 2025-06-12 01:55:37 +00:00

Adds gallery to functions page

This commit is contained in:
Oliver Walters
2022-08-09 11:50:23 +10:00
parent 161ed501ad
commit 43159f75eb
17 changed files with 31 additions and 3 deletions

View File

@ -26,6 +26,35 @@
{% if include.image %}
<img class="object-cover object-center rounded" alt="hero" src="{{ include.image }}">
{% endif %}
{% if include.gallery %}
<section id='image-carousel' class='splide'>
<div class='splide__track'>
<ul class='splide__list' style='list-style-type: none; list-style: none;'>
{% for image in site.static_files %}
{% if image.path contains include.gallery %}
<li class='splide__slide'>
<img src="{{ image.path | relative_url }}" alt="" />
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</section>
{% endif %}
</div>
</div>
</section>
</section>
{% if include.gallery %}
<script>
document.addEventListener( 'DOMContentLoaded', function () {
new Splide('#image-carousel', {
type: 'loop',
perPage: 1,
autoPlay: true,
pagination: false,
}).mount();
});
</script>
{% endif %}