<?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;
/* HitsoContentBundle:Front/Article/Elements:image.html.twig */
class __TwigTemplate_f79a8f70a2d1cb7ac7d5ea12acf8e8ef5b28dd2f880340997588e3b5b2b4830c extends \Twig\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_17fc5a9d7f60dc995440a5a315cc27cefd5208dd5c9d418ecd10c2a16ddca18d = $this->extensions["Sentry\\SentryBundle\\Tracing\\Twig\\TwigTracingExtension"];
$__internal_17fc5a9d7f60dc995440a5a315cc27cefd5208dd5c9d418ecd10c2a16ddca18d->enter($__internal_17fc5a9d7f60dc995440a5a315cc27cefd5208dd5c9d418ecd10c2a16ddca18d_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "HitsoContentBundle:Front/Article/Elements:image.html.twig"));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "HitsoContentBundle:Front/Article/Elements:image.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "HitsoContentBundle:Front/Article/Elements:image.html.twig"));
// line 1
echo "<div class=\"article__image\">
<div class=\"article__image__inner\">
";
// line 3
if ($this->extensions['Hitso\Bundle\CommonBundle\Twig\MediaUrlExtension']->validUrl(twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 3, $this->source); })()), "image", [], "any", false, false, false, 3))) {
// line 4
echo " <picture class=\"article__photo-picture\">
";
// line 5
$context["imageUrl"] = $this->extensions['Hitso\Bundle\CommonBundle\Twig\MediaUrlExtension']->imageUrl(twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 5, $this->source); })()), "image", [], "any", false, false, false, 5), "content_image");
// line 6
echo " <source media=\"(max-width: 360px)\" srcset=\"";
echo twig_escape_filter($this->env, $this->extensions['Hitso\Bundle\CommonBundle\Twig\MediaUrlExtension']->imageUrl(twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 6, $this->source); })()), "image", [], "any", false, false, false, 6), "content_image_small"), "html", null, true);
echo "\">
<source media=\"(max-width: 760px)\" srcset=\"";
// line 7
echo twig_escape_filter($this->env, $this->extensions['Hitso\Bundle\CommonBundle\Twig\MediaUrlExtension']->imageUrl(twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 7, $this->source); })()), "image", [], "any", false, false, false, 7), "content_image_medium"), "html", null, true);
echo "\">
<source media=\"(max-width: 1024px)\" srcset=\"";
// line 8
echo twig_escape_filter($this->env, $this->extensions['Hitso\Bundle\CommonBundle\Twig\MediaUrlExtension']->imageUrl(twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 8, $this->source); })()), "image", [], "any", false, false, false, 8), "content_image_large"), "html", null, true);
echo "\">
";
// line 9
if (twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 9, $this->source); })()), "link", [], "any", false, false, false, 9)) {
// line 10
echo " <a href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 10, $this->source); })()), "link", [], "any", false, false, false, 10), "html", null, true);
echo "\" target=\"_blank\">
";
}
// line 12
echo " <img class=\"article__image__image\" src=\"";
echo twig_escape_filter($this->env, (isset($context["imageUrl"]) || array_key_exists("imageUrl", $context) ? $context["imageUrl"] : (function () { throw new RuntimeError('Variable "imageUrl" does not exist.', 12, $this->source); })()), "html", null, true);
echo "\" title=\"";
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["element"] ?? null), "title", [], "any", true, true, false, 12)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["element"] ?? null), "title", [], "any", false, false, false, 12))) : ("")), "html", null, true);
echo "\"
alt=\"";
// line 13
echo twig_escape_filter($this->env, ((twig_get_attribute($this->env, $this->source, ($context["element"] ?? null), "alt", [], "any", true, true, false, 13)) ? (_twig_default_filter(twig_get_attribute($this->env, $this->source, ($context["element"] ?? null), "alt", [], "any", false, false, false, 13))) : ("")), "html", null, true);
echo "\"/>
";
// line 14
if (twig_get_attribute($this->env, $this->source, (isset($context["element"]) || array_key_exists("element", $context) ? $context["element"] : (function () { throw new RuntimeError('Variable "element" does not exist.', 14, $this->source); })()), "link", [], "any", false, false, false, 14)) {
// line 15
echo " </a>
";
}
// line 17
echo " </picture>
";
}
// line 19
echo " </div>
</div>";
$__internal_17fc5a9d7f60dc995440a5a315cc27cefd5208dd5c9d418ecd10c2a16ddca18d->leave($__internal_17fc5a9d7f60dc995440a5a315cc27cefd5208dd5c9d418ecd10c2a16ddca18d_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "HitsoContentBundle:Front/Article/Elements:image.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 99 => 19, 95 => 17, 91 => 15, 89 => 14, 85 => 13, 78 => 12, 72 => 10, 70 => 9, 66 => 8, 62 => 7, 57 => 6, 55 => 5, 52 => 4, 50 => 3, 46 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"article__image\">
<div class=\"article__image__inner\">
{% if element.image|valid_url %}
<picture class=\"article__photo-picture\">
{% set imageUrl = element.image|image_url('content_image') %}
<source media=\"(max-width: 360px)\" srcset=\"{{ element.image|image_url('content_image_small') }}\">
<source media=\"(max-width: 760px)\" srcset=\"{{ element.image|image_url('content_image_medium') }}\">
<source media=\"(max-width: 1024px)\" srcset=\"{{ element.image|image_url('content_image_large') }}\">
{% if element.link %}
<a href=\"{{ element.link }}\" target=\"_blank\">
{% endif %}
<img class=\"article__image__image\" src=\"{{ imageUrl }}\" title=\"{{ element.title|default }}\"
alt=\"{{ element.alt|default }}\"/>
{% if element.link %}
</a>
{% endif %}
</picture>
{% endif %}
</div>
</div>", "HitsoContentBundle:Front/Article/Elements:image.html.twig", "/var/www/html/stage.hartmann-tresore.pl/releases/71/src/Hitso/Bundle/ContentBundle/Resources/views/Front/Article/Elements/image.html.twig");
}
}