<?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;
/* components/molecules/banner/banner.html.twig */
class __TwigTemplate_287c41d23d98a327402b716392168d81 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", "components/molecules/banner/banner.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/molecules/banner/banner.html.twig"));
// line 1
$macros["storyblok"] = $this->macros["storyblok"] = $this->load("macros/storyblok.html.twig", 1)->unwrap();
// line 2
yield "
";
// line 3
$context["bannerModifiers"] = "";
// line 4
if (array_key_exists("bannerStyle", $context)) {
// line 5
yield " ";
$context["bannerModifiers"] = (((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 5, $this->source); })()) . " banner--") . (isset($context["bannerStyle"]) || array_key_exists("bannerStyle", $context) ? $context["bannerStyle"] : (function () { throw new RuntimeError('Variable "bannerStyle" does not exist.', 5, $this->source); })()));
// line 6
yield "
";
// line 7
if (((isset($context["bannerStyle"]) || array_key_exists("bannerStyle", $context) ? $context["bannerStyle"] : (function () { throw new RuntimeError('Variable "bannerStyle" does not exist.', 7, $this->source); })()) == "content-box")) {
// line 8
yield " ";
$context["bannerHeadlineModifier"] = " headline--background";
// line 9
yield " ";
}
}
// line 11
if ((array_key_exists("invertColor", $context) && ((isset($context["invertColor"]) || array_key_exists("invertColor", $context) ? $context["invertColor"] : (function () { throw new RuntimeError('Variable "invertColor" does not exist.', 11, $this->source); })()) == true))) {
// line 12
yield " ";
$context["bannerModifiers"] = ((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 12, $this->source); })()) . " banner--invert");
}
// line 14
if ((array_key_exists("overlay", $context) && ((isset($context["overlay"]) || array_key_exists("overlay", $context) ? $context["overlay"] : (function () { throw new RuntimeError('Variable "overlay" does not exist.', 14, $this->source); })()) == true))) {
// line 15
yield " ";
$context["bannerModifiers"] = ((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 15, $this->source); })()) . " banner--overlay");
}
// line 17
if (array_key_exists("button", $context)) {
// line 18
yield " ";
$context["button"] = Twig\Extension\CoreExtension::map($this->env, (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 18, $this->source); })()), function ($__buttonItem__) use ($context, $macros) { $context["buttonItem"] = $__buttonItem__; return Twig\Extension\CoreExtension::merge((isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), ["text" => ((CoreExtension::getAttribute($this->env, $this->source, ($context["buttonItem"] ?? null), "label", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), "label", [], "any", false, false, false, 18), ((CoreExtension::getAttribute($this->env, $this->source, ($context["buttonItem"] ?? null), "text", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), "text", [], "any", false, false, false, 18), "")) : ("")))) : (((CoreExtension::getAttribute($this->env, $this->source, ($context["buttonItem"] ?? null), "text", [], "any", true, true, false, 18)) ? (Twig\Extension\CoreExtension::default(CoreExtension::getAttribute($this->env, $this->source, (isset($context["buttonItem"]) || array_key_exists("buttonItem", $context) ? $context["buttonItem"] : (function () { throw new RuntimeError('Variable "buttonItem" does not exist.', 18, $this->source); })()), "text", [], "any", false, false, false, 18), "")) : (""))))]); });
}
// line 20
yield "
";
// line 21
$context["inner"] = ('' === $tmp = \Twig\Extension\CoreExtension::captureOutput((function () use (&$context, $macros, $blocks) {
// line 22
yield " <div class=\"banner__background\">
<div class=\"banner__image\">
";
// line 25
yield " ";
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["banner"]) || array_key_exists("banner", $context) ? $context["banner"] : (function () { throw new RuntimeError('Variable "banner" does not exist.', 25, $this->source); })()), ["class" => "banner__img-element image__src--cover", "objectFit" => "cover"]);
// line 28
yield "
</div>
<div class=\"banner__image-overlay\"></div>
</div>
<div class=\"banner__inner\">
<div class=\"banner__content\">
";
// line 34
if (array_key_exists("headline", $context)) {
// line 35
yield " <div class=\"banner__headline\">
";
// line 37
yield " ";
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["headline"]) || array_key_exists("headline", $context) ? $context["headline"] : (function () { throw new RuntimeError('Variable "headline" does not exist.', 37, $this->source); })()), ["class" => ("headline--no-spacing" . (( // line 38
array_key_exists("bannerHeadlineModifier", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["bannerHeadlineModifier"]) || array_key_exists("bannerHeadlineModifier", $context) ? $context["bannerHeadlineModifier"] : (function () { throw new RuntimeError('Variable "bannerHeadlineModifier" does not exist.', 38, $this->source); })()))) : ("")))]);
// line 39
yield "
</div>
";
}
// line 42
yield "
";
// line 43
if (array_key_exists("subheadline", $context)) {
// line 44
yield " <div class=\"banner__subheadline\">
";
// line 46
yield " ";
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["subheadline"]) || array_key_exists("subheadline", $context) ? $context["subheadline"] : (function () { throw new RuntimeError('Variable "subheadline" does not exist.', 46, $this->source); })()), ["class" => "headline--no-spacing"]);
// line 48
yield "
</div>
";
}
// line 51
yield "
";
// line 52
if (array_key_exists("description", $context)) {
// line 53
yield " <div class=\"banner__description\">
";
// line 55
yield " ";
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["description"]) || array_key_exists("description", $context) ? $context["description"] : (function () { throw new RuntimeError('Variable "description" does not exist.', 55, $this->source); })()), ["class" => "banner__text"]);
// line 57
yield "
</div>
";
}
// line 60
yield "
";
// line 61
if (array_key_exists("button", $context)) {
// line 62
yield " ";
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 62, $this->source); })())) > 1)) {
// line 63
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 63, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["buttonItem"]) {
// line 64
yield " <div class=\"banner__action\">
";
// line 65
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, $context["buttonItem"]);
yield "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['buttonItem'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 68
yield " ";
} else {
// line 69
yield " ";
$context["buttonclean"] = Twig\Extension\CoreExtension::first($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 69, $this->source); })()));
// line 70
yield " <div class=\"banner__action\">
";
// line 71
yield $this->extensions['App\Module\Cms\Twig\Functions\StoryblokExtension']->render($this->env, (isset($context["buttonclean"]) || array_key_exists("buttonclean", $context) ? $context["buttonclean"] : (function () { throw new RuntimeError('Variable "buttonclean" does not exist.', 71, $this->source); })()), ["href" => false]);
// line 73
yield "
</div>
";
}
// line 76
yield " ";
}
// line 77
yield " </div>
</div>
";
yield from [];
})())) ? '' : new Markup($tmp, $this->env->getCharset());
// line 80
yield "
";
// line 81
if ((array_key_exists("button", $context) && (Twig\Extension\CoreExtension::length($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 81, $this->source); })())) == 1))) {
// line 82
yield " <a class=\"banner";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 82, $this->source); })()), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("class", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 82, $this->source); })()))) : ("")), "html", null, true);
yield "\" href=\"";
yield Twig\Extension\CoreExtension::spaceless($macros["storyblok"]->getTemplateForMacro("macro_storyblokLink", $context, 82, $this->getSourceContext())->macro_storyblokLink(...[CoreExtension::getAttribute($this->env, $this->source, Twig\Extension\CoreExtension::first($this->env->getCharset(), (isset($context["button"]) || array_key_exists("button", $context) ? $context["button"] : (function () { throw new RuntimeError('Variable "button" does not exist.', 82, $this->source); })())), "href", [], "any", false, false, false, 82)]));
yield "\">
";
// line 83
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["inner"]) || array_key_exists("inner", $context) ? $context["inner"] : (function () { throw new RuntimeError('Variable "inner" does not exist.', 83, $this->source); })()), "html", null, true);
yield "
</a>
";
} else {
// line 86
yield " <div class=\"banner";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["bannerModifiers"]) || array_key_exists("bannerModifiers", $context) ? $context["bannerModifiers"] : (function () { throw new RuntimeError('Variable "bannerModifiers" does not exist.', 86, $this->source); })()), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(((array_key_exists("class", $context)) ? (Twig\Extension\CoreExtension::default((isset($context["class"]) || array_key_exists("class", $context) ? $context["class"] : (function () { throw new RuntimeError('Variable "class" does not exist.', 86, $this->source); })()))) : ("")), "html", null, true);
yield "\">
";
// line 87
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["inner"]) || array_key_exists("inner", $context) ? $context["inner"] : (function () { throw new RuntimeError('Variable "inner" does not exist.', 87, $this->source); })()), "html", null, true);
yield "
</div>
";
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "components/molecules/banner/banner.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 233 => 87, 226 => 86, 220 => 83, 211 => 82, 209 => 81, 206 => 80, 200 => 77, 197 => 76, 192 => 73, 190 => 71, 187 => 70, 184 => 69, 181 => 68, 172 => 65, 169 => 64, 164 => 63, 161 => 62, 159 => 61, 156 => 60, 151 => 57, 148 => 55, 145 => 53, 143 => 52, 140 => 51, 135 => 48, 132 => 46, 129 => 44, 127 => 43, 124 => 42, 119 => 39, 117 => 38, 115 => 37, 112 => 35, 110 => 34, 102 => 28, 99 => 25, 95 => 22, 93 => 21, 90 => 20, 86 => 18, 84 => 17, 80 => 15, 78 => 14, 74 => 12, 72 => 11, 68 => 9, 65 => 8, 63 => 7, 60 => 6, 57 => 5, 55 => 4, 53 => 3, 50 => 2, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% import 'macros/storyblok.html.twig' as storyblok %}
{% set bannerModifiers = '' %}
{% if bannerStyle is defined %}
{% set bannerModifiers = bannerModifiers ~ ' banner--' ~ bannerStyle %}
{% if bannerStyle == 'content-box' %}
{% set bannerHeadlineModifier = ' headline--background' %}
{% endif %}
{% endif %}
{% if invertColor is defined and invertColor == true%}
{% set bannerModifiers = bannerModifiers ~ ' banner--invert' %}
{% endif %}
{% if overlay is defined and overlay == true%}
{% set bannerModifiers = bannerModifiers ~ ' banner--overlay' %}
{% endif %}
{% if button is defined %}
{% set button = button|map((buttonItem) => buttonItem|merge({ text: buttonItem.label|default(buttonItem.text|default('')) })) %}
{% endif %}
{% set inner %}
<div class=\"banner__background\">
<div class=\"banner__image\">
{# atoms/image #}
{{ render_storyblok(banner, {
class: 'banner__img-element image__src--cover',
objectFit: 'cover'
}) }}
</div>
<div class=\"banner__image-overlay\"></div>
</div>
<div class=\"banner__inner\">
<div class=\"banner__content\">
{% if headline is defined %}
<div class=\"banner__headline\">
{# atoms/headline #}
{{ render_storyblok(headline, {
class: 'headline--no-spacing' ~ bannerHeadlineModifier|default,
}) }}
</div>
{% endif %}
{% if subheadline is defined %}
<div class=\"banner__subheadline\">
{# atoms/headline #}
{{ render_storyblok(subheadline, {
class: 'headline--no-spacing',
}) }}
</div>
{% endif %}
{% if description is defined %}
<div class=\"banner__description\">
{# atoms/paragraph or molecules/text-list #}
{{ render_storyblok(description, {
class: 'banner__text',
}) }}
</div>
{% endif %}
{% if button is defined %}
{% if button|length > 1 %}
{% for buttonItem in button %}
<div class=\"banner__action\">
{{ render_storyblok(buttonItem) }}
</div>
{% endfor %}
{% else %}
{% set buttonclean = button|first %}
<div class=\"banner__action\">
{{ render_storyblok(buttonclean, {
href: false,
}) }}
</div>
{% endif %}
{% endif %}
</div>
</div>
{% endset %}
{% if button is defined and button|length == 1 %}
<a class=\"banner{{ bannerModifiers }} {{ class|default }}\" href=\"{{ storyblok.storyblokLink((button|first).href)|spaceless }}\">
{{ inner }}
</a>
{% else %}
<div class=\"banner{{ bannerModifiers }} {{ class|default }}\">
{{ inner }}
</div>
{% endif %}
", "components/molecules/banner/banner.html.twig", "/var/www/html/templates/default/components/molecules/banner/banner.html.twig");
}
}