<?php

/* @websiteWidgets/blog/templates/recent_posts.twig.html */
class __TwigTemplate_b5bb98c5755f158a38f8f352fe1be260d97c6c7a41ffff41968655d0ab2d3fd5 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = [
            '__internal_29636a7dc02ab73d62a1ad895356dcc650ced9c5eb9dad86936908ec2dccbb05' => [$this, 'block___internal_29636a7dc02ab73d62a1ad895356dcc650ced9c5eb9dad86936908ec2dccbb05'],
        ];
    }

    protected function doDisplay(array $context, array $blocks = [])
    {
        // line 1
        echo "<div data-widget-id=\"";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getWidgetId", [], "method"), "html", null, true);
        echo "\" class=\"moto-widget moto-widget-blog-recent_posts moto-preset-default ";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getSpacing", [0 => "classes"], "method"), "html", null, true);
        echo " ";
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getVisibleOn", [0 => "classes"], "method"), "html", null, true);
        echo "\" data-widget=\"blog.recent_posts\">
    ";
        // line 2
        if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
            echo "<div class=\"moto-widget-cover\"></div>";
        }
        // line 3
        echo "    ";
        if (($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "posts", []), "meta", []), "total", []) > 0)) {
            // line 4
            echo "        <div class=\"moto-widget-blog-recent_posts-title\">
            <div class=\"moto-widget moto-widget-text moto-preset-default moto-spacing-top-small moto-spacing-right-auto moto-spacing-bottom-small moto-spacing-left-auto\" data-preset=\"default\" data-spacing=\"aasa\">
                <div class=\"moto-widget-text-content moto-widget-text-editable\">
                    <p class=\"";
            // line 7
            echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getDesignOption", [0 => "heading.font_style", 1 => "moto-text_system_7"], "method"), "html", null, true);
            echo "\">";
            echo twig_escape_filter($this->env, (($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", [], "any", false, true), "label", [], "any", true, true)) ? (_twig_default_filter($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", [], "any", false, true), "label", []), "Recent Posts")) : ("Recent Posts")), "html", null, true);
            echo "</p>
                </div>
            </div>
        </div>

    <div class=\"moto-widget moto-widget-row\" data-widget=\"row\">
        <div class=\"container-fluid\">
            <div class=\"row moto-widget-blog-recent_posts-list\">
            ";
            // line 15
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "posts", []), "records", []));
            $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 16
                echo "
                <div class=\"moto-cell col-sm-";
                // line 17
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getColumnWidth", [], "method"), "html", null, true);
                echo " moto-widget-blog-recent_posts-item\">
                    <div class=\"moto-widget-blog-recent_posts-item__content ";
                // line 18
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getSpacingClasses", [0 => "layout.elements.post.properties.spacing"], "method"), "html", null, true);
                echo "\">

                    ";
                // line 20
                if ((($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "image", []), "visible", []) && $this->getAttribute($this->getAttribute($this->getAttribute($context["post"], "properties", []), "feature_media", []), "src", [])) && ($this->getAttribute($this->getAttribute($this->getAttribute($context["post"], "properties", []), "feature_media", []), "type", []) == "image"))) {
                    // line 21
                    echo "                        <div class=\"moto-widget-blog-recent_posts-item-preview\">
                            ";
                    // line 22
                    if ((isset($context["isServer"]) ? $context["isServer"] : null)) {
                        // line 23
                        echo "                                ";
                        echo $this->env->getExtension('Moto\Twig\Extension\WidgetsExtension')->renderWidget($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getInnerWidget", [0 => "image", 1 => $context["post"]], "method"));
                        echo "
                            ";
                    } else {
                        // line 25
                        echo "                                ";
                            
                        // line 26
                        echo "                            ";
                    }
                    // line 27
                    echo "                        </div>
                    ";
                }
                // line 29
                echo "
                    <div class=\"moto-widget-blog-recent_posts-item-title\">
                        <div class=\"moto-widget moto-widget-text moto-spacing-top-auto moto-spacing-right-auto moto-spacing-bottom-small moto-spacing-left-auto ";
                // line 31
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getAlignClass", [0 => "moto-align-", 1 => "style.title.align"], "method"), "html", null, true);
                echo "\" data-preset=\"default\" data-spacing=\"aasa\">
                            <div class=\"moto-widget-text-content moto-widget-text-editable\">
                                <h2 class=\"blog-post-title ";
                // line 33
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getDesignOption", [0 => "title.font_style", 1 => "moto-text_system_9"], "method"), "html", null, true);
                echo "\">
                                    <a href=\"";
                // line 34
                if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
                    echo "#";
                } else {
                    echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "getAbsoluteUrl", [], "method"), "html", null, true);
                }
                echo "\">";
                echo twig_escape_filter($this->env, $this->getAttribute($context["post"], "name", []), "html", null, true);
                echo "</a>
                                </h2>
                            </div>
                        </div>
                    </div>

                    ";
                // line 40
                if (($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "date", []), "visible", []) || $this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "author", []), "visible", []))) {
                    // line 41
                    echo "                    <div class=\"moto-widget moto-widget-row\" data-widget=\"row\">
                        <div class=\"container-fluid\">
                            <div class=\"row\">

                                ";
                    // line 45
                    if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "date", []), "visible", [])) {
                        // line 46
                        echo "                                <div class=\"moto-cell col-sm\" data-container=\"container\">
                                    ";
                        // line 47
                        if ((isset($context["isServer"]) ? $context["isServer"] : null)) {
                            // line 48
                            echo "                                        ";
                            echo $this->env->getExtension('Moto\Twig\Extension\WidgetsExtension')->renderWidget($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getInnerWidget", [0 => "blog.post_published_on"], "method"), ["currentPage" => $context["post"]]);
                            echo "
                                    ";
                        } else {
                            // line 50
                            echo "                                        ";
                                
                            // line 51
                            echo "                                    ";
                        }
                        // line 52
                        echo "                                </div>
                                ";
                    }
                    // line 54
                    echo "
                                ";
                    // line 55
                    if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "author", []), "visible", [])) {
                        // line 56
                        echo "                                <div class=\"moto-cell col-sm\" data-container=\"container\">
                                    ";
                        // line 57
                        if ((isset($context["isServer"]) ? $context["isServer"] : null)) {
                            // line 58
                            echo "                                        ";
                            echo $this->env->getExtension('Moto\Twig\Extension\WidgetsExtension')->renderWidget($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getInnerWidget", [0 => "blog.post_author"], "method"), ["currentPage" => $context["post"]]);
                            echo "
                                    ";
                        } else {
                            // line 60
                            echo "                                        ";
                                
                            // line 61
                            echo "                                    ";
                        }
                        // line 62
                        echo "                                </div>
                                ";
                    }
                    // line 64
                    echo "
                            </div>
                        </div>
                    </div>
                    ";
                }
                // line 69
                echo "

                    ";
                // line 71
                if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "description", []), "visible", [])) {
                    // line 72
                    echo "                        <div class=\"moto-widget-blog-recent_posts-item__post_description moto-widget-text moto-spacing-top-auto moto-spacing-right-auto moto-spacing-bottom-small moto-spacing-left-auto\">
                            ";
                    // line 73
                    echo call_user_func_array($this->env->getFilter('page_html_content')->getCallable(), [$this->env,                     $this->renderBlock("__internal_29636a7dc02ab73d62a1ad895356dcc650ced9c5eb9dad86936908ec2dccbb05", $context, $blocks), $context["post"], ($this->getAttribute($context["post"], "type", []) . ":short_description")]);
                    // line 76
                    echo "                        </div>
                    ";
                }
                // line 78
                echo "
                    ";
                // line 79
                if ($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "properties", []), "layout", []), "elements", []), "post", []), "children", []), "button", []), "visible", [])) {
                    // line 80
                    echo "                        ";
                    if ((isset($context["isServer"]) ? $context["isServer"] : null)) {
                        // line 81
                        echo "                            ";
                        echo $this->env->getExtension('Moto\Twig\Extension\WidgetsExtension')->renderWidget($this->env, $this->getAttribute((isset($context["currentWidget"]) ? $context["currentWidget"] : null), "getInnerWidget", [0 => "button", 1 => $context["post"]], "method"));
                        echo "
                        ";
                    } else {
                        // line 83
                        echo "                            ";
                            
                        // line 84
                        echo "                        ";
                    }
                    // line 85
                    echo "                    ";
                }
                // line 86
                echo "
                    </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 91
            echo "            </div>
        </div>
    </div>

    ";
        } else {
            // line 96
            echo "        ";
            if ((isset($context["isPreview"]) ? $context["isPreview"] : null)) {
                echo "<div class=\"moto-widget-empty\"></div>";
            }
            // line 97
            echo "    ";
        }
        // line 98
        echo "</div>";
    }

    // line 73
    public function block___internal_29636a7dc02ab73d62a1ad895356dcc650ced9c5eb9dad86936908ec2dccbb05($context, array $blocks = [])
    {
        // line 74
        echo "                            ";
        $this->loadTemplate(twig_template_from_string($this->env, $this->getAttribute((isset($context["post"]) ? $context["post"] : null), "short_description", [])), "@websiteWidgets/blog/templates/recent_posts.twig.html", 74)->display($context);
        // line 75
        echo "                            ";
    }

    public function getTemplateName()
    {
        return "@websiteWidgets/blog/templates/recent_posts.twig.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  279 => 75,  276 => 74,  273 => 73,  269 => 98,  266 => 97,  261 => 96,  254 => 91,  236 => 86,  233 => 85,  230 => 84,  227 => 83,  221 => 81,  218 => 80,  216 => 79,  213 => 78,  209 => 76,  207 => 73,  204 => 72,  202 => 71,  198 => 69,  191 => 64,  187 => 62,  184 => 61,  181 => 60,  175 => 58,  173 => 57,  170 => 56,  168 => 55,  165 => 54,  161 => 52,  158 => 51,  155 => 50,  149 => 48,  147 => 47,  144 => 46,  142 => 45,  136 => 41,  134 => 40,  119 => 34,  115 => 33,  110 => 31,  106 => 29,  102 => 27,  99 => 26,  96 => 25,  90 => 23,  88 => 22,  85 => 21,  83 => 20,  78 => 18,  74 => 17,  71 => 16,  54 => 15,  41 => 7,  36 => 4,  33 => 3,  29 => 2,  20 => 1,);
    }

    /** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
    public function getSource()
    {
        @trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);

        return $this->getSourceContext()->getCode();
    }

    public function getSourceContext()
    {
        return new Twig_Source("", "@websiteWidgets/blog/templates/recent_posts.twig.html", "/data05/c3111787/public_html/brcc.me.uk/mt-includes/widgets/blog/templates/recent_posts.twig.html");
    }
}
