templates/front/theme1/bloc/bloc.html.twig line 55

Open in your IDE?
  1. {% if bloc is defined and bloc is not empty %}
  2.     {% if bloc.type == 'template' %}
  3.         {% if bloc.template is defined %}
  4.               {{bloc.template|raw}}
  5.         {% endif %}
  6.     {% endif %}
  7.     {% if bloc.type == 'bloc-service' and bloc.data != null %}
  8.         {% if bloc.data.alias == "bloc_travaux" %}
  9.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_travaux.html.twig',{
  10.                 bloc: bloc.data,
  11.             }, with_context = false)}}
  12.         {% elseif bloc.data.alias == "bloc_raisons" %}
  13.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_raisons.html.twig',{
  14.                 bloc: bloc.data,
  15.             }, with_context = false)}}
  16.         {% endif %}         
  17.     {% endif %}
  18.     {% if bloc.type == 'bloc-partenaire' and bloc.data != null %}
  19.           {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_partenaire.html.twig',{
  20.               bloc: bloc.data,
  21.           }, with_context = false)}}     
  22.     {% endif %}
  23.     
  24.     {% if  bloc.type == 'titre' %}
  25.       {% if bloc.title is defined %}
  26.           <div class="text-widget text-widget-{{bloc.id}}">
  27.               {{bloc.title|raw}}
  28.           </div>
  29.       {% endif %}
  30.     {% endif %}
  31.     {% if bloc.type == 'text' %}
  32.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_titre_text.html.twig',{
  33.             bloc: bloc,
  34.         }, with_context = false)}}
  35.     {% endif %}
  36.     {% if bloc.type == 'text2' %}
  37.         {{ include('front/'~ app.request.server.get('APP_THEME') ~'/bloc/bloc_image_text.html.twig',{
  38.             bloc: bloc,
  39.         }, with_context = false)}}
  40.     {% endif %}
  41.     {% if bloc.type == 'form' %}
  42.         {% if bloc.form.identifier == 'form-footer' %}
  43.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_footer.html.twig',{
  44.                 bloc: bloc,
  45.             }, with_context = false)}}
  46.         {% elseif bloc.form.identifier == 'form-contact' %}
  47.            {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/contact_form.html.twig',{
  48.                 bloc: bloc,
  49.             }, with_context = false)}}
  50.         {% elseif bloc.form.identifier == 'form-devis' %}
  51.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/devis_form.html.twig',{
  52.                 bloc: bloc,
  53.             }, with_context = false)}}
  54.         {% elseif bloc.form.identifier == 'form-faq' %}
  55.             {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form_faq.html.twig',{
  56.                 bloc: bloc,
  57.             }, with_context = false)}}
  58.         {% else %}
  59.           {{ include('front/'~ app.request.server.get('APP_THEME') ~'/form/form.html.twig',{
  60.               bloc: bloc,
  61.           }, with_context = false)}}
  62.         {% endif %}
  63.     {% endif %}
  64.     {% if bloc.type == 'slider' and bloc.images is not empty %}
  65.         <div id="carouselDefaultIndicators" class="carousel slide slider-home" data-ride="carousel">
  66.           {% if bloc.images|length > 1 %}
  67.                 <ol class="carousel-indicators">
  68.                   {% for key,image in bloc.images %}
  69.                         <li data-target="#carouselDefaultIndicators" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
  70.                   {% endfor %}
  71.                 </ol>
  72.           {% endif %}
  73.         </div>
  74.     {% endif %}
  75.     {% if bloc.type == 'video' %}
  76.         <section class="all-works espace-p-top text-center panel-st conducteur-trigger text-center">
  77.           <iframe width="962" height="541" src="{{bloc.url_video}}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  78.         </section>
  79.     {% endif %}
  80.     {% if bloc.type == 'image' %}
  81.       <section id="BlocImage" class="BlocImage" {% if bloc.bgimage is defined and bloc.bgimage != null %}style="background: url({{bloc.bgimage}}) no-repeat" {% endif %}>
  82.         <div class="container">
  83.           <div class="text-center">
  84.             <p>{{bloc.title}}</p>
  85.           </div>
  86.         </div>
  87.       </section>
  88.     {% endif %}
  89.     {% if bloc.type == 'carousel' %}
  90.         <div class="BlocCarousel">
  91.               <div class="container-fluid">
  92.                     <div class="row justify-content-center">
  93.                       <div class="col-sm-12 col-md-6 col-lg-6">
  94.                             {% if bloc.images is defined and bloc.images is not empty %}
  95.                                   <div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
  96.                                       {# <ol class="carousel-indicators">
  97.                                           {% for  key,image in bloc.images %}
  98.                                               <li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
  99.                                           {% endfor %}
  100.                                       </ol> #}
  101.                                       <div class="carousel-inner text-center">
  102.                                           {% for  key,file in bloc.images  %}
  103.                                           <div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
  104.                                               {# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
  105.                                                   <img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
  106.                                               </a> #}
  107.                                               <img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel img-fluid" alt="{{file.image}}">
  108.                                           </div>
  109.                                           {% endfor %}
  110.                                       </div>
  111.                                   </div>
  112.                             {% endif %}
  113.                       </div>
  114.                     </div>
  115.               </div>
  116.         </div>
  117.     {% endif %}
  118.     {% if bloc.type == 'carousel2' %}
  119.         <div class="BlocCarousel">
  120.               <div class="container-fluid">
  121.                     <div class="row">
  122.                       {% set carousel2_g1 = bloc.gridcarousel != null? (12 - bloc.gridcarousel):'6' %}
  123.                       {% set carousel2_g2 = bloc.gridcarousel != null? bloc.gridcarousel:'6' %}
  124.                       <div class="col-sm-12 col-md-{{carousel2_g1}} col-lg-{{carousel2_g1}} {{bloc.position == 'left'?'order-2':'order-1'}}">
  125.                             {{bloc.content|raw}}
  126.                       </div>
  127.                       <div class="col-sm-12 col-md-{{carousel2_g2}} col-lg-{{carousel2_g2}} {{bloc.position == 'left'?'order-1':'order-2'}}">
  128.                             {% if bloc.images is defined and bloc.images is not empty %}
  129.                                   <div id="carousel{{bloc.id}}" class="carousel slide" data-ride="carousel">
  130.                                       {# <ol class="carousel-indicators">
  131.                                           {% for  key,image in bloc.images %}
  132.                                               <li data-target="#carousel{{bloc.id}}" data-slide-to="{{key}}" {% if key == '0' %}class="active"{% endif %}></li>
  133.                                           {% endfor %}
  134.                                       </ol> #}
  135.                                       <div class="carousel-inner text-center">
  136.                                           {% for  key,file in bloc.images  %}
  137.                                           <div {% if key == '0' %}class="carousel-item active" {% else %} class="carousel-item" {% endif %}>
  138.                                               {# <a href="{{asset('/uploads/gallery/'~ file.image)}}" data-fancybox="{{file.image}}" data-caption="{{file.image}}" class="icon-loupe">
  139.                                                   <img src="{{asset('/uploads/icons/icone_loupe.png')}}" alt="icon-loupe">
  140.                                               </a> #}
  141.                                               <img src="{{asset('/uploads/gallery/'~ file.image)| imagine_filter('img_carousel')}}" class="img-carousel  img-fluid" alt="{{file.image}}">
  142.                                           </div>
  143.                                           {% endfor %}
  144.                                       </div>
  145.                                   </div>
  146.                             {% endif %}
  147.                       </div>
  148.                     </div>
  149.               </div>
  150.         </div>
  151.     {% endif %}
  152. {% endif %}