<?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;
/* blog/index.html.twig */
class __TwigTemplate_b282a078ed084fd62a542d2be2c2f31e62197a90167b54e3c8ae21eac55f66a0 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'title' => [$this, 'block_title'],
'header' => [$this, 'block_header'],
'body' => [$this, 'block_body'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "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", "blog/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", "blog/index.html.twig"));
$this->parent = $this->loadTemplate("base.html.twig", "blog/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_title($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", "title"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
echo "Blog";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 5
public function block_header($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", "header"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "header"));
// line 6
echo "
<!-- Header -->
<header class=\"header text-white pt-8 mt-10 h-250\" style=\"background-image: url(/img/bg/fondo-hojas.png);\" data-overlay=\"8\">
<div class=\"container text-center\">
<div class=\"row\">
";
// line 15
echo "
";
// line 17
echo "
";
// line 19
echo "
</div>
</div>
</header><!-- /.header -->
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 28
public function block_body($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", "body"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 29
echo " <section class=\"section\" style=\"background-color: #F9F9FB\">
<img style=\"position: absolute; height: 20%; top: 0;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
<div class=\"container\">
<h1 class=\"pt-5 pb-5\" style=\"font-weight: 600; color: #4A4A4A; text-align: center;\">Blog</h1>
<div class=\"row\">
<div class=\"col-md-8 col-xl-9\">
<div class=\"row gap-y\">
";
// line 41
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable((isset($context["posts"]) || array_key_exists("posts", $context) ? $context["posts"] : (function () { throw new RuntimeError('Variable "posts" does not exist.', 41, $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["_key"] => $context["post"]) {
// line 42
echo "
<!-- Post -->
<div class=\"col-md-6\">
<div class=\"card d-block border hover-shadow-6 mb-6 h-100 align-content-center\">
";
// line 48
if ((twig_get_attribute($this->env, $this->source, $context["post"], "imageName", [], "any", false, false, false, 48) != "")) {
// line 49
echo "
<a href=\"";
// line 50
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("show_post", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 50), "year" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 50), "format", [0 => "Y"], "method", false, false, false, 50), "month" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 50), "format", [0 => "m"], "method", false, false, false, 50), "day" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 50), "format", [0 => "d"], "method", false, false, false, 50)]), "html", null, true);
echo "\">
";
// line 51
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 51)) {
// line 52
echo " <img class=\"card-img-top\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("/assets/blog/" . twig_get_attribute($this->env, $this->source, $context["post"], "imageName", [], "any", false, false, false, 52))), "mode_image"), "html", null, true);
echo "\" alt=\"Imagen de la tarjeta\">
";
} else {
// line 54
echo " <img class=\"card-img-top\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Liip\ImagineBundle\Templating\FilterExtension']->filter($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl(("/assets/blog/" . twig_get_attribute($this->env, $this->source, $context["post"], "imageName", [], "any", false, false, false, 54))), "mode_tile"), "html", null, true);
echo "\" alt=\"Imagen de la tarjeta\">
";
}
// line 56
echo " </a>
";
}
// line 59
echo "
<div class=\"p-6 text-center\">
<p><a class=\"small-5 text-lighter text-uppercase ls-2 fw-400\" href=\"#\">";
// line 62
echo twig_escape_filter($this->env, twig_localized_date_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 62), "medium", "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.', 62, $this->source); })()), "request", [], "any", false, false, false, 62), "locale", [], "any", false, false, false, 62)), "html", null, true);
echo "</a></p>
<h5 class=\"mb-0\"><a class=\"text-dark\" href=\"";
// line 64
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("show_post", ["slug" => twig_get_attribute($this->env, $this->source, $context["post"], "slug", [], "any", false, false, false, 64), "year" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 64), "format", [0 => "Y"], "method", false, false, false, 64), "month" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 64), "format", [0 => "m"], "method", false, false, false, 64), "day" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["post"], "date", [], "any", false, false, false, 64), "format", [0 => "d"], "method", false, false, false, 64)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["post"], "title", [], "any", false, false, false, 64), "html", null, true);
echo "</a></h5>
</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['_key'], $context['post'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 71
echo "
</div>
<div class=\"paginator-container\">
";
// line 76
echo $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.', 76, $this->source); })()));
echo "
</div>
</div>
";
// line 82
$this->loadTemplate("blog/sidebar.html.twig", "blog/index.html.twig", 82)->display($context);
// line 83
echo "
</div>
</div>
<img style=\"position: absolute; height: 20%; bottom: 0; right: 0; rotate: 180deg;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
</section>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "blog/index.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 250 => 83, 248 => 82, 239 => 76, 232 => 71, 209 => 64, 204 => 62, 199 => 59, 194 => 56, 188 => 54, 182 => 52, 180 => 51, 176 => 50, 173 => 49, 171 => 48, 163 => 42, 146 => 41, 132 => 29, 122 => 28, 105 => 19, 102 => 17, 99 => 15, 89 => 6, 79 => 5, 60 => 3, 37 => 1,);
}
public function getSourceContext()
{
return new Source("{% extends 'base.html.twig' %}
{% block title %}Blog{% endblock %}
{% block header %}
<!-- Header -->
<header class=\"header text-white pt-8 mt-10 h-250\" style=\"background-image: url(/img/bg/fondo-hojas.png);\" data-overlay=\"8\">
<div class=\"container text-center\">
<div class=\"row\">
{#<div class=\"col-md-8 mx-auto\">#}
{# <h1>Blog</h1>#}
{#</div>#}
</div>
</div>
</header><!-- /.header -->
{% endblock %}
{% block body %}
<section class=\"section\" style=\"background-color: #F9F9FB\">
<img style=\"position: absolute; height: 20%; top: 0;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
<div class=\"container\">
<h1 class=\"pt-5 pb-5\" style=\"font-weight: 600; color: #4A4A4A; text-align: center;\">Blog</h1>
<div class=\"row\">
<div class=\"col-md-8 col-xl-9\">
<div class=\"row gap-y\">
{% for post in posts %}
<!-- Post -->
<div class=\"col-md-6\">
<div class=\"card d-block border hover-shadow-6 mb-6 h-100 align-content-center\">
{% if post.imageName != '' %}
<a href=\"{{ path('show_post', {'slug': post.slug, 'year': post.date.format('Y'), 'month': post.date.format('m'), 'day': post.date.format('d') }) }}\">
{% if loop.first %}
<img class=\"card-img-top\" src=\"{{ asset('/assets/blog/'~ post.imageName) | imagine_filter('mode_image') }}\" alt=\"Imagen de la tarjeta\">
{% else %}
<img class=\"card-img-top\" src=\"{{ asset('/assets/blog/'~ post.imageName) | imagine_filter('mode_tile') }}\" alt=\"Imagen de la tarjeta\">
{% endif %}
</a>
{% endif %}
<div class=\"p-6 text-center\">
<p><a class=\"small-5 text-lighter text-uppercase ls-2 fw-400\" href=\"#\">{{ post.date | localizeddate('medium', 'none', app.request.locale) }}</a></p>
<h5 class=\"mb-0\"><a class=\"text-dark\" href=\"{{ path('show_post', {'slug': post.slug, 'year': post.date.format('Y'), 'month': post.date.format('m'), 'day': post.date.format('d') }) }}\">{{ post.title }}</a></h5>
</div>
</div>
</div>
{% endfor %}
</div>
<div class=\"paginator-container\">
{{ knp_pagination_render(posts) }}
</div>
</div>
{% include 'blog/sidebar.html.twig' %}
</div>
</div>
<img style=\"position: absolute; height: 20%; bottom: 0; right: 0; rotate: 180deg;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
</section>
{% endblock body %}", "blog/index.html.twig", "/export/home/nomaspapel/templates/blog/index.html.twig");
}
}