<?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;
/* blocks/previews/preview-thematique-logic.html.twig */
class __TwigTemplate_6a3f57bd6f95715c196fb0e26ab9f6bfbb2d9cb1663e60afb9e32bcb70a04ed5 extends Template
{
private $source;
private $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 = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "blocks/previews/preview-thematique-logic.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "blocks/previews/preview-thematique-logic.html.twig"));
// line 1
if ((CoreExtension::getAttribute($this->env, $this->source, ($context["category"] ?? null), "uuid", [], "any", true, true, false, 1) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 1, $this->source); })()), "uuid", [], "any", false, false, false, 1)))) {
// line 2
yield "\t";
$context["page"] = $this->env->getFunction('sulu_content_load')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 2, $this->source); })()), "uuid", [], "any", false, false, false, 2));
}
// line 4
yield "<a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 4, $this->source); })()), "url", [], "any", false, false, false, 4)), "html", null, true);
yield "\" class=\"preview-title tac cwhite nodeco preview-category jcc aic dflex br8 shadow-small shadow-thematiques prelative\">
\t";
// line 5
if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, ($context["page"] ?? null), "content", [], "any", false, true, false, 5), "header_img", [], "any", true, true, false, 5) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 5, $this->source); })()), "content", [], "any", false, false, false, 5), "header_img", [], "any", false, false, false, 5)))) {
// line 6
yield "\t\t<img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6), "formats", [], "any", false, false, false, 6), "sulu-400x400.webp", [], "array", false, false, false, 6), "html", null, true);
yield "\" srcset=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6), "formats", [], "any", false, false, false, 6), "300x.webp", [], "array", false, false, false, 6), "html", null, true);
yield " 300w, ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6), "formats", [], "any", false, false, false, 6), "600x.webp", [], "array", false, false, false, 6), "html", null, true);
yield " 600w, ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6), "formats", [], "any", false, false, false, 6), "1000x.webp", [], "array", false, false, false, 6), "html", null, true);
yield " 1000w\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\AltImageExtension']->getCopyrightOrDescriptionOrTitle(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6)), "html", null, true);
yield "\" width=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6), "fileVersion", [], "any", false, false, false, 6), "properties", [], "any", false, false, false, 6), "width", [], "any", false, false, false, 6), "html", null, true);
yield "\" height=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 6, $this->source); })()), "content", [], "any", false, false, false, 6), "header_img", [], "any", false, false, false, 6), "fileVersion", [], "any", false, false, false, 6), "properties", [], "any", false, false, false, 6), "height", [], "any", false, false, false, 6), "html", null, true);
yield "\" loading=\"lazy\">
\t";
} else {
// line 8
yield "\t\t<img src=\"/resources/img/header-img/header-image.webp\" alt=\"\" width=\"896\" height=\"292\" loading=\"lazy\">
\t";
}
// line 10
yield "\t<div class=\"zi1\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 10, $this->source); })()), "title", [], "any", false, false, false, 10), "html", null, true);
yield "</div>
\t<div class=\"background-color-custom\" style=\"background: ";
// line 11
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 11, $this->source); })()), "content", [], "any", false, false, false, 11), "color", [], "any", false, false, false, 11), "html", null, true);
yield "\"></div>
</a>";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "blocks/previews/preview-thematique-logic.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 84 => 11, 79 => 10, 75 => 8, 57 => 6, 55 => 5, 50 => 4, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% if category.uuid is defined and category.uuid is not empty %}
\t{% set page = sulu_content_load(category.uuid) %}
{% endif %}
<a href=\"{{ sulu_content_path(category.url) }}\" class=\"preview-title tac cwhite nodeco preview-category jcc aic dflex br8 shadow-small shadow-thematiques prelative\">
\t{% if page.content.header_img is defined and page.content.header_img is not empty %}
\t\t<img src=\"{{ page.content.header_img.formats['sulu-400x400.webp'] }}\" srcset=\"{{page.content.header_img.formats['300x.webp']}} 300w, {{page.content.header_img.formats['600x.webp']}} 600w, {{page.content.header_img.formats['1000x.webp']}} 1000w\" alt=\"{{ page.content.header_img | copyright_or_description_or_title }}\" width=\"{{ page.content.header_img.fileVersion.properties.width }}\" height=\"{{ page.content.header_img.fileVersion.properties.height }}\" loading=\"lazy\">
\t{% else %}
\t\t<img src=\"/resources/img/header-img/header-image.webp\" alt=\"\" width=\"896\" height=\"292\" loading=\"lazy\">
\t{% endif %}
\t<div class=\"zi1\">{{ category.title }}</div>
\t<div class=\"background-color-custom\" style=\"background: {{ page.content.color }}\"></div>
</a>", "blocks/previews/preview-thematique-logic.html.twig", "/var/www/html/templates/blocks/previews/preview-thematique-logic.html.twig");
}
}