<?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;
/* blog/list.html.twig */
class __TwigTemplate_ee76d602c80a9ca243468fe9659341c3 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->blocks = [
'title' => [$this, 'block_title'],
'bodyClass' => [$this, 'block_bodyClass'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "default/layout.html.twig";
}
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", "blog/list.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "blog/list.html.twig"));
$this->parent = $this->load("default/layout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_title(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(), "block", "title"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
yield "Noticias";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_bodyClass(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(), "block", "bodyClass"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
yield " blog-page ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 7
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(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(), "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 8
yield "
<div class=\"row white inner-main-wrapper\">
<div class=\"medium-9 columns\">
";
// line 12
yield from $this->load("default/breadcrumbs.html.twig", 12)->unwrap()->yield(CoreExtension::merge($context, ["breadcrumbs" => [["url" => "#", "title" => "Noticias"]]]));
// line 17
yield "
<h1 class=\"page-title\">Noticias</h1>
<div class=\"post-list\">
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 20, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
// line 21
yield " <article class=\"teaser post\">
<div class=\"row\">
<div class=\"medium-3 columns\">
";
// line 25
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["post"], "image", [], "any", false, false, false, 25)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 26
yield " <div class=\"image\"><img src=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("/uploads/images/" . CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["post"], "image", [], "any", false, false, false, 26), "path", [], "any", false, false, false, 26))), "html", null, true);
yield "\" alt=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 26), "html", null, true);
yield "\" loading=\"lazy\"></div>
";
}
// line 28
yield "
";
// line 29
if ((Twig\Extension\CoreExtension::length($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, $context["post"], "tags", [], "any", false, false, false, 29)) > 0)) {
// line 30
yield " <div class=\"tags\">
";
// line 31
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "tags", [], "any", false, false, false, 31));
foreach ($context['_seq'] as $context["_key"] => $context["tag"]) {
// line 32
yield " <a href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("blog_tag", ["name" => CoreExtension::getAttribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 32), "id" => CoreExtension::getAttribute($this->env, $this->source, $context["tag"], "id", [], "any", false, false, false, 32)]), "html", null, true);
yield "\" class=\"tag\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["tag"], "name", [], "any", false, false, false, 32), "html", null, true);
yield "</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['tag'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
yield " </div>
";
}
// line 36
yield "
</div>
<div class=\"medium-9 columns\">
<h3 class=\"title\">";
// line 39
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 39), "html", null, true);
yield "</h3>
<div class=\"created\">";
// line 40
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "created", [], "any", false, false, false, 40), "d M Y"), "html", null, true);
yield "</div>
<div class=\"summary\">";
// line 41
yield Twig\Extension\CoreExtension::striptags($this->extensions['Uniski\ResourceBundle\Twig\LegacyTwigExtension']->truncateFilter(CoreExtension::getAttribute($this->env, $this->source, $context["post"], "body", [], "any", false, false, false, 41), 300, true));
yield "</div>
<a href=\"";
// line 42
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("show_post", ["slug" => CoreExtension::getAttribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 42)]), "html", null, true);
yield "\" class=\"more-link\">Leer más</a>
</div>
</div>
</article>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['post'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 47
yield " </div>
<div class=\"navigation\">
";
// line 49
yield $this->extensions['Knp\Bundle\PaginatorBundle\Twig\Extension\PaginationExtension']->render($this->env, (isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 49, $this->source); })()));
yield "
</div>
</div>
<div class=\"medium-3 columns\">
";
// line 53
yield from $this->load("blog/sidebar.html.twig", 53)->unwrap()->yield($context);
// line 54
yield " </div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "blog/list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 225 => 54, 223 => 53, 216 => 49, 212 => 47, 201 => 42, 197 => 41, 193 => 40, 189 => 39, 184 => 36, 180 => 34, 169 => 32, 165 => 31, 162 => 30, 160 => 29, 157 => 28, 149 => 26, 147 => 25, 141 => 21, 137 => 20, 132 => 17, 130 => 12, 124 => 8, 111 => 7, 88 => 5, 65 => 3, 42 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'default/layout.html.twig' %}
{% block title %}Noticias{% endblock %}
{% block bodyClass %} blog-page {% endblock %}
{% block content %}
<div class=\"row white inner-main-wrapper\">
<div class=\"medium-9 columns\">
{% include 'default/breadcrumbs.html.twig' with
{breadcrumbs: [
{url: '#' , title: 'Noticias'}
]}
%}
<h1 class=\"page-title\">Noticias</h1>
<div class=\"post-list\">
{% for post in posts %}
<article class=\"teaser post\">
<div class=\"row\">
<div class=\"medium-3 columns\">
{% if post.image %}
<div class=\"image\"><img src=\"{{ asset('/uploads/images/' ~ post.image.path) }}\" alt=\"{{ post.title }}\" loading=\"lazy\"></div>
{% endif %}
{% if post.tags | length > 0 %}
<div class=\"tags\">
{% for tag in post.tags %}
<a href=\"{{path('blog_tag',{name: tag.name, id: tag.id})}}\" class=\"tag\">{{ tag.name }}</a>
{% endfor %}
</div>
{% endif %}
</div>
<div class=\"medium-9 columns\">
<h3 class=\"title\">{{ post.title }}</h3>
<div class=\"created\">{{ post.created | date('d M Y') }}</div>
<div class=\"summary\">{{ post.body | truncate(300, true) | striptags | raw }}</div>
<a href=\"{{ path('show_post', {slug: post.slug }) }}\" class=\"more-link\">Leer más</a>
</div>
</div>
</article>
{% endfor %}
</div>
<div class=\"navigation\">
{{ knp_pagination_render(posts) }}
</div>
</div>
<div class=\"medium-3 columns\">
{% include 'blog/sidebar.html.twig' %}
</div>
</div>
{% endblock %}
", "blog/list.html.twig", "/var/www/uniski/templates/blog/list.html.twig");
}
}