<?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;
/* @VisualMediaNews/News/index.html.twig */
class __TwigTemplate_acf132c8ce8de8a43afd88f100a57d8de9515ad2ba90709ea4af4d0bfd74c31b extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'main' => [$this, 'block_main'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "Layout/base.html.twig";
}
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", "@VisualMediaNews/News/index.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@VisualMediaNews/News/index.html.twig"));
$this->parent = $this->loadTemplate("Layout/base.html.twig", "@VisualMediaNews/News/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_main($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(), "block", "main"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 4
echo " ";
$this->loadTemplate("@VisualMediaVisual/Visual/pagevisual.html.twig", "@VisualMediaNews/News/index.html.twig", 4)->display(twig_array_merge($context, ["visuals" => twig_get_attribute($this->env, $this->source, (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 4, $this->source); })()), "visuals", [], "any", false, false, false, 4)]));
// line 5
echo "
<section class=\"news-items section\">
<div class=\"page-stripes\"></div>
<div class=\"breadcrumb\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12\">
";
// line 13
$this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig", "@VisualMediaNews/News/index.html.twig", 13)->display($context);
// line 14
echo " </div>
</div>
</div>
</div>
<div class=\"container\">
<div class=\"news-list\">
<div class=\"row\">
";
// line 22
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["news"]) || array_key_exists("news", $context) ? $context["news"] : (function () { throw new RuntimeError('Variable "news" does not exist.', 22, $this->source); })()));
$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["index"] => $context["item"]) {
// line 23
echo "
<div class=\"col-12 col-md-6 ";
// line 24
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 24) == true)) {
echo "col-lg-12 col-xl-8 first";
} else {
echo "col-lg-6 col-xl-4";
}
echo "\">
<div class=\"news-item \">
<div class=\"news-card equal\">
<a class=\"news-item-link\" href=\"";
// line 27
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news_view", ["slug" => twig_get_attribute($this->env, $this->source, $context["item"], "slug", [], "any", false, false, false, 27)]), "html", null, true);
echo "\">
<span class=\"news-card_img ";
// line 28
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 28) == true)) {
echo "equal";
} else {
}
echo "\" style=\"background-image: url('";
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env, $this->source, $context["item"], "upload", [], "any", false, false, false, 28), ["width" => 800]), "html", null, true);
echo "');\"></span>
<span class=\"news-card_content\">
<h2>";
// line 30
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "title", [], "any", false, false, false, 30), "html", null, true);
echo "</h2>
<p>";
// line 31
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["item"], "metaDescription", [], "any", false, false, false, 31), "html", null, true);
echo "</p>
</span>
</a>
</div>
</div>
</div>
";
++$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['index'], $context['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 38
echo " </div>
</div>
</div>
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@VisualMediaNews/News/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 162 => 38, 141 => 31, 137 => 30, 127 => 28, 123 => 27, 113 => 24, 110 => 23, 93 => 22, 83 => 14, 81 => 13, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'Layout/base.html.twig' %}
{% block main %}
{% include '@VisualMediaVisual/Visual/pagevisual.html.twig' with { visuals: page.visuals } %}
<section class=\"news-items section\">
<div class=\"page-stripes\"></div>
<div class=\"breadcrumb\">
<div class=\"container\">
<div class=\"row\">
<div class=\"col-12\">
{% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig' %}
</div>
</div>
</div>
</div>
<div class=\"container\">
<div class=\"news-list\">
<div class=\"row\">
{% for index, item in news %}
<div class=\"col-12 col-md-6 {% if loop.first == true %}col-lg-12 col-xl-8 first{% else %}col-lg-6 col-xl-4{% endif %}\">
<div class=\"news-item \">
<div class=\"news-card equal\">
<a class=\"news-item-link\" href=\"{{ path('news_view', { slug: item.slug }) }}\">
<span class=\"news-card_img {% if loop.first == true %}equal{% else %}{% endif %}\" style=\"background-image: url('{{ item.upload|url({ width: 800 }) }}');\"></span>
<span class=\"news-card_content\">
<h2>{{ item.title }}</h2>
<p>{{ item.metaDescription }}</p>
</span>
</a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</section>
{% endblock %}
", "@VisualMediaNews/News/index.html.twig", "/var/www/vhosts/localhost/html/templates/VisualMediaNewsBundle/views/News/index.html.twig");
}
}