var/cache/dev/twig/64/640565b52e6bbba4118a805bd03c11ad5bd87045340978402cb2541d2a010085.php line 40

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* blog/index.html.twig */
  14. class __TwigTemplate_b282a078ed084fd62a542d2be2c2f31e62197a90167b54e3c8ae21eac55f66a0 extends \Twig\Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'title' => [$this'block_title'],
  24.             'header' => [$this'block_header'],
  25.             'body' => [$this'block_body'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "base.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blog/index.html.twig"));
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""blog/index.html.twig"));
  40.         $this->parent $this->loadTemplate("base.html.twig""blog/index.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  44.         
  45.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  46.     }
  47.     // line 3
  48.     public function block_title($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  53.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  55.         echo "Blog";
  56.         
  57.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  58.         
  59.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  60.     }
  61.     // line 5
  62.     public function block_header($context, array $blocks = [])
  63.     {
  64.         $macros $this->macros;
  65.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  66.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  67.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  68.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""header"));
  69.         // line 6
  70.         echo "
  71. <!-- Header -->
  72. <header class=\"header text-white pt-8 mt-10 h-250\" style=\"background-image: url(/img/bg/fondo-hojas.png);\" data-overlay=\"8\">
  73.     <div class=\"container text-center\">
  74.         <div class=\"row\">
  75.             ";
  76.         // line 15
  77.         echo "
  78.             ";
  79.         // line 17
  80.         echo "
  81.             ";
  82.         // line 19
  83.         echo "
  84.         </div>
  85.     </div>
  86. </header><!-- /.header -->
  87. ";
  88.         
  89.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  90.         
  91.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  92.     }
  93.     // line 28
  94.     public function block_body($context, array $blocks = [])
  95.     {
  96.         $macros $this->macros;
  97.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  98.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  99.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  100.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  101.         // line 29
  102.         echo "    <section class=\"section\" style=\"background-color: #F9F9FB\">
  103.         <img style=\"position: absolute; height: 20%; top: 0;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
  104.         <div class=\"container\">
  105.             <h1 class=\"pt-5 pb-5\" style=\"font-weight: 600; color: #4A4A4A; text-align: center;\">Blog</h1>
  106.             
  107.             <div class=\"row\">
  108.                 <div class=\"col-md-8 col-xl-9\">
  109.                     <div class=\"row gap-y\">
  110.                     ";
  111.         // line 41
  112.         $context['_parent'] = $context;
  113.         $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); })()));
  114.         $context['loop'] = [
  115.           'parent' => $context['_parent'],
  116.           'index0' => 0,
  117.           'index'  => 1,
  118.           'first'  => true,
  119.         ];
  120.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  121.             $length count($context['_seq']);
  122.             $context['loop']['revindex0'] = $length 1;
  123.             $context['loop']['revindex'] = $length;
  124.             $context['loop']['length'] = $length;
  125.             $context['loop']['last'] = === $length;
  126.         }
  127.         foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
  128.             // line 42
  129.             echo "
  130.                         <!-- Post -->
  131.                         <div class=\"col-md-6\">
  132.                             <div class=\"card d-block border hover-shadow-6 mb-6 h-100 align-content-center\">
  133.                             ";
  134.             // line 48
  135.             if ((twig_get_attribute($this->env$this->source$context["post"], "imageName", [], "any"falsefalsefalse48) != "")) {
  136.                 // line 49
  137.                 echo "
  138.                                 <a href=\"";
  139.                 // line 50
  140.                 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"falsefalsefalse50), "year" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse50), "format", [=> "Y"], "method"falsefalsefalse50), "month" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse50), "format", [=> "m"], "method"falsefalsefalse50), "day" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse50), "format", [=> "d"], "method"falsefalsefalse50)]), "html"nulltrue);
  141.                 echo "\">
  142.                                 ";
  143.                 // line 51
  144.                 if (twig_get_attribute($this->env$this->source$context["loop"], "first", [], "any"falsefalsefalse51)) {
  145.                     // line 52
  146.                     echo "                                <img class=\"card-img-top\" src=\"";
  147.                     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"falsefalsefalse52))), "mode_image"), "html"nulltrue);
  148.                     echo "\" alt=\"Imagen de la tarjeta\">
  149.                                 ";
  150.                 } else {
  151.                     // line 54
  152.                     echo "                                <img class=\"card-img-top\" src=\"";
  153.                     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"falsefalsefalse54))), "mode_tile"), "html"nulltrue);
  154.                     echo "\" alt=\"Imagen de la tarjeta\">
  155.                                 ";
  156.                 }
  157.                 // line 56
  158.                 echo "                                </a>
  159.                             ";
  160.             }
  161.             // line 59
  162.             echo "
  163.                                 <div class=\"p-6 text-center\">
  164.                                     <p><a class=\"small-5 text-lighter text-uppercase ls-2 fw-400\" href=\"#\">";
  165.             // line 62
  166.             echo twig_escape_filter($this->envtwig_localized_date_filter($this->envtwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse62), "medium""none"twig_get_attribute($this->env$this->sourcetwig_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"falsefalsefalse62), "locale", [], "any"falsefalsefalse62)), "html"nulltrue);
  167.             echo "</a></p>
  168.                                     <h5 class=\"mb-0\"><a class=\"text-dark\" href=\"";
  169.             // line 64
  170.             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"falsefalsefalse64), "year" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse64), "format", [=> "Y"], "method"falsefalsefalse64), "month" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse64), "format", [=> "m"], "method"falsefalsefalse64), "day" => twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["post"], "date", [], "any"falsefalsefalse64), "format", [=> "d"], "method"falsefalsefalse64)]), "html"nulltrue);
  171.             echo "\">";
  172.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["post"], "title", [], "any"falsefalsefalse64), "html"nulltrue);
  173.             echo "</a></h5>
  174.                                 </div>
  175.                             </div>
  176.                         </div>
  177.                     ";
  178.             ++$context['loop']['index0'];
  179.             ++$context['loop']['index'];
  180.             $context['loop']['first'] = false;
  181.             if (isset($context['loop']['length'])) {
  182.                 --$context['loop']['revindex0'];
  183.                 --$context['loop']['revindex'];
  184.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  185.             }
  186.         }
  187.         $_parent $context['_parent'];
  188.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
  189.         $context array_intersect_key($context$_parent) + $_parent;
  190.         // line 71
  191.         echo "
  192.                     </div>
  193.                     <div class=\"paginator-container\">
  194.                         ";
  195.         // line 76
  196.         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); })()));
  197.         echo "
  198.                     </div>
  199.                 </div>
  200.                 ";
  201.         // line 82
  202.         $this->loadTemplate("blog/sidebar.html.twig""blog/index.html.twig"82)->display($context);
  203.         // line 83
  204.         echo "
  205.             </div>
  206.         </div>
  207.         <img style=\"position: absolute; height: 20%; bottom: 0; right: 0; rotate: 180deg;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
  208.     </section>
  209. ";
  210.         
  211.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  212.         
  213.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  214.     }
  215.     public function getTemplateName()
  216.     {
  217.         return "blog/index.html.twig";
  218.     }
  219.     public function isTraitable()
  220.     {
  221.         return false;
  222.     }
  223.     public function getDebugInfo()
  224.     {
  225.         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,);
  226.     }
  227.     public function getSourceContext()
  228.     {
  229.         return new Source("{% extends 'base.html.twig' %}
  230. {% block title %}Blog{% endblock %}
  231. {% block header %}
  232. <!-- Header -->
  233. <header class=\"header text-white pt-8 mt-10 h-250\" style=\"background-image: url(/img/bg/fondo-hojas.png);\" data-overlay=\"8\">
  234.     <div class=\"container text-center\">
  235.         <div class=\"row\">
  236.             {#<div class=\"col-md-8 mx-auto\">#}
  237.             {#    <h1>Blog</h1>#}
  238.             {#</div>#}
  239.         </div>
  240.     </div>
  241. </header><!-- /.header -->
  242. {% endblock %}
  243. {% block body %}
  244.     <section class=\"section\" style=\"background-color: #F9F9FB\">
  245.         <img style=\"position: absolute; height: 20%; top: 0;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
  246.         <div class=\"container\">
  247.             <h1 class=\"pt-5 pb-5\" style=\"font-weight: 600; color: #4A4A4A; text-align: center;\">Blog</h1>
  248.             
  249.             <div class=\"row\">
  250.                 <div class=\"col-md-8 col-xl-9\">
  251.                     <div class=\"row gap-y\">
  252.                     {% for post in posts %}
  253.                         <!-- Post -->
  254.                         <div class=\"col-md-6\">
  255.                             <div class=\"card d-block border hover-shadow-6 mb-6 h-100 align-content-center\">
  256.                             {% if post.imageName != '' %}
  257.                                 <a href=\"{{ path('show_post', {'slug': post.slug, 'year': post.date.format('Y'), 'month': post.date.format('m'), 'day': post.date.format('d') }) }}\">
  258.                                 {% if loop.first %}
  259.                                 <img class=\"card-img-top\" src=\"{{ asset('/assets/blog/'~ post.imageName) | imagine_filter('mode_image') }}\" alt=\"Imagen de la tarjeta\">
  260.                                 {% else %}
  261.                                 <img class=\"card-img-top\" src=\"{{ asset('/assets/blog/'~ post.imageName) | imagine_filter('mode_tile') }}\" alt=\"Imagen de la tarjeta\">
  262.                                 {% endif %}
  263.                                 </a>
  264.                             {% endif %}
  265.                                 <div class=\"p-6 text-center\">
  266.                                     <p><a class=\"small-5 text-lighter text-uppercase ls-2 fw-400\" href=\"#\">{{ post.date | localizeddate('medium', 'none', app.request.locale) }}</a></p>
  267.                                     <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>
  268.                                 </div>
  269.                             </div>
  270.                         </div>
  271.                     {% endfor %}
  272.                     </div>
  273.                     <div class=\"paginator-container\">
  274.                         {{ knp_pagination_render(posts) }}
  275.                     </div>
  276.                 </div>
  277.                 {% include 'blog/sidebar.html.twig' %}
  278.             </div>
  279.         </div>
  280.         <img style=\"position: absolute; height: 20%; bottom: 0; right: 0; rotate: 180deg;\" src=\"/img/bg/degradado.png\" alt=\"Degradado decorativo\">
  281.     </section>
  282. {% endblock body %}""blog/index.html.twig""/export/home/nomaspapel/templates/blog/index.html.twig");
  283.     }
  284. }