templates/ajax/realisation.html.twig line 1

Open in your IDE?
  1. <div class="portfolio-ajax-page realisation-ajax">
  2.     <div class="container-fluid">
  3.         <div class="carousel" data-dots="true" data-lightbox="gallery" id="carousel{{ realisation.id }}" data-loop="false" data-adaptive-height="true">
  4.             {% if realisation.image %}
  5.                 <div class="portfolio-item img-zoom classic-style ct-photography ct-media ct-branding ct-Media">
  6.                     <div class="portfolio-item-wrap">
  7.                         <div class="portfolio-image">
  8.                             <a target="_blank" href="{{ absolute_url(asset('images/upload/' ~ realisation.image)) }}">
  9.                                 <img src="{{ asset('images/upload/' ~ realisation.image) }}" alt="">
  10.                             </a>
  11.                         </div>
  12.                     </div>
  13.                 </div>
  14.             {% endif %}
  15.             <!-- portfolio item -->
  16.             {% for image in realisation.images %}
  17.                 <div class="portfolio-item img-zoom classic-style ct-photography ct-media ct-branding ct-Media">
  18.                     <div class="portfolio-item-wrap">
  19.                         <div class="portfolio-image">
  20.                             <a target="_blank" href="{{ absolute_url(asset(image.url)) }}">
  21.                                 <img src="{{ asset(image.url) }}" alt="{{ image.altDesc }}">
  22.                             </a>
  23.                         </div>
  24.                     </div>
  25.                 </div>
  26.             {% endfor %}
  27.         </div>
  28.     </div>
  29.     <div class="container">
  30.         <div class="project-description">
  31.             <h2>{{ realisation.titre }}</h2>
  32.             <h5>{{ realisation.adresse }}</h5>
  33.             <div>{{ realisation.contenu | raw }}</div>
  34.             <div>
  35.                 <ul class="pagination pagination-flat justify-content-arround realisationNavigation">
  36.                     {% if generalS.hasPreviousRealisation(realisation.id) %}
  37.                         <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>
  38.                     {% endif %}
  39.                     {% if generalS.hasNextRealisation(realisation.id) %}
  40.                         <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>
  41.                     {% endif %}
  42.                 </ul>
  43.             </div>
  44.         </div>
  45.     </div>
  46. </div>
  47. <script>
  48.     INSPIRO.elements.magnificPopup()
  49.     $('#carousel{{ realisation.id }}').on('ready.flickity', () => {
  50.         setTimeout(function(){
  51.             if($('#carousel{{ realisation.id }}').data('flickity').slides.length <= 1){
  52.                 $('#carousel{{ realisation.id }}').find('.flickity-button').addClass('d-none')
  53.             }
  54.         },500)
  55.     })
  56. </script>