<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
/* @SyliusShop/Product/index.html.twig */
class __TwigTemplate_1b1e158c639ecda361a2c0899d607227 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@SyliusShop/layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Product/index.html.twig"));
$this->parent = $this->loadTemplate("@SyliusShop/layout.html.twig", "@SyliusShop/Product/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_content($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo " <div class=\"header-image\">
<img class=\"img-header-destock\" src=\"";
// line 5
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("header-image.png", "shop"), "html", null, true);
echo "\" alt=\"cover\">
<img class=\"img-header-responsive\" src=\"";
// line 6
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("header-image-responsive.png", "shop"), "html", null, true);
echo "\" alt=\"cover\">
<div class=\"text-header\">
";
// line 9
if (((isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 9, $this->source); })()) == null)) {
// line 10
echo " <h1>Boutique</h1>
<ul>
";
// line 12
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["taxons"]);
foreach ($context['_seq'] as $context["_key"] => $context["taxons"]) {
// line 13
echo " <li class=\"link-taxons-header\"><a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env, $this->source, $context["taxons"], "code", [], "any", false, false, false, 13)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["taxons"], "translations", [], "any", false, false, false, 13), "toArray", [], "method", false, false, false, 13), "fr_FR", [], "array", false, false, false, 13), "name", [], "any", false, false, false, 13), "html", null, true);
echo "</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxons'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 15
echo " </ul>
";
} elseif ((twig_get_attribute($this->env, $this->source, // line 16
(isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 16, $this->source); })()), "code", [], "any", false, false, false, 16) == "categories")) {
// line 17
echo "
<h1>Boutique</h1>
<ul>
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($context["taxons"]);
foreach ($context['_seq'] as $context["_key"] => $context["taxons"]) {
// line 21
echo " <li class=\"link-taxons-header\"><a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env, $this->source, $context["taxons"], "code", [], "any", false, false, false, 21)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["taxons"], "translations", [], "any", false, false, false, 21), "toArray", [], "method", false, false, false, 21), "fr_FR", [], "array", false, false, false, 21), "name", [], "any", false, false, false, 21), "html", null, true);
echo "</a></li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxons'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 23
echo " </ul>
";
} else {
// line 25
echo " <div class=\"title-header\">
<h1>";
// line 26
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 26, $this->source); })()), "translations", [], "any", false, false, false, 26), "toArray", [], "method", false, false, false, 26), "fr_FR", [], "array", false, false, false, 26), "name", [], "any", false, false, false, 26), "html", null, true);
echo "</h1>
";
// line 27
$context["ancestors"] = twig_reverse_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 27, $this->source); })()), "ancestors", [], "any", false, false, false, 27));
// line 28
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["ancestors"]) || array_key_exists("ancestors", $context) ? $context["ancestors"] : (function () { throw new RuntimeError('Variable "ancestors" does not exist.', 28, $this->source); })()), 0, [], "array", false, false, false, 28), "code", [], "any", false, false, false, 28)]), "html", null, true);
echo "\">
<svg width=\"39\" height=\"29\" viewBox=\"0 0 39 29\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M14.75 0.25L18.075 3.69375L9.64375 12.125L38.5 12.125V16.875L9.64375 16.875L18.075 25.3063L14.75 28.75L0.499995 14.5L14.75 0.25Z\" fill=\"white\"/>
</svg>
</a>
</div>
<ul>
";
// line 35
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["taxons"]) || array_key_exists("taxons", $context) ? $context["taxons"] : (function () { throw new RuntimeError('Variable "taxons" does not exist.', 35, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["taxon"]) {
// line 36
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["taxon"], "code", [], "any", false, false, false, 36) == twig_get_attribute($this->env, $this->source, (isset($context["slug"]) || array_key_exists("slug", $context) ? $context["slug"] : (function () { throw new RuntimeError('Variable "slug" does not exist.', 36, $this->source); })()), "code", [], "any", false, false, false, 36))) {
// line 37
echo "
";
} else {
// line 39
echo " <li class=\"link-taxons-header\"><a href=\"";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => twig_get_attribute($this->env, $this->source, $context["taxon"], "code", [], "any", false, false, false, 39)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["taxon"], "translations", [], "any", false, false, false, 39), "toArray", [], "method", false, false, false, 39), "fr_FR", [], "array", false, false, false, 39), "name", [], "any", false, false, false, 39), "html", null, true);
echo "</a></li>
";
}
// line 41
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['taxon'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 42
echo " </ul>
";
}
// line 44
echo " </div>
</div>
<div class=\"container-h\" id=\"container-category-page\">
";
// line 47
$this->loadTemplate("@SyliusShop/Product/Index/_header.html.twig", "@SyliusShop/Product/index.html.twig", 47)->display($context);
// line 48
echo "
<div class=\"ui stackable grid\">
<div class=\"four wide column\" id=\"filtre-container\">
<div class=\"header-filter-responsive\">
<h3 class=\"title-category-page\">Boutique</h3>
<i class=\"x icon\" id=\"close-icon-filter\"></i>
</div>
";
// line 55
$this->loadTemplate("@SyliusShop/Product/Index/_sidebar.html.twig", "@SyliusShop/Product/index.html.twig", 55)->display($context);
// line 56
echo " <form method=\"POST\" action=\"";
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => "categories"]);
echo "\" class=\"form_category_index\">
";
// line 57
$this->loadTemplate("@SyliusShop/Product/Index/pricebar.html.twig", "@SyliusShop/Product/index.html.twig", 57)->display($context);
// line 58
echo " ";
$this->loadTemplate("@SyliusShop/Product/Index/colorbar.html.twig", "@SyliusShop/Product/index.html.twig", 58)->display($context);
// line 59
echo " ";
$this->loadTemplate("@SyliusShop/Product/Index/sizebar.html.twig", "@SyliusShop/Product/index.html.twig", 59)->display($context);
// line 64
echo "
<button type=\"submit\" class=\"submit-button-filter\">Rechercher</button>
</form>
</div>
<div class=\"twelve wide column\" id=\"main-index-product\">
";
// line 69
$this->loadTemplate("@SyliusShop/Product/Index/_main.html.twig", "@SyliusShop/Product/index.html.twig", 69)->display($context);
// line 70
echo " </div>
</div>
</div>
<script>
function toggleDiv(divClass, toggleBtnClass) {
// Sélectionnez la div avec la classe donnée
const div = document.querySelector(`.\${divClass}`);
// Sélectionnez le bouton à basculer avec la classe donnée
const toggleBtn = document.querySelector(`.\${toggleBtnClass}`);
// Ajoutez un gestionnaire d'événements au clic sur le bouton à basculer
// toggleBtn.addEventListener('click', () => {
// Changez le style de la div pour la masquer ou l'afficher
div.style.display = (div.style.display === 'none') ? 'block' : 'none';
// Changez le texte du bouton à basculer en fonction de l'état de la div
toggleBtn.textContent = (div.style.display === 'none') ? '+' : '-';
// });
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Product/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 220 => 70, 218 => 69, 211 => 64, 208 => 59, 205 => 58, 203 => 57, 198 => 56, 196 => 55, 187 => 48, 185 => 47, 180 => 44, 176 => 42, 170 => 41, 162 => 39, 158 => 37, 155 => 36, 151 => 35, 140 => 28, 138 => 27, 134 => 26, 131 => 25, 127 => 23, 116 => 21, 112 => 20, 107 => 17, 105 => 16, 102 => 15, 91 => 13, 87 => 12, 83 => 10, 81 => 9, 75 => 6, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends '@SyliusShop/layout.html.twig' %}
{% block content %}
<div class=\"header-image\">
<img class=\"img-header-destock\" src=\"{{ asset('header-image.png', 'shop') }}\" alt=\"cover\">
<img class=\"img-header-responsive\" src=\"{{ asset('header-image-responsive.png', 'shop') }}\" alt=\"cover\">
<div class=\"text-header\">
{% if slug == null %}
<h1>Boutique</h1>
<ul>
{% for taxons in taxons %}
<li class=\"link-taxons-header\"><a href=\"{{ path('sylius_shop_product_index', {slug : taxons.code}) }}\">{{ taxons.translations.toArray()['fr_FR'].name }}</a></li>
{% endfor %}
</ul>
{% elseif slug.code == 'categories' %}
<h1>Boutique</h1>
<ul>
{% for taxons in taxons %}
<li class=\"link-taxons-header\"><a href=\"{{ path('sylius_shop_product_index', {slug : taxons.code}) }}\">{{ taxons.translations.toArray()['fr_FR'].name }}</a></li>
{% endfor %}
</ul>
{% else %}
<div class=\"title-header\">
<h1>{{ slug.translations.toArray()['fr_FR'].name }}</h1>
{% set ancestors = slug.ancestors|reverse %}
<a href=\"{{ path('sylius_shop_product_index', {slug : ancestors[0].code}) }}\">
<svg width=\"39\" height=\"29\" viewBox=\"0 0 39 29\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">
<path d=\"M14.75 0.25L18.075 3.69375L9.64375 12.125L38.5 12.125V16.875L9.64375 16.875L18.075 25.3063L14.75 28.75L0.499995 14.5L14.75 0.25Z\" fill=\"white\"/>
</svg>
</a>
</div>
<ul>
{% for taxon in taxons %}
{% if taxon.code == slug.code %}
{% else %}
<li class=\"link-taxons-header\"><a href=\"{{ path('sylius_shop_product_index', {slug : taxon.code}) }}\">{{ taxon.translations.toArray()['fr_FR'].name }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
</div>
<div class=\"container-h\" id=\"container-category-page\">
{% include '@SyliusShop/Product/Index/_header.html.twig' %}
<div class=\"ui stackable grid\">
<div class=\"four wide column\" id=\"filtre-container\">
<div class=\"header-filter-responsive\">
<h3 class=\"title-category-page\">Boutique</h3>
<i class=\"x icon\" id=\"close-icon-filter\"></i>
</div>
{% include '@SyliusShop/Product/Index/_sidebar.html.twig' %}
<form method=\"POST\" action=\"{{ path('sylius_shop_product_index', {slug : 'categories'}) }}\" class=\"form_category_index\">
{% include '@SyliusShop/Product/Index/pricebar.html.twig' %}
{% include '@SyliusShop/Product/Index/colorbar.html.twig' %}
{% include '@SyliusShop/Product/Index/sizebar.html.twig' %}
{# {% include '@SyliusShop/Product/Index/statebar.html.twig' %}#}
{# {% include '@SyliusShop/Product/Index/brandbar.html.twig' %}#}
{# {% include '@SyliusShop/Product/Index/vendortypebar.html.twig' %}#}
{# {% include '@SyliusShop/Product/Index/locationbar.html.twig' %}#}
<button type=\"submit\" class=\"submit-button-filter\">Rechercher</button>
</form>
</div>
<div class=\"twelve wide column\" id=\"main-index-product\">
{% include '@SyliusShop/Product/Index/_main.html.twig' %}
</div>
</div>
</div>
<script>
function toggleDiv(divClass, toggleBtnClass) {
// Sélectionnez la div avec la classe donnée
const div = document.querySelector(`.\${divClass}`);
// Sélectionnez le bouton à basculer avec la classe donnée
const toggleBtn = document.querySelector(`.\${toggleBtnClass}`);
// Ajoutez un gestionnaire d'événements au clic sur le bouton à basculer
// toggleBtn.addEventListener('click', () => {
// Changez le style de la div pour la masquer ou l'afficher
div.style.display = (div.style.display === 'none') ? 'block' : 'none';
// Changez le texte du bouton à basculer en fonction de l'état de la div
toggleBtn.textContent = (div.style.display === 'none') ? '+' : '-';
// });
}
</script>
{% endblock %}
", "@SyliusShop/Product/index.html.twig", "/var/www/Bikers/templates/bundles/SyliusShopBundle/Product/index.html.twig");
}
}