Current File : /home/escuelai/public_html/it/files/_cache/templates/45/4568fc8ab7bbb6d8acca3d74444fe4f3.php
<?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;

/* components/masonry_grid.html.twig */
class __TwigTemplate_2263c4ba0fa3f287a999ebd0afa29b38 extends Template
{
    private $source;
    private $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 = [])
    {
        $macros = $this->macros;
        // line 33
        echo "
";
        // line 34
        if ( !array_key_exists("grid_item_class", $context)) {
            // line 35
            echo "   ";
            $context["grid_item_class"] = "col-xl-6 col-xxl-4";
        }
        // line 37
        echo "
";
        // line 38
        $context["rand"] = twig_random($this->env);
        // line 39
        echo "<div id=\"grid_";
        echo twig_escape_filter($this->env, ($context["rand"] ?? null), "html", null, true);
        echo "\" class=\"masonry_grid row row-cards mb-5\">
   ";
        // line 40
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable(($context["grid_items"] ?? null));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 41
            echo "      ";
            if ( !twig_test_empty($context["item"])) {
                // line 42
                echo "         <div class=\"grid-item ";
                echo twig_escape_filter($this->env, ($context["grid_item_class"] ?? null), "html", null, true);
                echo "\">
            ";
                // line 43
                echo $context["item"];
                echo "
         </div>
      ";
            }
            // line 46
            echo "   ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 47
        echo "</div>

<script type=\"text/javascript\">
\$(function() {
   window.msnry = new Masonry('#grid_";
        // line 51
        echo twig_escape_filter($this->env, ($context["rand"] ?? null), "html", null, true);
        echo "', {
      \"percentPosition\": true,
      \"horizontalOrder\": true,
   });

   \$('#grid_";
        // line 56
        echo twig_escape_filter($this->env, ($context["rand"] ?? null), "html", null, true);
        echo "').on(\"layout:refresh\", function() {
       window.msnry.layout();
   });

   \$(document).on('masonry_grid:layout', function() {
       window.msnry.layout();
   })
});
</script>
";
    }

    public function getTemplateName()
    {
        return "components/masonry_grid.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  94 => 56,  86 => 51,  80 => 47,  74 => 46,  68 => 43,  63 => 42,  60 => 41,  56 => 40,  51 => 39,  49 => 38,  46 => 37,  42 => 35,  40 => 34,  37 => 33,);
    }

    public function getSourceContext()
    {
        return new Source("", "components/masonry_grid.html.twig", "/home/escuelai/public_html/it/templates/components/masonry_grid.html.twig");
    }
}