<?php

/* @particles/timeline.html.twig */
class __TwigTemplate_a064e6344c86853e41550cd8b6be6243c3fd9e0d8717c12d5c978a3c3c4330ba extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        // line 1
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/timeline.html.twig", 1);
        $this->blocks = array(
            'particle' => array($this, 'block_particle'),
            'javascript_footer' => array($this, 'block_javascript_footer'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "@nucleus/partials/particle.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 3
        $context["attr_extra"] = "";
        // line 4
        if ($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "extra", array())) {
            // line 5
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "extra", array()));
            foreach ($context['_seq'] as $context["_key"] => $context["attributes"]) {
                // line 6
                $context['_parent'] = $context;
                $context['_seq'] = twig_ensure_traversable($context["attributes"]);
                foreach ($context['_seq'] as $context["key"] => $context["value"]) {
                    // line 7
                    $context["attr_extra"] = ((((((isset($context["attr_extra"]) ? $context["attr_extra"] : null) . " ") . twig_escape_filter($this->env, $context["key"])) . "=\"") . twig_escape_filter($this->env, $context["value"], "html_attr")) . "\"");
                }
                $_parent = $context['_parent'];
                unset($context['_seq'], $context['_iterated'], $context['key'], $context['value'], $context['_parent'], $context['loop']);
                $context = array_intersect_key($context, $_parent) + $_parent;
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attributes'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
        }
        // line 12
        ob_start();
        // line 13
        echo "    <div class=\"g-particle-intro\">
        ";
        // line 14
        if ($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "mainheading", array())) {
            // line 15
            echo "            <h3 class=\"g-title g-main-title\">";
            echo $this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "mainheading", array());
            echo "</h3>
            <div class=\"g-title-separator ";
            // line 16
            if (($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "introtext", array()) == false)) {
                echo "no-intro-text";
            }
            echo "\"></div>
        ";
        }
        // line 17
        echo " 
        ";
        // line 18
        if ($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "introtext", array())) {
            echo "<p class=\"g-introtext\">";
            echo $this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "introtext", array());
            echo "</p>";
        }
        // line 19
        echo "    </div>
";
        $context["particleheading"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
        // line 22
        ob_start();
        // line 23
        echo "\t";
        $context['_parent'] = $context;
        $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "items", array()));
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 24
            echo "\t\t";
            $context["attr_extra_item"] = "";
            // line 25
            echo "\t\t";
            $context['_parent'] = $context;
            $context['_seq'] = twig_ensure_traversable($this->getAttribute($context["item"], "extra", array()));
            foreach ($context['_seq'] as $context["_key"] => $context["extra"]) {
                // line 26
                echo "\t\t\t";
                $context["attr_extra_item"] = ((((((isset($context["attr_extra_item"]) ? $context["attr_extra_item"] : null) . " ") . twig_escape_filter($this->env, twig_first($this->env, twig_get_array_keys_filter($context["extra"])))) . "=\"") . twig_escape_filter($this->env, twig_first($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->valuesFilter($context["extra"])), "html_attr")) . "\"");
                // line 27
                echo "\t\t";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['extra'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 28
            echo "
\t\t";
            // line 29
            ob_start();
            // line 30
            echo "\t\t\t";
            if (((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style1")) {
                // line 31
                echo "\t\t\t\t<span style=\"background-color: ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "iconbackground", array()));
                echo "; color: ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icontextcolor", array()));
                echo "\" class=\"g-timeline-icon ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", array()));
                echo "\"></span>
\t\t\t";
            }
            // line 33
            echo "
\t\t\t";
            // line 34
            if (((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style2")) {
                // line 35
                echo "\t\t\t\t<div class=\"g-timeline-icon-container\" style=\"background-color: ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "iconbackground", array()));
                echo "; color: ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icontextcolor", array()));
                echo "\">
\t\t\t\t\t<span class=\"g-timeline-icon ";
                // line 36
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "icon", array()));
                echo "\"></span>
\t\t\t\t</div>
\t\t\t";
            }
            // line 39
            echo "\t\t";
            $context["icon"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 40
            echo "
\t\t";
            // line 41
            ob_start();
            // line 42
            echo "\t\t\t<div class=\"g-timeline-year\">";
            // line 43
            echo $this->getAttribute($context["item"], "year", array());
            // line 44
            echo "</div>
\t\t";
            $context["year"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 46
            echo "
\t\t";
            // line 47
            ob_start();
            // line 48
            echo "\t\t\t<h4 class=\"g-timeline-title\">";
            // line 49
            if ($this->getAttribute($context["item"], "link", array())) {
                // line 50
                echo "<a target=\"";
                echo twig_escape_filter($this->env, (($this->getAttribute($context["item"], "target", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute($context["item"], "target", array()), "_parent")) : ("_parent")));
                echo "\" href=\"";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "link", array()));
                echo "\">";
            }
            // line 52
            echo $this->getAttribute($context["item"], "title", array());
            // line 53
            if ($this->getAttribute($context["item"], "link", array())) {
                // line 54
                echo "</a>";
            }
            // line 56
            echo "</h4>
