<?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;
/* VisualMediaNewsBundle/views/News/index.html.twig */
class __TwigTemplate_b54967225116b38d1daad50f7618a679 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "VisualMediaNewsBundle/views/News/index.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "VisualMediaNewsBundle/views/News/index.html.twig"));
$this->parent = $this->loadTemplate("Layout/base.html.twig", "VisualMediaNewsBundle/views/News/index.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
public function block_main($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "main"));
// line 4
echo " <section class=\"container\">
";
// line 5
$this->loadTemplate("@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig", "VisualMediaNewsBundle/views/News/index.html.twig", 5)->display($context);
// line 6
echo "
<div class=\"row \">
";
// line 8
$context["year"] = twig_date_format_filter($this->env, "now +1 year", "Y");
// line 9
echo "
";
// line 10
$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.', 10, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["newsItem"]) {
// line 11
echo " <div class=\"col-12 col-md-6 col-lg-4\">
<article class=\"news-item equal-height\">
<figure class=\"\">
<a href=\"";
// line 14
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["newsItem"], "slug", [], "any", false, false, false, 14)]), "html", null, true);
echo "\">
<img src=\"";
// line 15
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigUploadUrl']->url(twig_get_attribute($this->env, $this->source, $context["newsItem"], "upload", [], "any", false, false, false, 15)), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "title", [], "any", false, false, false, 15), "html", null, true);
echo "\" style=\"width: 100%; height: 300px; object-fit: cover;\" class=\"img-responsive\">
</a>
</figure>
<div class=\"news-item-content\">
<h3 class=\"news-item-title\"><a href=\"";
// line 20
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("news");
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "title", [], "any", false, false, false, 20), "html", null, true);
echo "</a></h3>
<time class=\"smallest meta\" datetime=\"";
// line 21
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "publicationDate", [], "any", false, false, false, 21), "Y-m-d H:i"), "html", null, true);
echo "\">
<span class=\"text-light\">";
// line 22
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.published_at", [], "frontend"), "html", null, true);
echo " </span>
";
// line 23
echo twig_escape_filter($this->env, twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["newsItem"], "publicationDate", [], "any", false, false, false, 23), "long", "none", twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 23, $this->source); })()), "request", [], "any", false, false, false, 23), "locale", [], "any", false, false, false, 23)), "html", null, true);
echo "
</time>
<div class=\"clearfix\"></div>
<p itemprop=\"description\"> ";
// line 28
echo twig_escape_filter($this->env, $this->extensions['VisualMedia\LisaBundle\Twig\TwigContentScan']->scan(twig_get_attribute($this->env, $this->source, $context["newsItem"], "introHtmlContent", [], "any", false, false, false, 28)), "html", null, true);
echo "</p>
</div>
<a href=\"";
// line 31
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["newsItem"], "slug", [], "any", false, false, false, 31)]), "html", null, true);
echo "\" class=\"btn btn-primary\">";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("news.index.read_more", [], "frontend"), "html", null, true);
echo " <i class=\"fas fa-chevron-right\"></i></a>
</article>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['newsItem'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 35
echo " </div>
</section>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "VisualMediaNewsBundle/views/News/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 145 => 35, 133 => 31, 127 => 28, 119 => 23, 115 => 22, 111 => 21, 105 => 20, 95 => 15, 91 => 14, 86 => 11, 82 => 10, 79 => 9, 77 => 8, 73 => 6, 71 => 5, 68 => 4, 58 => 3, 35 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'Layout/base.html.twig' %}
{% block main %}
<section class=\"container\">
{% include '@VisualMediaBreadcrumb/Breadcrumb/breadcrumb.html.twig' %}
<div class=\"row \">
{% set year = 'now +1 year'|date('Y') %}
{% for newsItem in news %}
<div class=\"col-12 col-md-6 col-lg-4\">
<article class=\"news-item equal-height\">
<figure class=\"\">
<a href=\"{{ path('news_view', { slug : newsItem.slug}) }}\">
<img src=\"{{ newsItem.upload|url }}\" alt=\"{{ newsItem.title }}\" style=\"width: 100%; height: 300px; object-fit: cover;\" class=\"img-responsive\">
</a>
</figure>
<div class=\"news-item-content\">
<h3 class=\"news-item-title\"><a href=\"{{ path('news') }}\">{{ newsItem.title }}</a></h3>
<time class=\"smallest meta\" datetime=\"{{ newsItem.publicationDate|date(\"Y-m-d H:i\") }}\">
<span class=\"text-light\">{{ 'news.published_at'|trans({}, 'frontend') }} </span>
{{ newsItem.publicationDate|localizeddate('long', 'none', app.request.locale ) }}
</time>
<div class=\"clearfix\"></div>
<p itemprop=\"description\"> {{ newsItem.introHtmlContent|scan }}</p>
</div>
<a href=\"{{ path('news_view', { slug : newsItem.slug}) }}\" class=\"btn btn-primary\">{{ 'news.index.read_more'|trans({}, 'frontend') }} <i class=\"fas fa-chevron-right\"></i></a>
</article>
</div>
{% endfor %}
</div>
</section>
{% endblock %}
", "VisualMediaNewsBundle/views/News/index.html.twig", "/var/www/public_html/templates/VisualMediaNewsBundle/views/News/index.html.twig");
}
}