<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* home/homePage/_header.html.twig */
class __TwigTemplate_5c2d29d97317198d67dedf844f28ef59 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "home/homePage/_header.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "home/homePage/_header.html.twig"));
// line 1
$context["image"] = $this->env->getRuntime('PN\ContentBundle\Twig\VarsRuntime')->getDynamicContentAttribute(8, false);
// line 2
if (Twig\Extension\CoreExtension::testEmpty((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 2, $this->source); })()))) {
// line 3
yield " ";
$context["image"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("/assets/img/placeholder-landscape.webp");
}
// line 5
yield "<div class=\"l-featured-section l-featured-section--logo-only ui-featured-section ui-featured-section--logo-only lazyload\"
data-bg=\"";
// line 6
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 6, $this->source); })()), "html", null, true);
yield "\"
data-delay=\"5000\"
>
<div class=\"l-featured-section-content\">
";
// line 10
yield $this->env->getRuntime('PN\ContentBundle\Twig\VarsRuntime')->editDynamicContentAttribute(8);
yield "
<div class=\"l-container l-container--phone-spacing\">
<div class=\"l-featured-section-logo-container\">
";
// line 14
yield " <h1 class=\"l-hidden-page-title\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('App\CMSBundle\Twig\SiteSettingVarsRuntime')->getSiteSetting("website-title"), "html", null, true);
yield "</h1>
</div>
</div>
</div>
</div>
";
// line 21
if ((($tmp = !Twig\Extension\CoreExtension::testEmpty((isset($context["banners"]) || array_key_exists("banners", $context) ? $context["banners"] : (function () { throw new RuntimeError('Variable "banners" does not exist.', 21, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 22
yield " <div class=\"ui-featured-floating-banners-section l-featured-floating-banners-section\">
<div class=\"l-container l-container--phone-slider-spacing l-container--position-relative\">
<div class=\"swiper l-slider-row\" data-l-slider=\"featured-floating-banners\">
<div class=\"l-flex-row l-flex-row--nowrap l-flex-row--spacing-0 swiper-wrapper\">
";
// line 26
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["banners"]) || array_key_exists("banners", $context) ? $context["banners"] : (function () { throw new RuntimeError('Variable "banners" does not exist.', 26, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["banner"]) {
// line 27
yield " ";
$context["image"] = $this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "image", [], "any", false, false, false, 27), "assetPath", [], "any", false, false, false, 27));
// line 28
yield "
";
// line 30
$context["hasLink"] = false;
// line 31
yield "
";
// line 32
if (((CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "url", [], "any", false, false, false, 32) != "#") && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "url", [], "any", false, false, false, 32)))) {
// line 33
yield " ";
$context["hasLink"] = true;
// line 34
yield " ";
}
// line 35
yield " <div class=\"l-flex-col-lg-3 swiper-slide\">
<";
// line 36
yield (((($tmp = (isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 36, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("a") : ("div"));
yield "
class=\"l-featured-floating-banner ui-featured-floating-banner\"
";
// line 38
if (((isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 38, $this->source); })()) === true)) {
// line 39
yield " href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("banner_redirect", ["id" => CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "id", [], "any", false, false, false, 39)]), "html", null, true);
yield "\"
";
}
// line 41
yield " ";
yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "openInNewTab", [], "any", false, false, false, 41)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("target=\"_blank\" rel=\"noreferrer\"") : ("rel=\"dofollow\""));
yield "
>
<img
class=\"l-featured-floating-banner-img lazyload\"
width=\"388\"
height=\"304\"
data-expand=\"-20\"
data-delay=\"5000\"
src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"
data-src=\"";
// line 50
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('PN\MediaBundle\Twig\VarsRuntime')->setWebpExtension((isset($context["image"]) || array_key_exists("image", $context) ? $context["image"] : (function () { throw new RuntimeError('Variable "image" does not exist.', 50, $this->source); })()), null, 304), "html", null, true);
yield "\"
alt=\"";
// line 51
yield (((($tmp = !(null === CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "title", [], "any", false, false, false, 51))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "title", [], "any", false, false, false, 51), "html", null, true)) : ("Ad"));
yield "\"
/>
<div class=\"l-featured-floating-banner-caption ui-featured-floating-banner-caption\">
<h2 class=\"ui-featured-floating-banner-caption-title l-featured-floating-banner-caption-title\">";
// line 54
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "title", [], "any", false, false, false, 54), "html", null, true);
yield "</h2>
<p class=\"ui-featured-floating-banner-caption-txt l-featured-floating-banner-caption-txt\">";
// line 55
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["banner"], "text", [], "any", false, false, false, 55), "html", null, true);
yield "</p>
</div>
";
// line 57
yield (((($tmp = (isset($context["hasLink"]) || array_key_exists("hasLink", $context) ? $context["hasLink"] : (function () { throw new RuntimeError('Variable "hasLink" does not exist.', 57, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("</a>") : ("</div>"));
yield "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['banner'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 60
yield " </div>
</div>
</div>
<div class=\"swiper-pagination\" data-l-slider-pagination=\"featured-floating-banners\"></div>
<div class=\"swiper-button-prev\" data-l-slider-navigation-prev=\"featured-floating-banners\"></div>
<div class=\"swiper-button-next\" data-l-slider-navigation-next=\"featured-floating-banners\"></div>
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "home/homePage/_header.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 172 => 60, 163 => 57, 158 => 55, 154 => 54, 148 => 51, 144 => 50, 131 => 41, 125 => 39, 123 => 38, 118 => 36, 115 => 35, 112 => 34, 109 => 33, 107 => 32, 104 => 31, 102 => 30, 98 => 28, 95 => 27, 91 => 26, 85 => 22, 83 => 21, 72 => 14, 66 => 10, 59 => 6, 56 => 5, 52 => 3, 50 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set image = getDCA(8, false) %}
{% if image is empty %}
{% set image = asset('/assets/img/placeholder-landscape.webp') %}
{% endif %}
<div class=\"l-featured-section l-featured-section--logo-only ui-featured-section ui-featured-section--logo-only lazyload\"
data-bg=\"{{ image }}\"
data-delay=\"5000\"
>
<div class=\"l-featured-section-content\">
{{ editDCA(8) }}
<div class=\"l-container l-container--phone-spacing\">
<div class=\"l-featured-section-logo-container\">
{# {% include \"fe/icons/logo.svg\" %}#}
<h1 class=\"l-hidden-page-title\">{{ getSiteSetting(\"website-title\") }}</h1>
</div>
</div>
</div>
</div>
{% if banners is not empty %}
<div class=\"ui-featured-floating-banners-section l-featured-floating-banners-section\">
<div class=\"l-container l-container--phone-slider-spacing l-container--position-relative\">
<div class=\"swiper l-slider-row\" data-l-slider=\"featured-floating-banners\">
<div class=\"l-flex-row l-flex-row--nowrap l-flex-row--spacing-0 swiper-wrapper\">
{% for banner in banners %}
{% set image = asset(banner.image.assetPath) %}
{% set hasLink = false %}
{% if banner.url != '#' and banner.url is not empty %}
{% set hasLink = true %}
{% endif %}
<div class=\"l-flex-col-lg-3 swiper-slide\">
<{{ hasLink ? \"a\":\"div\" }}
class=\"l-featured-floating-banner ui-featured-floating-banner\"
{% if hasLink is same as (true) %}
href=\"{{ path('banner_redirect', {'id':banner.id}) }}\"
{% endif %}
{{ banner.openInNewTab ? 'target=\"_blank\" rel=\"noreferrer\"' : 'rel=\"dofollow\"' }}
>
<img
class=\"l-featured-floating-banner-img lazyload\"
width=\"388\"
height=\"304\"
data-expand=\"-20\"
data-delay=\"5000\"
src=\"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\"
data-src=\"{{ image|webp(null, 304) }}\"
alt=\"{{ banner.title is not null ? banner.title : \"Ad\" }}\"
/>
<div class=\"l-featured-floating-banner-caption ui-featured-floating-banner-caption\">
<h2 class=\"ui-featured-floating-banner-caption-title l-featured-floating-banner-caption-title\">{{ banner.title }}</h2>
<p class=\"ui-featured-floating-banner-caption-txt l-featured-floating-banner-caption-txt\">{{ banner.text }}</p>
</div>
{{ hasLink ? \"</a>\" : \"</div>\" }}
</div>
{% endfor %}
</div>
</div>
</div>
<div class=\"swiper-pagination\" data-l-slider-pagination=\"featured-floating-banners\"></div>
<div class=\"swiper-button-prev\" data-l-slider-navigation-prev=\"featured-floating-banners\"></div>
<div class=\"swiper-button-next\" data-l-slider-navigation-next=\"featured-floating-banners\"></div>
</div>
{% endif %}
", "home/homePage/_header.html.twig", "/var/www/esorus-shop/templates/home/homePage/_header.html.twig");
}
}