<?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;
/* news/detail.html.twig */
class __TwigTemplate_ee9d93e072f41fb15ce8a0a7e2d23c0d extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'content' => [$this, 'block_content'],
'inlinescripts' => [$this, 'block_inlinescripts'],
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
protected function doGetParent(array $context)
{
// line 1
return "layout.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", "news/detail.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "news/detail.html.twig"));
$this->parent = $this->loadTemplate("layout.html.twig", "news/detail.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_content($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", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 4
echo "<main id=\"page\" role=\"main\">
<header class=\"apk-page-header-container\">
<div class=\"uk-container apk-container-1200\">
<div class=\"apk-page-header uk-width-4-5@m\">
<h1 class=\"uk-h1\">";
// line 9
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 9, $this->source); })()), "title", [], "any", false, false, true, 9), 9, $this->source), "html", null, true);
echo "</h1>
";
// line 10
echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 10, $this->source); })()), "publishdate", [], "any", false, false, true, 10), 10, $this->source), "j F Y"), "html", null, true);
echo "
</div>
</div>
</header>
<article class=\"uk-container atp-container-1200 uk-margin-large-bottom\">
";
// line 16
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 16, $this->source); })()), "newsthumb", [], "any", false, false, true, 16))) {
// line 17
echo " <div class=\"uk-grid uk-child-width-1-2@m\" uk-grid>
<div class=\"uk-first-column\">
<div class=\"apk-news-detail--thumb\">
<img src=\"";
// line 20
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 20, $this->source); })()), "newsthumb", [], "any", false, false, true, 20), "thumbnail", [0 => "global-image"], "method", false, false, true, 20), 20, $this->source), "html", null, true);
echo "\" width=\"277\" height=\"277\" alt=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 20, $this->source); })()), "title", [], "any", false, false, true, 20), 20, $this->source), "html", null, true);
echo "\"/>
</div>
</div>
";
} else {
// line 24
echo " <div class=\"uk-grid uk-child-width-1-1\" uk-grid>
";
}
// line 26
echo " <div>
<div class=\"uk-margin-small-top\">
";
// line 28
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 28, $this->source); })()), "content", [], "any", false, false, true, 28), 28, $this->source);
echo "
</div>
</div>
</div>
";
// line 32
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 32, $this->source); })()), "imageGallery", [], "any", false, false, true, 32))) {
// line 33
echo " <div class=\"uk-grid apk-news-detail--gallery uk-margin-medium-top uk-margin-large-bottom uk-grid-small uk-child-width-1-2@s uk-child-width-1-4@m uk-child-width-1-5@l uk-flex-center uk-text-center\" uk-grid uk-lightbox=\"animation: slide\">
";
// line 34
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["new"]) || array_key_exists("new", $context) ? $context["new"] : (function () { throw new RuntimeError('Variable "new" does not exist.', 34, $this->source); })()), "imageGallery", [], "any", false, false, true, 34));
foreach ($context['_seq'] as $context["_key"] => $context["image"]) {
// line 35
echo " <div uk-lightbox=\"animation: slide\">
<a href=\"";
// line 36
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $context["image"], "thumbnail", [0 => "global-image"], "method", false, false, true, 36), 36, $this->source), "html", null, true);
echo "\">
";
// line 37
echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["image"], "thumbnail", [0 => "global-image"], "method", false, false, true, 37), "html", [0 => ["imgAttributes" => ["width" => 255]]], "method", false, false, true, 37), 37, $this->source);
echo "
</a>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['image'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 41
echo " </div>
";
}
// line 43
echo " </article>
</main>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 47
public function block_inlinescripts($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", "inlinescripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "inlinescripts"));
// line 48
echo "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "news/detail.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 174 => 48, 164 => 47, 152 => 43, 148 => 41, 138 => 37, 134 => 36, 131 => 35, 127 => 34, 124 => 33, 122 => 32, 115 => 28, 111 => 26, 107 => 24, 98 => 20, 93 => 17, 91 => 16, 82 => 10, 78 => 9, 71 => 4, 61 => 3, 38 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends \"layout.html.twig\" %}
{% block content %}
<main id=\"page\" role=\"main\">
<header class=\"apk-page-header-container\">
<div class=\"uk-container apk-container-1200\">
<div class=\"apk-page-header uk-width-4-5@m\">
<h1 class=\"uk-h1\">{{ new.title }}</h1>
{{ new.publishdate|date('j F Y') }}
</div>
</div>
</header>
<article class=\"uk-container atp-container-1200 uk-margin-large-bottom\">
{% if not new.newsthumb is empty %}
<div class=\"uk-grid uk-child-width-1-2@m\" uk-grid>
<div class=\"uk-first-column\">
<div class=\"apk-news-detail--thumb\">
<img src=\"{{ new.newsthumb.thumbnail('global-image') }}\" width=\"277\" height=\"277\" alt=\"{{ new.title }}\"/>
</div>
</div>
{% else %}
<div class=\"uk-grid uk-child-width-1-1\" uk-grid>
{% endif %}
<div>
<div class=\"uk-margin-small-top\">
{{ new.content|raw }}
</div>
</div>
</div>
{% if not new.imageGallery is empty %}
<div class=\"uk-grid apk-news-detail--gallery uk-margin-medium-top uk-margin-large-bottom uk-grid-small uk-child-width-1-2@s uk-child-width-1-4@m uk-child-width-1-5@l uk-flex-center uk-text-center\" uk-grid uk-lightbox=\"animation: slide\">
{% for image in new.imageGallery %}
<div uk-lightbox=\"animation: slide\">
<a href=\"{{ image.thumbnail('global-image') }}\">
{{ image.thumbnail('global-image').html({'imgAttributes' : {'width' : 255}})|raw }}
</a>
</div>
{% endfor %}
</div>
{% endif %}
</article>
</main>
{% endblock %}
{% block inlinescripts %}
{% endblock inlinescripts %}
", "news/detail.html.twig", "/var/www/www.mangogem.com/www/templates/news/detail.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 16, "for" => 34);
static $filters = array("escape" => 9, "date" => 10, "raw" => 28);
static $functions = array();
try {
$this->sandbox->checkSecurity(
['if', 'for'],
['escape', 'date', 'raw'],
[]
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}