{% extends "base.html.twig" %}
{% block metaTags %}
{% set title = siteTitle %}
{% set desc = siteTitle %}
{% if subCategoryActive %}
{% set title = subCategoryActive.metaTitle ?? (siteTitle ~ " - " ~ subCategoryActive.title) %}
{% set desc = subCategoryActive.metaDescription ?? (subCategoryActive.description) %}
{% elseif categoryActive %}
{% set title = categoryActive.metaTitle ?? (siteTitle ~ " - " ~ categoryActive.title) %}
{% set desc = categoryActive.metaDescription ?? (categoryActive.description) %}
{% endif %}
{% set desc = (subCategoryActive and subCategoryActive.metaDescription) ? subCategoryActive.metaDescription : (categoryActive and categoryActive.metaDescription) ? categoryActive.metaDescription : siteTitle %}
<meta name="description" content="{{ desc }}">
<title>{{ title }}</title>
<meta property="og:title" content="{{ title }}">
<meta property="og:description" content="{{ desc }}">
{% endblock %}
{% block body %}
{% if categoryActive.isChaine %}
{% if subCategoryActive %}
{% include "front/header.html.twig" with {
'icon':(subCategoryActive.subCategoryFileName ? asset(vich_uploader_asset(subCategoryActive, 'subCategoryFile')) : null),
"img":(subCategoryActive.subCategoryBgFileName ? asset(vich_uploader_asset(subCategoryActive, 'subCategoryBgFile')) : null),
"title":subCategoryActive.title,
"intro":subCategoryActive.intro,
} %}
{% endif %}
{% else %}
{% include "front/header.html.twig" with {
'icon':asset(vich_uploader_asset(categoryActive, 'categoryFile')),
"img":(categoryActive.categoryBgFileName ? asset(vich_uploader_asset(categoryActive, 'categoryBgFile')) : null),
"title":categoryActive.title,
"intro":categoryActive.intro,
} %}
{% endif %}
<section class="pat-30 position-relative">
<div class="container">
{% set menu = ((categoryActive.isChaine and subCategoryActive) ?
{
(categoryActive.title):"#",
(subCategoryActive.title):"#",
} :
{
(categoryActive.title):"#",
}) %}
{% include "front/menu.html.twig" with {'menu':menu} %}
</div>
{% if categoryActive.isChaine %}
{% include "front/productsFooter.html.twig" with {
'img':(subCategoryActive.subCategoryFileName ? asset(vich_uploader_asset(subCategoryActive, 'subCategoryFile')) : null),
"title":subCategoryActive.title,
"content":subCategoryActive.description,
} %}
{% else %}
{% include "front/productsFooter.html.twig" with {
'img':asset(vich_uploader_asset(categoryActive, 'categoryFile')),
"title":categoryActive.title,
"content":categoryActive.description,
} %}
{% endif %}
{% include "front/coordinates.html.twig" %}
<div class="container">
<div class="js-prods-list mat-0 mab-90">
{% include "form/productsFilterForm.html.twig" %}
<div class="products row justify-content-center-md">
{% for key, product in products %}
{% include "front/productListDetail.html.twig" %}
{% endfor %}
</div>
{% if total > limit %}
<div class="text-center">
<div class="btn btn1 loadMoreProducts" data-limit="{{ limit }}">
<div class="btn-text">
{# <i class="fa-solid fa-arrows-rotate mar-5"></i> #}
{{ "products.load_more.btn"|trans }}
</div>
</div>
</div>
{% endif %}
</div>
</div>
</section>
{% if categoryActive.isChaine %}
{% if subCategoryActive %}
<section class="position-relative pab-65">
<div class="bgp-center otherCatProd bgs-cover w-100 position-absolute t-0 l-0 h-100 zi--1"
style="background-image:url({{ asset('assets/img/procatbg.png')|imagine_filter('large') }})">
</div>
{% if otherSubCategories|length >= 1 and otherSubCategories|length <= 2 %}
<div class="position-relative">
<div class=" daorgy daorgy1 position-absolute t-0 l-0 h-100"></div>
{% if otherSubCategories|length >= 2 %}
<div class=" daorgy daorgy2 position-absolute t-0 r-0 h-100"></div>
{% endif %}
<div class="container">
<div class="row">
{% for key, otherSubCategory in otherSubCategories %}
<div class="col-sm-6 mat-15 mat-0-sm c-white {{ key is even ? "par-30-sm" : "pal-30-sm" }}">
<div data-link
class="pointer pay-50 bgc-15683A otherCat otherChaineCat otherCat{{loop.index}} skew {{ key is even ? "par-100-md par-25" : "pal-100-md pal-25" }}">
<div class="row align-items-center position-relative skew-text {{ key is odd ? "flex-row-reverse" }}">
<div data-aos="fade-up" data-aos-duration="800" data-aos-delay="600" class="position-absolute {{ key is odd ? "r-15" : 'l-15'}}">
<i class="fa fa-arrow-{{ key is even ? "left" : "right" }}"></i>
</div>
<div class="col-sm-12 text-center animateText">
<div class="uvflnd" data-aos="fade-up" data-aos-duration="800">
{% if otherSubCategory.subCategoryFileName %}
<img src="{{ asset(vich_uploader_asset(otherSubCategory, 'subCategoryFile')) }}"
alt="{{ otherSubCategory.title }}" class="wi-50 img-white"/>
{% endif %}
</div>
<h3 class="buhnsn mab-5 mat-0 noAmericana">
<a data-aos="fade-up" data-aos-duration="800" data-aos-delay="200" href="{{ path('front_products', {'catSlug':categoryActive.slug, "subCatSlug":otherSubCategory.slug}) }}"
class="cofaes">
{{ otherSubCategory.title }}
</a>
</h3>
<div data-aos="fade-up" data-aos-duration="800" data-aos-delay="400" class="ocgaes pmb0">
{{ otherSubCategory.intro|raw }}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}
</section>
{% endif %}
{% else %}
<section class="position-relative pab-65">
<div class="bgp-center bgs-cover w-100 position-absolute t-0 l-0 h-100 zi--1"
style="background-image:url({{ asset('assets/img/procatbg.png')|imagine_filter('large') }})">
</div>
<div class="container">
{% for key, otherCategory in otherCategories %}
<div data-link
class="pointer pay-50 bgc-15683A skew otherCat otherCatNoChaine cclmlw mx-auto c-white par-70-lg par-50-md par-40">
<div class="row align-items-center skew-text position-relative">
<div class="col-sm-12 text-center">
<div class="uvflnd" data-aos="fade-up" data-aos-duration="800">
<img src="{{ asset(vich_uploader_asset(otherCategory, 'categoryFile')) }}"
alt="{{ otherCategory.title }}" class="wi-50 img-white" />
</div>
<h3 class="buhnsn mab-5 mat-15">
<a data-aos="fade-up" data-aos-duration="800" data-aos-delay="200" href="{{ path('front_products', {'catSlug':otherCategory.slug}) }}"
class="cofaes">
{{ otherCategory.title }}
</a>
</h3>
<div class="ocgaes pmb0" data-aos="fade-up" data-aos-duration="800" data-aos-delay="400">
{{ otherCategory.listingIntro|raw }}
</div>
</div>
<div data-aos="fade-left" data-aos-duration="800" data-aos-delay="600" class="position-absolute r-0 text-right">
<i class="fa fa-arrow-right"></i>
</div>
</div>
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% endblock %}