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:
@ -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 %}
|
||||
|
Reference in New Issue
Block a user