<div class="portfolio-ajax-page realisation-ajax">
<div class="container-fluid">
<div class="carousel" data-dots="true" data-lightbox="gallery" id="carousel{{ realisation.id }}" data-loop="false" data-adaptive-height="true">
{% if realisation.image %}
<div class="portfolio-item img-zoom classic-style ct-photography ct-media ct-branding ct-Media">
<div class="portfolio-item-wrap">
<div class="portfolio-image">
<a target="_blank" href="{{ absolute_url(asset('images/upload/' ~ realisation.image)) }}">
<img src="{{ asset('images/upload/' ~ realisation.image) }}" alt="">
</a>
</div>
</div>
</div>
{% endif %}
<!-- portfolio item -->
{% for image in realisation.images %}
<div class="portfolio-item img-zoom classic-style ct-photography ct-media ct-branding ct-Media">
<div class="portfolio-item-wrap">
<div class="portfolio-image">
<a target="_blank" href="{{ absolute_url(asset(image.url)) }}">
<img src="{{ asset(image.url) }}" alt="{{ image.altDesc }}">
</a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
<div class="container">
<div class="project-description">
<h2>{{ realisation.titre }}</h2>
<h5>{{ realisation.adresse }}</h5>
<div>{{ realisation.contenu | raw }}</div>
<div>
<ul class="pagination pagination-flat justify-content-arround realisationNavigation">
{% if generalS.hasPreviousRealisation(realisation.id) %}
<li class="page-item previous"><a href="{{ path('realisationAjax',{'realisation' : generalS.hasPreviousRealisation(realisation.id)}) }}" data-lightbox="ajax" class="page-link"> <i class="fa fa-angle-left"></i></a></li>
{% endif %}
{% if generalS.hasNextRealisation(realisation.id) %}
<li class="page-item next"><a href="{{ path('realisationAjax',{'realisation' : generalS.hasNextRealisation(realisation.id)}) }}" data-lightbox="ajax" class="page-link"><i class="fa fa-angle-right"></i></a></li>
{% endif %}
</ul>
</div>
</div>
</div>
</div>
<script>
INSPIRO.elements.magnificPopup()
$('#carousel{{ realisation.id }}').on('ready.flickity', () => {
setTimeout(function(){
if($('#carousel{{ realisation.id }}').data('flickity').slides.length <= 1){
$('#carousel{{ realisation.id }}').find('.flickity-button').addClass('d-none')
}
},500)
})
</script>