templates/front/pages/page_category/index.html.twig line 1

Open in your IDE?
  1. {% extends 'front/layouts/base.html.twig' %}
  2. {% block title %}
  3.     {{ metaTitle() ? metaTitle() :   'front.menu.references'|trans({}, 'front')  }}
  4. {% endblock %}
  5. {% block stylesheets %}
  6.     {{ parent() }}
  7. {% endblock %}
  8. {% block body %}
  9.     {% set idUrl = app.request.get('id') %}
  10.     <div class="container reveal">
  11.     {% if blocs is not null  %}
  12.         {% for bloc in blocs %}
  13.             {% include "front/bloc/index.html.twig" %}
  14.         {% endfor %}
  15.     {% endif %}
  16.         <div class="section-ref">
  17.         {% if blocs is defined   %}
  18.             <h1 class="text-center">{{ 'front.references.cases'|trans({}, 'front') }}</h1>
  19.                 {% endif %}
  20.             <div class="responsive-tabs">
  21.                 <div class="nav-menu-scroll">
  22.                     <ul class="nav">
  23.                         {% for itr, souscat in items %}
  24.                             <li class="nav-item">
  25.                             
  26.                                 <span class="wlc-ws">Welcome</span>
  27.                                 <a class="btn cat-touchscreen{% if idUrl == souscat.id %} active{% endif %}" href="{{ path('filter', {'id': souscat.slug_sous_category, 'slug': souscat.item_slug_fr}) }}" id="sousCategorieTitre">{{souscat.sous_category_name}}</a>
  28.                             </li>
  29.                         {% endfor %}
  30.                         <li class="nav-item d-lg-block d-md-none d-none">
  31.                             <a class="btn cat-all" style="text-align: center !important;" {% if page_category is defined %} href="{{ path('filter', {'id': 'voir_tout', 'slug' : page_category.slug}) }}" {% endif %}>{{ 'front.actions.see_all'|trans({}, 'front') }}</a>
  32.                         </li>
  33.                     </ul>
  34.                 </div>
  35.                 <div class="mt-3 mb-3 text-center d-lg-none d-md-block d-block">
  36.                     <a class="btn cat-all" style="text-align: center !important;" {% if page_category is defined %} href="{{ path('filter', {'id': 'voir_tout', 'slug' : page_category.slug }) }}" {% endif %}>{{ 'front.actions.see_all'|trans({}, 'front') }}</a>
  37.                 </div>
  38.                 <div class="cat-content">
  39.                     <div class="all-categories">
  40.                         <div class="row">
  41.                             {% for itr, PageitemsPage in pages %}
  42.                                 <div class="col-md-6 item-cat-touchscreen">
  43.                                     <div class="card all-card">
  44.                                         <div class="box-img">
  45.                                             {% set image_top = "" %}
  46.                                             {% set image_down, logoPicture = "" , "" %}
  47.                                             {% for  key,PageitemsMedia  in PageitemsPage %}
  48.                                                 {% if PageitemsPage[key].type == constant('App\\Entity\\Medias\\Media::TYPE_MEDIA_VIGNETTE') %}
  49.                                                     {% set image_top =  asset(uploads_directory ~ PageitemsMedia.media_page_items_path  ~ '/' ~ PageitemsMedia.media_page_items_file ) %}
  50.                                                 {% elseif PageitemsPage[key].type == constant('App\\Entity\\Medias\\Media::TYPE_MEDIA_STICKY') %}
  51.                                                     {% set image_down =  asset(uploads_directory ~ PageitemsMedia.media_page_items_path  ~ '/' ~ PageitemsMedia.media_page_items_file ) %}
  52.                                                 {% elseif PageitemsPage[key].type == constant('App\\Entity\\Medias\\Media::TYPE_MEDIA_LOGO_PICTURE') %}
  53.                                                     {% set logoPicture =  asset(uploads_directory ~ PageitemsMedia.media_page_items_path  ~ '/' ~ PageitemsMedia.media_page_items_file ) %}
  54.                                                 {% endif %}
  55.                                             {% endfor %}
  56.                                             <a href="{{ path('front_page_show', {"slug": PageitemsPage[0].slug}) }}">
  57.                                                 <div style="background-image:url({{image_top}}) ;background-repeat: no-repeat; background-position: center;background-size:cover; ;" class="img1 card-img-ref">
  58.                                                 </div>
  59.                                             </a>
  60.                                             <div  onclick="window.location='{{path('front_page_show', {"slug": PageitemsPage[0].slug}) }}';" style="background-image:url({{image_down}}) ;background-repeat: no-repeat;background-size: 100%;  background-position: center; cursor:pointer ;" class="img2 card-img-ref">
  61.                                             </div>
  62.                                             {% if logoPicture %} <img src="{{ logoPicture }}" class="card-img-macaron"> {% endif %}
  63.                                         </div>
  64.                                         <div class="card-box">
  65.                                             {% if PageitemsPage[0].description %}
  66.                                                 {{PageitemsPage[0].description | raw}}
  67.                                                 <a href="{{ path('front_page_show', {"slug": PageitemsPage[0].slug}) }}" class="btn btn-ref">{{ 'front.actions.read_more'|trans({}, 'front') }}</a>
  68.                                             {% endif %}
  69.                                         </div>
  70.                                     </div>
  71.                                 </div>
  72.                             {% endfor %}
  73.                         </div>
  74.                     </div>
  75.                 </div>
  76.             </div>
  77.         </div>
  78.     </div>
  79. {% endblock %}
  80. {% block javascripts %}
  81.     {{ parent() }}
  82. {% endblock %}