<?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;

/* /var/www/html/october_cms_projects/dil_website/themes/demo/pages/blog/index.htm */
class __TwigTemplate_cc72e187edadeeeb0ecf0d2533bccb16 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;
        // line 1
        $context["posts"] = Cms\Twig\GetAttrNode::customGetAttribute($this->env, $this->source, ($context["blog"] ?? null), "paginate", [5], "method", false, false, false, 1);
        // line 2
        $context["archiveDates"] = Cms\Twig\GetAttrNode::customGetAttribute($this->env, $this->source, Cms\Twig\GetAttrNode::customGetAttribute($this->env, $this->source, Cms\Twig\GetAttrNode::customGetAttribute($this->env, $this->source, ($context["blog"] ?? null), "selectRaw", ["count(*) as post_count, published_at_month, published_at_year"], "method", false, false, false, 2), "groupBy", ["published_at_month", "published_at_year"], "method", false, false, false, 3), "get", [], "method", false, false, false, 4);
        // line 6
        $this->env->getExtension(\Cms\Twig\Extension::class)->setBlock("pageTitle"        , ((Cms\Twig\GetAttrNode::customGetAttribute($this->env, $this->source, ($context["blogConfig"] ?? null), "blog_name", [], "any", false, false, false, 6)) ? (Cms\Twig\GetAttrNode::customGetAttribute($this->env, $this->source, ($context["blogConfig"] ?? null), "blog_name", [], "any", false, false, false, 6)) : ("Blog"))        );
        // line 7
        yield "
";
        // line 8
        $context['_parent'] = $context;
        $context['_seq'] = CoreExtension::ensureTraversable(($context["posts"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
            // line 9
            yield "    ";
            $cmsPartialParams = [];
            $cmsPartialParams['post'] = $context["post"]            ;
            $cmsPartialParams['bannerCss'] = "banner-lg"            ;
            yield $this->env->getExtension(\Cms\Twig\Extension::class)->partialFunction("blog/post-card"            , array_merge($context, ['__cms_partial_params' => $cmsPartialParams], $cmsPartialParams)            , true);
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_key'], $context['post'], $context['_parent']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 11
        yield "
<nav class=\"blog-pagination\" aria-label=\"Pagination\">
    ";
        // line 13
        yield $this->extensions['System\Twig\Extension']->pagerFunction(($context["posts"] ?? null));
        yield "
</nav>";
        yield from [];
    }

    /**
     * @codeCoverageIgnore
     */
    public function getTemplateName(): string
    {
        return "/var/www/html/october_cms_projects/dil_website/themes/demo/pages/blog/index.htm";
    }

    /**
     * @codeCoverageIgnore
     */
    public function isTraitable(): bool
    {
        return false;
    }

    /**
     * @codeCoverageIgnore
     */
    public function getDebugInfo(): array
    {
        return array (  69 => 13,  65 => 11,  55 => 9,  51 => 8,  48 => 7,  46 => 6,  44 => 2,  42 => 1,);
    }

    public function getSourceContext(): Source
    {
        return new Source("{% set posts = blog.paginate(5) %}
{% set archiveDates = blog
    .selectRaw(\"count(*) as post_count, published_at_month, published_at_year\")
    .groupBy('published_at_month', 'published_at_year').get()
%}
{% put pageTitle = blogConfig.blog_name ?: 'Blog' %}

{% for post in posts %}
    {% partial 'blog/post-card' post=post bannerCss='banner-lg' %}
{% endfor %}

<nav class=\"blog-pagination\" aria-label=\"Pagination\">
    {{ pager(posts) }}
</nav>", "/var/www/html/october_cms_projects/dil_website/themes/demo/pages/blog/index.htm", "");
    }
}
