<?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;
use Twig\TemplateWrapper;
/* components/NewsThumbnail.html.twig */
class __TwigTemplate_98cb3d8dda15795da925e43de53b1346 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $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 = []): iterable
{
$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", "components/NewsThumbnail.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "components/NewsThumbnail.html.twig"));
// line 1
yield "<a
class=\"news-thumbnail\"
href=\"";
// line 3
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('generatePath')->getCallable()(CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 3, $this->source); })()), "linkedPageId", [], "any", false, false, false, 3), ["news_slug" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 3, $this->source); })()), "slug", [], "any", false, false, false, 3)]), "html", null, true);
yield "\"
>
<img
class=\"news-thumbnail__image\"
src=\"";
// line 7
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getFunction('imageCache')->getCallable()(("/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 7, $this->source); })()), "getFullImagePath", [], "any", false, false, false, 7)), "zoomCrop", 1200, 900), "html", null, true);
yield "\"
alt=\"";
// line 8
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 8, $this->source); })()), "title", [], "any", false, false, false, 8), "html", null, true);
yield "\"
loading=\"lazy\"
>
<h2 class=\"news-thumbnail__title\">";
// line 11
yield (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 11, $this->source); })()), "isActive", [], "any", false, false, false, 11) && (CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 11, $this->source); })()), "publishDate", [], "any", false, false, false, 11) <= $this->extensions['Twig\Extension\CoreExtension']->convertDate()))) ? ("") : ("PREVIEW - "));
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 11, $this->source); })()), "title", [], "any", false, false, false, 11), "html", null, true);
yield "</h2>
<span class=\"news-thumbnail__date\">";
// line 13
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 13, $this->source); })()), "publishDate", [], "any", false, false, false, 13), "d F Y"), "html", null, true);
// line 14
yield "</span>
<p class=\"news-thumbnail__excerpt\">";
// line 16
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 16, $this->source); })()), "excerpt", [], "any", false, false, false, 16)), "html", null, true);
// line 17
yield "</p>
<div class=\"news-thumbnail__footer\">
<span class=\"news-thumbnail__read-more\"
>Read More <span class=\"sr-only\">about ";
// line 20
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["article"]) || array_key_exists("article", $context) ? $context["article"] : (function () { throw new RuntimeError('Variable "article" does not exist.', 20, $this->source); })()), "title", [], "any", false, false, false, 20), "html", null, true);
yield "</span> <i class=\"fa-regular fa-angle-right\"></i
></span>
</div>
</a>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "components/NewsThumbnail.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 86 => 20, 81 => 17, 79 => 16, 76 => 14, 74 => 13, 69 => 11, 63 => 8, 59 => 7, 52 => 3, 48 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<a
class=\"news-thumbnail\"
href=\"{{generatePath( app.request, article.linkedPageId, {'news_slug' : article.slug } ) }}\"
>
<img
class=\"news-thumbnail__image\"
src=\"{{ imageCache('/' ~ article.getFullImagePath, 'zoomCrop', 1200, 900) }}\"
alt=\"{{ article.title }}\"
loading=\"lazy\"
>
<h2 class=\"news-thumbnail__title\">{{ article.isActive and article.publishDate <= date() ? '' : 'PREVIEW - ' }}{{ article.title }}</h2>
<span class=\"news-thumbnail__date\">
{{- article.publishDate | date('d F Y') -}}
</span>
<p class=\"news-thumbnail__excerpt\">
{{- article.excerpt | striptags -}}
</p>
<div class=\"news-thumbnail__footer\">
<span class=\"news-thumbnail__read-more\"
>Read More <span class=\"sr-only\">about {{ article.title }}</span> <i class=\"fa-regular fa-angle-right\"></i
></span>
</div>
</a>
", "components/NewsThumbnail.html.twig", "/var/www/html/t/taurushr/templates/components/NewsThumbnail.html.twig");
}
}