{% import "@SyliusShop/Common/Macro/money.html.twig" as money %}
{% extends '@SyliusShop/layout.html.twig' %}
{% block title %}
{% if noindex is not defined %}
{{ taxon.seoTitle|default(taxon.name) }} | {{ parent() }}
{% else %}
{{ taxon.seoTitle|default(taxon.name) }} - {{ metaFiltre }} | {{ parent() }}
{% endif %}
{% endblock %}
{% block metatags %}
{{ parent() }}
{% if taxon.seoMetaDescription is not empty %}
<meta name="description" content="{{ taxon.seoMetaDescription }}" />
{% endif %}
{% if noindex is defined and noindex %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
{% block content %}
{# Fil d'ariane #}
{{ wo_render_breadcrumbs() }}
<div class="categorie lastlevel">
<div class="categorie-top">
{# <img src="{{ asset('webapic-theme/images/categorielastlevel-bg-top.jpg') }}" class="bg lazyload"> #}
<img src="{{ asset('webapic-theme/images/categorielastlevel-bg-top-noel.jpg') }}" class="bg lazyload">
<div class="categorie-top-left {% if taxon.description is empty %}full{% endif %}">
<h1>{{ taxon.name }}</h1>
</div>
{% if taxon.description is not empty %}
<div class="categorie-top-right">
{# {% if is_mobile() %} #}
<div>
<input type="checkbox" id="expanded">
<div>{{ taxon.description|raw }}</div>
<label for="expanded" role="button">Voir plus</label>
</div>
{# {% else %}
{{ taxon.description|raw }}
{% endif %} #}
</div>
{% endif %}
</div>
{% if variants|length < 5 %}
{% set bloc_image = 4 %}
{% elseif variants|length < 11 %}
{% set bloc_image = 10 %}
{% else %}
{% set bloc_image = 16 %}
{% endif %}
<div class="categorie-listing">
{% if is_mobile() and not is_device('iPad') %}
<div class="mobile-filters">
<div class="mobile-filters-left">
{{ 'app.front.listing.filter'|trans }}
</div>
<div class="mobile-filters-right">
{{ 'app.front.listing.sort'|trans }}
</div>
</div>
{% endif %}
<div id="products-top">
{# Filtres à facettes #}
{% include 'partials/block-facet-filters.html.twig' with {
'ajaxUrl': path('app_taxon_ajax_list', {'taxonId': taxon.id})
} %}
{# Ordre des résultats #}
{% include 'partials/block-sort-results.html.twig' %}
</div>
<div class="ui six cards listing1 containergrid containergrid{{ bloc_image }} js-ajax-list-products" data-offset="0" id="products" {{ sylius_test_html_attribute('products') }} {% if filtreUrl != '' %}data-filtreUrl={{ filtreUrl }} {% endif %}>
{% include 'taxons/taxon_list_products_ajax.html.twig' with {
'variants': variants,
'taxon': taxon
} only %}
</div>
<div class="btn-lien" style="display: {{ totalResults > maxViewResults ? 'flex' : 'none' }};">
<button class="js-ajax-more-products" data-add-to-offset="{{ maxViewResults }}">Voir +</button>
</div>
{% if totalResults > maxViewResults %}
<div class="pagination" data-total="{{ totalResults }}"> <span>{{ maxViewResults }}</span> sur {{ totalResults }}</div>
{% endif %}
</div>
{% if taxon.singleArticle is not empty %}
{% include 'partials/block-article-guide.html.twig' with {'article': taxon.singleArticle} only %}
{% endif %}
{% include 'partials/block-dejavu.html.twig' %}
{% if taxon.rectangleOrangeText is not empty %}
<div class="bandeauorange">
<div class="bandeauorange-ctn">
{% if taxon.getImagesByType('image_taxon_rectangle_orange')|length > 0 %}
<img src="{{ taxon.getImagesByType('image_taxon_rectangle_orange').first.path|imagine_filter('app_taxon_image_taxon_rectangle_orange') }}" class="ui image" />
{% endif %}
{{ taxon.rectangleOrangeText|raw }}
{% if taxon.rectangleOrangeTextButton is not empty and taxon.rectangleOrangeTextUrl is not empty %}
<a href="{{ taxon.rectangleOrangeTextUrl }}">{{ taxon.rectangleOrangeTextButton }}</a>
{% endif %}
</div>
</div>
{% endif %}
{% include 'taxons/taxon_referencement_block.html.twig' with {
'taxon': taxon,
'referencementllinks': referencementllinks
} only %}
</div>
{% endblock %}