<!-- *********************** Carrousel *********************** -->
<div id="carousel-home" class="carousel slide slider-mobile hidden-xs hidden-sm" data-ride="carousel">
<!-- Wrapper for slides -->
{% if slider|length > 1%}
<!-- Indicators -->
<ol class="carousel-indicators hidden-xs">
{% for i in range(1, slider|length) %}
<li data-target="#carousel-home" data-slide-to="{{ i-1 }}"{% if loop.index == 1%} class="active"{% endif %}></li>
{% endfor %}
</ol>
{% endif %}
<div class="carousel-inner" role="listbox">
{% if slider is not null %}
{% for slide in slider %}
{% if slide.etat %}
<div class="item{% if loop.index == 1%} active{% endif %}">
<a href="{% if slide.url is not null %}{{ slide.url }}{% else %}#{% endif %}">
<img
src="{{ asset(slide.media.webPath) }}"
srcset="{{ asset(slide.media.webPath | imagine_filter('full_width_320') ) }} 320w,
{{ asset(slide.media.webPath | imagine_filter('full_width_640') ) }} 640w,
{{ asset(slide.media.webPath | imagine_filter('full_width_640') ) }} 768w,
{{ asset(slide.media.webPath | imagine_filter('full_width_1024') ) }} 1024w,
{{ asset(slide.media.webPath | imagine_filter('full_width_1280') ) }} 1280w,
{{ asset(slide.media.webPath | imagine_filter('full_width_1366') ) }} 1366w,
{{ asset(slide.media.webPath | imagine_filter('full_width_1900') ) }} 1900w"
data-sizes="100vw"
alt="{{ slide.titre }}"
loading="lazy" />
</a>
</div>
{% endif %}
{% endfor %}
{% endif %}
</div>
{% if slider|length > 1%}
<a class="left carousel-control" href="#carousel-home" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-home" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
{% endif %}
</div>