\t\t";
            $context["title"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 58
            echo "
\t\t";
            // line 59
            ob_start();
            // line 60
            echo "\t\t\t<div class=\"g-timeline-description\">";
            // line 61
            echo $this->getAttribute($context["item"], "description", array());
            // line 62
            echo "</div>
\t\t";
            $context["description"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 64
            echo "
\t\t";
            // line 65
            ob_start();
            // line 66
            echo "\t\t\t<div class=\"g-timeline-button\">
\t\t\t\t<a class=\"button\" target=\"";
            // line 67
            echo twig_escape_filter($this->env, (($this->getAttribute($context["item"], "target", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute($context["item"], "target", array()), "_parent")) : ("_parent")));
            echo "\" href=\"";
            echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "link", array()));
            echo "\">";
            // line 68
            echo $this->getAttribute($context["item"], "buttontext", array());
            // line 69
            echo "</a>
\t\t\t</div>
\t\t";
            $context["button"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 72
            echo "
\t\t";
            // line 73
            ob_start();
            // line 74
            echo "\t\t\t<div class=\"g-block g-timeline-item";
            if ($this->getAttribute($context["item"], "class", array())) {
                echo " ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "class", array()));
            }
            echo "\" ";
            if ($this->getAttribute($context["item"], "extra", array())) {
                echo (isset($context["attr_extra_item"]) ? $context["attr_extra_item"] : null);
            }
            echo ">
\t\t\t\t<div class=\"g-content\">
\t\t\t\t\t";
            // line 76
            if ($this->getAttribute($context["item"], "icon", array())) {
                // line 77
                echo "\t\t\t\t\t\t";
                echo twig_escape_filter($this->env, (isset($context["icon"]) ? $context["icon"] : null), "html", null, true);
                echo "
\t\t\t\t\t";
            }
            // line 79
            echo "
\t\t\t\t\t";
            // line 80
            if ($this->getAttribute($context["item"], "year", array())) {
                // line 81
                echo "\t\t\t\t\t\t";
                echo twig_escape_filter($this->env, (isset($context["year"]) ? $context["year"] : null), "html", null, true);
                echo "
\t\t\t\t\t";
            }
            // line 83
            echo "
\t\t\t\t\t";
            // line 84
            if ($this->getAttribute($context["item"], "title", array())) {
                // line 85
                echo "\t\t\t\t\t\t";
                echo twig_escape_filter($this->env, (isset($context["title"]) ? $context["title"] : null), "html", null, true);
                echo "
\t\t\t\t\t";
            }
            // line 87
            echo "
\t\t\t\t\t";
            // line 88
            if ($this->getAttribute($context["item"], "description", array())) {
                // line 89
                echo "\t\t\t\t\t\t";
                echo twig_escape_filter($this->env, (isset($context["description"]) ? $context["description"] : null), "html", null, true);
                echo "
\t\t\t\t\t";
            }
            // line 91
            echo "
\t\t\t\t\t";
            // line 92
            if ($this->getAttribute($context["item"], "buttontext", array())) {
                // line 93
                echo "\t\t\t\t\t\t";
                echo twig_escape_filter($this->env, (isset($context["button"]) ? $context["button"] : null), "html", null, true);
                echo "
\t\t\t\t\t";
            }
            // line 95
            echo "\t\t\t\t</div>
\t\t\t</div>
\t\t";
            $context["style1"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 98
            echo "
\t\t";
            // line 99
            ob_start();
            // line 100
            echo "\t\t\t<div class=\"g-timeline-block";
            if ($this->getAttribute($context["item"], "class", array())) {
                echo " ";
                echo twig_escape_filter($this->env, $this->getAttribute($context["item"], "class", array()));
            }
            echo "\" ";
            if ($this->getAttribute($context["item"], "extra", array())) {
                echo (isset($context["attr_extra_item"]) ? $context["attr_extra_item"] : null);
            }
            echo ">
\t\t\t\t";
            // line 101
            if ($this->getAttribute($context["item"], "icon", array())) {
                // line 102
                echo "\t\t\t\t\t";
                echo twig_escape_filter($this->env, (isset($context["icon"]) ? $context["icon"] : null), "html", null, true);
                echo "
\t\t\t\t";
            }
            // line 104
            echo "
\t\t\t\t";
            // line 105
            if (($this->getAttribute($context["item"], "title", array()) || $this->getAttribute($context["item"], "description", array()))) {
                // line 106
                echo "\t\t\t\t\t<div class=\"g-timeline-content\">
\t\t\t\t\t\t";
                // line 107
                if ($this->getAttribute($context["item"], "title", array())) {
                    // line 108
                    echo "\t\t\t\t\t\t\t";
                    echo twig_escape_filter($this->env, (isset($context["title"]) ? $context["title"] : null), "html", null, true);
                    echo "
\t\t\t\t\t\t";
                }
                // line 110
                echo "
\t\t\t\t\t\t";
                // line 111
                if ($this->getAttribute($context["item"], "description", array())) {
                    // line 112
                    echo "\t\t\t\t\t\t\t";
                    echo twig_escape_filter($this->env, (isset($context["description"]) ? $context["description"] : null), "html", null, true);
                    echo "
\t\t\t\t\t\t";
                }
                // line 114
                echo "
\t\t\t\t\t\t";
                // line 115
                if ($this->getAttribute($context["item"], "buttontext", array())) {
                    // line 116
                    echo "\t\t\t\t\t\t\t";
                    echo twig_escape_filter($this->env, (isset($context["button"]) ? $context["button"] : null), "html", null, true);
                    echo "
\t\t\t\t\t\t";
                }
                // line 118
                echo "
\t\t\t\t\t\t";
                // line 119
                if ($this->getAttribute($context["item"], "year", array())) {
                    // line 120
                    echo "\t\t\t\t\t\t\t";
                    echo twig_escape_filter($this->env, (isset($context["year"]) ? $context["year"] : null), "html", null, true);
                    echo "
\t\t\t\t\t\t";
                }
                // line 122
                echo "\t\t\t\t\t</div>
\t\t\t\t";
            }
            // line 124
            echo "\t\t\t</div>
\t\t";
            $context["style2"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
            // line 126
            echo "
\t\t";
            // line 127
            if (((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style1")) {
                echo twig_escape_filter($this->env, (isset($context["style1"]) ? $context["style1"] : null), "html", null, true);
            }
            // line 128
            echo "\t\t";
            if (((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style2")) {
                echo twig_escape_filter($this->env, (isset($context["style2"]) ? $context["style2"] : null), "html", null, true);
            }
            // line 129
            echo "
\t";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        $context["timelineitems"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
        // line 1
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 133
    public function block_particle($context, array $blocks = array())
    {
        // line 134
        echo "\t<div class=\"g-timeline ";
        echo twig_escape_filter($this->env, (($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")));
        if ($this->getAttribute($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "css", array()), "class", array())) {
            echo " ";
            echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "css", array()), "class", array()));
        }
        echo "\" ";
        if ($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "extra", array())) {
            echo (isset($context["attr_extra"]) ? $context["attr_extra"] : null);
        }
        echo ">
\t\t";
        // line 135
        if (($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "mainheading", array()) || $this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "introtext", array()))) {
            // line 136
            echo "\t\t\t";
            echo twig_escape_filter($this->env, (isset($context["particleheading"]) ? $context["particleheading"] : null), "html", null, true);
            echo "
\t\t";
        }
        // line 138
        echo "
\t\t";
        // line 139
        if (((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style1")) {
            // line 140
            echo "\t\t\t<div class=\"g-content\">
\t\t\t\t<div class=\"g-timeline-row\"></div>
\t\t\t</div>

\t\t\t<div class=\"g-grid\">
\t\t\t\t";
            // line 145
            echo twig_escape_filter($this->env, (isset($context["timelineitems"]) ? $context["timelineitems"] : null), "html", null, true);
            echo "
\t\t\t</div>
\t\t";
        }
        // line 148
        echo "
\t\t";
        // line 149
        if (((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style2")) {
            // line 150
            echo "\t\t\t<div id=\"g-timeline\">
\t\t\t\t";
            // line 151
            echo twig_escape_filter($this->env, (isset($context["timelineitems"]) ? $context["timelineitems"] : null), "html", null, true);
            echo "
\t\t\t</div>
\t\t";
        }
        // line 154
        echo "\t</div>
";
    }

    // line 157
    public function block_javascript_footer($context, array $blocks = array())
    {
        // line 158
        echo "\t";
        if ((((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "style", array()), "style1")) : ("style1")) == "style2") && ((($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "animation", array(), "any", true, true)) ? (_twig_default_filter($this->getAttribute((isset($context["particle"]) ? $context["particle"] : null), "animation", array()), "enabled")) : ("enabled")) == "enabled"))) {
            // line 159
            echo "\t\t";
            $this->getAttribute((isset($context["gantry"]) ? $context["gantry"] : null), "load", array(0 => "jquery"), "method");
            // line 160
            echo "\t\t";
            $this->displayParentBlock("javascript_footer", $context, $blocks);
            echo "
\t\t<script type=\"text/javascript\">
\t\t\t(function(\$) {
\t\t\t\t\$(document).ready(function() {
\t\t\t\t\tvar timelineBlocks = \$('.g-timeline-block'),
\t\t\t\t\t\toffset = 0.8;

\t\t\t\t\t//hide timeline blocks which are outside the viewport
\t\t\t\t\thideBlocks(timelineBlocks, offset);

\t\t\t\t\t//on scolling, show/animate timeline blocks when enter the viewport
\t\t\t\t\t\$(window).on('scroll', function(){
\t\t\t\t\t\t(!window.requestAnimationFrame) 
\t\t\t\t\t\t\t? setTimeout(function(){ showBlocks(timelineBlocks, offset); }, 100)
\t\t\t\t\t\t\t: window.requestAnimationFrame(function(){ showBlocks(timelineBlocks, offset); });
\t\t\t\t\t});

\t\t\t\t\tfunction hideBlocks(blocks, offset) {
\t\t\t\t\t\tblocks.each(function(){
\t\t\t\t\t\t\t( \$(this).offset().top > \$(window).scrollTop()+\$(window).height()*offset ) && \$(this).find('.g-timeline-icon-container, .g-timeline-content').addClass('is-hidden');
\t\t\t\t\t\t});
\t\t\t\t\t}

\t\t\t\t\tfunction showBlocks(blocks, offset) {
\t\t\t\t\t\tblocks.each(function(){
\t\t\t\t\t\t\t( \$(this).offset().top <= \$(window).scrollTop()+\$(window).height()*offset && \$(this).find('.g-timeline-icon-container').hasClass('is-hidden') ) && \$(this).find('.g-timeline-icon-container, .g-timeline-content').removeClass('is-hidden').addClass('bounce-in');
\t\t\t\t\t\t});
\t\t\t\t\t}
\t\t\t\t});
\t\t\t})(jQuery);
\t\t</script>
\t";
        }
    }

    public function getTemplateName()
    {
        return "@particles/timeline.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  468 => 160,  465 => 159,  462 => 158,  459 => 157,  454 => 154,  448 => 151,  445 => 150,  443 => 149,  440 => 148,  434 => 145,  427 => 140,  425 => 139,  422 => 138,  416 => 136,  414 => 135,  401 => 134,  398 => 133,  394 => 1,  386 => 129,  381 => 128,  377 => 127,  374 => 126,  370 => 124,  366 => 122,  360 => 120,  358 => 119,  355 => 118,  349 => 116,  347 => 115,  344 => 114,  338 => 112,  336 => 111,  333 => 110,  327 => 108,  325 => 107,  322 => 106,  320 => 105,  317 => 104,  311 => 102,  309 => 101,  297 => 100,  295 => 99,  292 => 98,  287 => 95,  281 => 93,  279 => 92,  276 => 91,  270 => 89,  268 => 88,  265 => 87,  259 => 85,  257 => 84,  254 => 83,  248 => 81,  246 => 80,  243 => 79,  237 => 77,  235 => 76,  222 => 74,  220 => 73,  217 => 72,  212 => 69,  210 => 68,  205 => 67,  202 => 66,  200 => 65,  197 => 64,  193 => 62,  191 => 61,  189 => 60,  187 => 59,  184 => 58,  180 => 56,  177 => 54,  175 => 53,  173 => 52,  166 => 50,  164 => 49,  162 => 48,  160 => 47,  157 => 46,  153 => 44,  151 => 43,  149 => 42,  147 => 41,  144 => 40,  141 => 39,  135 => 36,  128 => 35,  126 => 34,  123 => 33,  113 => 31,  110 => 30,  108 => 29,  105 => 28,  99 => 27,  96 => 26,  91 => 25,  88 => 24,  83 => 23,  81 => 22,  77 => 19,  71 => 18,  68 => 17,  61 => 16,  56 => 15,  54 => 14,  51 => 13,  49 => 12,  38 => 7,  34 => 6,  30 => 5,  28 => 4,  26 => 3,  11 => 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("", "@particles/timeline.html.twig", "/home/isfmp/public_html/welthaus/templates/it_construction/particles/timeline.html.twig");
    }
}
