<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
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;
/* @NdTheme/storefront/page/recent-products/products.html.twig */
class __TwigTemplate_42edc367e205a40656df1c6d05c3e1d2 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'element_product_slider_controls' => [$this, 'block_element_product_slider_controls'],
];
}
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", "@NdTheme/storefront/page/recent-products/products.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@NdTheme/storefront/page/recent-products/products.html.twig"));
// line 1
$context["elementId"] = twig_random($this->env);
// line 2
$this->displayBlock('element_product_slider_controls', $context, $blocks);
// line 30
echo "<div class=\"!overflow-x-scroll hide-scrollbar slick-after-md flex slick-init slick-init-ajax slick-arrows-center slick-space-1 slick-equal-height slick-padding-left-8 md:!overflow-x-hidden lg:!grid lg:boxed-layout\"
\t data-slick='{
\"infinite\": false,
\t\t\"variableWidth\": true,
\"slidesToScroll\": 1,
\t\t\"slidesToShow\": 5.5,
\"speed\": 800,
\t\t\"prevArrow\": \"#prev-slide-";
// line 37
echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html", null, true);
echo "\",
\t\t\"nextArrow\": \"#next-slide-";
// line 38
echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html", null, true);
echo "\",
\t\t\"mobileFirst\": false,
\t\t\"responsive\": [ { \"breakpoint\": 768, \"settings\": \"unslick\" } ]
}' id=\"recently-viewed\">
\t";
// line 42
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["products"] ?? null), "elements", [], "any", false, false, false, 42));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["product"]) {
// line 43
echo "\t\t<div class=\"product-slider-item !w-[232px] md:!w-[264px] mr-2\">
\t\t\t";
// line 44
$this->loadTemplate("@Storefront/storefront/component/product/card/box.html.twig", "@NdTheme/storefront/page/recent-products/products.html.twig", 44)->display(twig_array_merge($context, ["layout" => sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, // line 45
$context["product"], "boxLayout", [], "any", false, false, false, 45), "value", [], "any", false, false, false, 45), "displayMode" => sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, // line 46
$context["product"], "displayMode", [], "any", false, false, false, 46), "value", [], "any", false, false, false, 46)]));
// line 48
echo "\t\t</div>
\t";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['product'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 50
echo "\t<div class=\"product-slider-item\">
\t</div>
\t<div class=\"product-slider-item\">
\t</div>
</div>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
public function block_element_product_slider_controls($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", "element_product_slider_controls"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "element_product_slider_controls"));
// line 3
echo "\t<div class=\"flex justify-between\">
\t\t<div class=\"mt-auto flex flex-col\">
\t\t\t<span class=\"recently-viewed-products-subtitle mb-2 text-xs uppercase text-grey-900 font-bold font-accent tracking-wider md:text-sm\">";
// line 5
echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SwSanitizeTwigFilter']->sanitize($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("themeGlobal.recentlyViewedSubtitle"));
echo "</span>
\t\t\t<span class=\"recently-viewed-products-title mb-6 text-2xl font-display font-bold md:text-4xl\">";
// line 6
echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SwSanitizeTwigFilter']->sanitize($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("themeGlobal.recentlyViewedTitle"));
echo "</span>
\t\t</div>
\t\t<div class=\"flex justify-end\">
\t\t\t<div class=\"product-slider-controls-container mb-6 boxed-layout lg:mt-10 hidden md:block\">
\t\t\t\t<div class=\"flex grid-gap-2 justify-end\">
\t\t\t\t\t<button id=\"prev-slide-";
// line 11
echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html", null, true);
echo "\"
\t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center\">
\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
\t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
\t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
\t\t\t\t\t\t</svg>
\t\t\t\t\t</button>
\t\t\t\t\t<button id=\"next-slide-";
// line 18
echo sw_escape_filter($this->env, ($context["elementId"] ?? null), "html", null, true);
echo "\"
\t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center rotate-180\">
\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
\t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
\t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
\t\t\t\t\t\t</svg>
\t\t\t\t\t</button>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@NdTheme/storefront/page/recent-products/products.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 159 => 18, 149 => 11, 141 => 6, 137 => 5, 133 => 3, 123 => 2, 107 => 50, 92 => 48, 90 => 46, 89 => 45, 88 => 44, 85 => 43, 68 => 42, 61 => 38, 57 => 37, 48 => 30, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% set elementId = random() %}
{% block element_product_slider_controls %}
\t<div class=\"flex justify-between\">
\t\t<div class=\"mt-auto flex flex-col\">
\t\t\t<span class=\"recently-viewed-products-subtitle mb-2 text-xs uppercase text-grey-900 font-bold font-accent tracking-wider md:text-sm\">{{ \"themeGlobal.recentlyViewedSubtitle\"|trans|sw_sanitize }}</span>
\t\t\t<span class=\"recently-viewed-products-title mb-6 text-2xl font-display font-bold md:text-4xl\">{{ \"themeGlobal.recentlyViewedTitle\"|trans|sw_sanitize }}</span>
\t\t</div>
\t\t<div class=\"flex justify-end\">
\t\t\t<div class=\"product-slider-controls-container mb-6 boxed-layout lg:mt-10 hidden md:block\">
\t\t\t\t<div class=\"flex grid-gap-2 justify-end\">
\t\t\t\t\t<button id=\"prev-slide-{{ elementId }}\"
\t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center\">
\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
\t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
\t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
\t\t\t\t\t\t</svg>
\t\t\t\t\t</button>
\t\t\t\t\t<button id=\"next-slide-{{ elementId }}\"
\t\t\t\t\t\t\tclass=\"products-back flex p-1 transition duration-300 active:-translate-x-0.5 hover:-translate-x-0.5 w-10 h-10 border rounded-sm border-black flex justify-center items-center rotate-180\">
\t\t\t\t\t\t<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\"
\t\t\t\t\t\t\t stroke=\"currentColor\" class=\"w-5 h-5 p-[2px] rotate-180\">
\t\t\t\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 4.5l7.5 7.5-7.5 7.5\"/>
\t\t\t\t\t\t</svg>
\t\t\t\t\t</button>
\t\t\t\t</div>
\t\t\t</div>
\t\t</div>
\t</div>
{% endblock %}
<div class=\"!overflow-x-scroll hide-scrollbar slick-after-md flex slick-init slick-init-ajax slick-arrows-center slick-space-1 slick-equal-height slick-padding-left-8 md:!overflow-x-hidden lg:!grid lg:boxed-layout\"
\t data-slick='{
\"infinite\": false,
\t\t\"variableWidth\": true,
\"slidesToScroll\": 1,
\t\t\"slidesToShow\": 5.5,
\"speed\": 800,
\t\t\"prevArrow\": \"#prev-slide-{{ elementId }}\",
\t\t\"nextArrow\": \"#next-slide-{{ elementId }}\",
\t\t\"mobileFirst\": false,
\t\t\"responsive\": [ { \"breakpoint\": 768, \"settings\": \"unslick\" } ]
}' id=\"recently-viewed\">
\t{% for product in products.elements %}
\t\t<div class=\"product-slider-item !w-[232px] md:!w-[264px] mr-2\">
\t\t\t{% sw_include '@Storefront/storefront/component/product/card/box.html.twig' with {
\t\t\t\t'layout': product.boxLayout.value,
\t\t\t\t'displayMode': product.displayMode.value,
\t\t\t} %}
\t\t</div>
\t{% endfor %}
\t<div class=\"product-slider-item\">
\t</div>
\t<div class=\"product-slider-item\">
\t</div>
</div>
", "@NdTheme/storefront/page/recent-products/products.html.twig", "/var/www/dev/deployer/releases/56/custom/static-plugins/NdTheme/src/Resources/views/storefront/page/recent-products/products.html.twig");
}
}