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

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