{% extends 'front/layouts/base.html.twig' %}
{% block title %}
{{ metaTitle() ? metaTitle() : 'front.menu.references'|trans({}, 'front') }}
{% endblock %}
{% block stylesheets %}
{{ parent() }}
{% endblock %}
{% block body %}
{% set idUrl = app.request.get('id') %}
<div class="container reveal">
{% if blocs is not null %}
{% for bloc in blocs %}
{% include "front/bloc/index.html.twig" %}
{% endfor %}
{% endif %}
<div class="section-ref">
{% if blocs is defined %}
<h1 class="text-center">{{ 'front.references.cases'|trans({}, 'front') }}</h1>
{% endif %}
<div class="responsive-tabs">
<div class="nav-menu-scroll">
<ul class="nav">
{% for itr, souscat in items %}
<li class="nav-item">
<span class="wlc-ws">Welcome</span>
<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>
</li>
{% endfor %}
<li class="nav-item d-lg-block d-md-none d-none">
<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>
</li>
</ul>
</div>
<div class="mt-3 mb-3 text-center d-lg-none d-md-block d-block">
<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>
</div>
<div class="cat-content">
<div class="all-categories">
<div class="row">
{% for itr, PageitemsPage in pages %}
<div class="col-md-6 item-cat-touchscreen">
<div class="card all-card">
<div class="box-img">
{% set image_top = "" %}
{% set image_down, logoPicture = "" , "" %}
{% for key,PageitemsMedia in PageitemsPage %}
{% if PageitemsPage[key].type == constant('App\\Entity\\Medias\\Media::TYPE_MEDIA_VIGNETTE') %}
{% set image_top = asset(uploads_directory ~ PageitemsMedia.media_page_items_path ~ '/' ~ PageitemsMedia.media_page_items_file ) %}
{% elseif PageitemsPage[key].type == constant('App\\Entity\\Medias\\Media::TYPE_MEDIA_STICKY') %}
{% set image_down = asset(uploads_directory ~ PageitemsMedia.media_page_items_path ~ '/' ~ PageitemsMedia.media_page_items_file ) %}
{% elseif PageitemsPage[key].type == constant('App\\Entity\\Medias\\Media::TYPE_MEDIA_LOGO_PICTURE') %}
{% set logoPicture = asset(uploads_directory ~ PageitemsMedia.media_page_items_path ~ '/' ~ PageitemsMedia.media_page_items_file ) %}
{% endif %}
{% endfor %}
<a href="{{ path('front_page_show', {"slug": PageitemsPage[0].slug}) }}">
<div style="background-image:url({{image_top}}) ;background-repeat: no-repeat; background-position: center;background-size:cover; ;" class="img1 card-img-ref">
</div>
</a>
<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">
</div>
{% if logoPicture %} <img src="{{ logoPicture }}" class="card-img-macaron"> {% endif %}
</div>
<div class="card-box">
{% if PageitemsPage[0].description %}
{{PageitemsPage[0].description | raw}}
<a href="{{ path('front_page_show', {"slug": PageitemsPage[0].slug}) }}" class="btn btn-ref">{{ 'front.actions.read_more'|trans({}, 'front') }}</a>
{% endif %}
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block javascripts %}
{{ parent() }}
{% endblock %}