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

Open in your IDE?
  1. {% set parametre = ParametreSite() %}
  2. {% set position_texte = "" %}
  3. {% if bloc.positiontext == 2 %}
  4.     {% set position_texte = "pos3"  %}
  5. {% elseif bloc.positiontext == 1 %}
  6.     {% set position_texte = "pos2"  %}
  7. {% else %}
  8.     {% set position_texte = "pos1"  %}
  9. {% endif %}
  10. {% set type_affiche = "" %}
  11. {% if bloc.nombrearticle == 1 %}
  12.     {% set type_affiche = "type_affiche1"  %}
  13. {% elseif bloc.nombrearticle == 2 %}
  14.     {% set type_affiche = "type_affiche2"  %}
  15. {% else %}
  16.     {% set type_affiche = "type_affiche3"  %}
  17. {% endif %}
  18. {% if bloc.actif_slider == 1 %}
  19.     {% set type_affiche = type_affiche ~ " owl-carousel"  %}
  20. {% endif %}
  21. <section class="all-services py-4" {% if bloc.bgimage %}style="background-image: url('{{asset(bloc.bgimage)}}');"{% endif %} >       
  22.         {% if bloc.blocServiceItems %}
  23.             <div class="container-fluid">
  24.                 <div class="list_blocs {{position_texte}}">
  25.                     <div class="cnt_blocs">
  26.                         {% if bloc.positiontext != 0 and bloc.positiontext != 1 %}
  27.                             <div class="container-fluid wrapper">
  28.                         {% endif %}
  29.                             <h1 class="wow fadeInUp">{{bloc.title}}</h1>
  30.                             {% if bloc.content is not empty  %}<div>{{bloc.content|raw}}</div>{% endif %}
  31.                             
  32.                             {% if bloc.typelien != 1 %}
  33.                                 {% if bloc.typelien == '4' %}
  34.                                     <div class="text-center py-2">
  35.                                         <a href="javascript:void(0)" onclick="window.location.href = 'tel:{{bloc.telephone}}';" class="btn btn-back-pulse">{{bloc.titrelien}}</a>
  36.                                     </div>
  37.                                 {% elseif bloc.typelien == '2' %}
  38.                                     <div class="text-center py-2">
  39.                                         <a href="{{bloc.lieninterne}}" class="btn btn-back-pulse">{{bloc.titrelien}}</a>
  40.                                     </div>
  41.                                 {% elseif bloc.typelien == '3' %}
  42.                                     <div class="text-center py-2">
  43.                                         <a href="{{bloc.lienexterne}}" class="btn btn-back-pulse">{{bloc.titrelien}}</a>
  44.                                     </div>
  45.                                 {% endif %}
  46.                             {% endif %}
  47.                         {% if bloc.positiontext != 0 and bloc.positiontext != 1 %}
  48.                             </div>
  49.                         {% endif %}
  50.                     </div>
  51.                     <div class="blocs">
  52.                         <div class="results affichage3 {{type_affiche}}">
  53.                             {% set duree = 0.3 %}
  54.                             {% for key,item in bloc.blocServiceItems|filter(v => v.actif == true) %}
  55.                                 {% if item.typelien == 1 %}
  56.                                         {% set url = '#' %}
  57.                                 {% elseif item.typelien == 2 %}
  58.                                     {% set url = item.lieninterne %}
  59.                                 {% elseif item.typelien == 3 %}
  60.                                     {% set url = item.lienexterne %}
  61.                                 {% elseif item.typelien == 4 %}
  62.                                     {% set url = 'tel:+'~ item.telephone %}
  63.                                 {% endif %}
  64.                                
  65.                                 {% set image = item.image != ''? item.image:'/uploads/images/'~ parametre.imagevide %}
  66.                                 <div class="article wow fadeInDown animated" data-wow-delay="{{duree}}s">
  67.                                     <a class="absolute_link" href="{{url}}" title="{{item.title}}">                                
  68.                                         <span class="article-image">
  69.                                             <img alt="{{item.title}}" src="{{asset_image(image)}}" class="img-fluid">
  70.                                         </span>        
  71.                                         <div class="article-cnt">
  72.                                             <h3 class="article-titre">{{item.title}}</h3>
  73.                                         </div>
  74.                                     </a>    
  75.                                 </div>
  76.                                 {% set duree = duree + 0.2  %}
  77.                             {% endfor %}
  78.                         </div>
  79.                     </div>
  80.                 </div>
  81.             </div>
  82.         {% endif %}
  83. </section>