123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <?php
- class __TwigTemplate_83132030e3a04f02dab32e4d7c3c04a4515041b2678c791bfc38e3aee82996a6 extends Twig_Template
- {
- public function __construct(Twig_Environment $env)
- {
- parent::__construct($env);
-
- $this->parent = $this->loadTemplate("partials/base.html.twig", "modular.html.twig", 1);
- $this->blocks = array(
- 'javascripts' => array($this, 'block_javascripts'),
- 'bottom' => array($this, 'block_bottom'),
- 'header_navigation' => array($this, 'block_header_navigation'),
- 'hero' => array($this, 'block_hero'),
- 'body' => array($this, 'block_body'),
- );
- }
- protected function doGetParent(array $context)
- {
- return "partials/base.html.twig";
- }
- protected function doDisplay(array $context, array $blocks = array())
- {
-
- $context["show_onpage_menu"] = (($this->getAttribute(($context["header"] ?? null), "onpage_menu", array()) == true) || (null === $this->getAttribute(($context["header"] ?? null), "onpage_menu", array())));
-
- $this->parent->display($context, array_merge($this->blocks, $blocks));
- }
-
- public function block_javascripts($context, array $blocks = array())
- {
-
- echo " ";
- if (($context["show_onpage_menu"] ?? null)) {
-
- echo " ";
- $this->getAttribute(($context["assets"] ?? null), "add", array(0 => "theme://js/singlepagenav.min.js"), "method");
-
- echo " ";
- }
-
- echo " ";
- $this->displayParentBlock("javascripts", $context, $blocks);
- echo "
- ";
- }
-
- public function block_bottom($context, array $blocks = array())
- {
-
- echo " ";
- $this->displayParentBlock("bottom", $context, $blocks);
- echo "
- ";
-
- if (($context["show_onpage_menu"] ?? null)) {
-
- echo " <script>
- // singlePageNav initialization & configuration
- \$('ul.navigation').singlePageNav({
- offset: \$('#header').outerHeight(),
- filter: ':not(.external)',
- updateHash: true,
- currentClass: 'active'
- });
- </script>
- ";
- }
- }
-
- public function block_header_navigation($context, array $blocks = array())
- {
-
- echo " ";
- if (($context["show_onpage_menu"] ?? null)) {
-
- echo " <ul class=\"navigation\">
- ";
-
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
- foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
-
- echo " ";
- $context["current_module"] = ((($this->getAttribute($context["module"], "active", array()) || $this->getAttribute($context["module"], "activeChild", array()))) ? ("active") : (""));
-
- echo " <li><a class=\"";
- echo ($context["current_module"] ?? null);
- echo "\" href=\"#";
- echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "menu", array())), "method");
- echo "\">";
- echo $this->getAttribute($context["module"], "menu", array());
- echo "</a></li>
- ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
-
- echo " ";
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["site"] ?? null), "menu", array()));
- foreach ($context['_seq'] as $context["_key"] => $context["mitem"]) {
-
- echo " <li>
- <a ";
-
- if ($this->getAttribute($context["mitem"], "class", array())) {
- echo "class=\"";
- echo $this->getAttribute($context["mitem"], "class", array());
- echo "\"";
- }
- echo " href=\"";
- echo $this->getAttribute($context["mitem"], "url", array());
- echo "\">
- ";
-
- if ($this->getAttribute($context["mitem"], "icon", array())) {
- echo "<i class=\"fa fa-";
- echo $this->getAttribute($context["mitem"], "icon", array());
- echo "\"></i>";
- }
-
- echo " ";
- echo $this->getAttribute($context["mitem"], "text", array());
- echo "
- </a>
- </li>
- ";
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mitem'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
-
- echo " </ul>
- ";
- } else {
-
- echo " ";
- $this->displayParentBlock("header_navigation", $context, $blocks);
- echo "
- ";
- }
- }
-
- public function block_hero($context, array $blocks = array())
- {
-
- echo " ";
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
- foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
- if (($this->getAttribute($context["module"], "template", array()) == "modular/hero")) {
-
- echo " <div id=\"";
- echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "menu", array())), "method");
- echo "\"></div>
- ";
-
- echo $this->getAttribute($context["module"], "content", array());
- echo "
- ";
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- }
-
- public function block_body($context, array $blocks = array())
- {
-
- echo " ";
- $context['_parent'] = $context;
- $context['_seq'] = twig_ensure_traversable($this->getAttribute(($context["page"] ?? null), "collection", array(), "method"));
- foreach ($context['_seq'] as $context["_key"] => $context["module"]) {
- if (($this->getAttribute($context["module"], "template", array()) != "modular/hero")) {
-
- echo " <div id=\"";
- echo $this->getAttribute($this, "pageLinkName", array(0 => $this->getAttribute($context["module"], "menu", array())), "method");
- echo "\"></div>
- ";
-
- echo $this->getAttribute($context["module"], "content", array());
- echo "
- ";
- }
- }
- $_parent = $context['_parent'];
- unset($context['_seq'], $context['_iterated'], $context['_key'], $context['module'], $context['_parent'], $context['loop']);
- $context = array_intersect_key($context, $_parent) + $_parent;
- }
-
- public function getpageLinkName($__text__ = null, ...$__varargs__)
- {
- $context = $this->env->mergeGlobals(array(
- "text" => $__text__,
- "varargs" => $__varargs__,
- ));
- $blocks = array();
- ob_start();
- try {
- echo twig_replace_filter(twig_lower_filter($this->env, ($context["text"] ?? null)), array(" " => "_"));
- } catch (Exception $e) {
- ob_end_clean();
- throw $e;
- } catch (Throwable $e) {
- ob_end_clean();
- throw $e;
- }
- return ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
- }
- public function getTemplateName()
- {
- return "modular.html.twig";
- }
- public function isTraitable()
- {
- return false;
- }
- public function getDebugInfo()
- {
- return array ( 204 => 4, 193 => 59, 188 => 58, 182 => 57, 179 => 56, 168 => 52, 163 => 51, 157 => 50, 154 => 49, 146 => 45, 142 => 43, 131 => 39, 125 => 38, 115 => 37, 112 => 36, 107 => 35, 94 => 33, 91 => 32, 87 => 31, 84 => 30, 81 => 29, 78 => 28, 64 => 16, 62 => 15, 57 => 14, 54 => 13, 47 => 10, 44 => 9, 41 => 8, 38 => 7, 35 => 6, 31 => 1, 29 => 3, 11 => 1,);
- }
-
- 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("{% extends 'partials/base.html.twig' %}
- {% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
- {% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
- {% block javascripts %}
- {% if show_onpage_menu %}
- {% do assets.add('theme://js/singlepagenav.min.js') %}
- {% endif %}
- {{ parent() }}
- {% endblock %}
- {% block bottom %}
- {{ parent() }}
- {% if show_onpage_menu %}
- <script>
- // singlePageNav initialization & configuration
- \$('ul.navigation').singlePageNav({
- offset: \$('#header').outerHeight(),
- filter: ':not(.external)',
- updateHash: true,
- currentClass: 'active'
- });
- </script>
- {% endif %}
- {% endblock %}
- {% block header_navigation %}
- {% if show_onpage_menu %}
- <ul class=\"navigation\">
- {% for module in page.collection() %}
- {% set current_module = (module.active or module.activeChild) ? 'active' : '' %}
- <li><a class=\"{{ current_module }}\" href=\"#{{ _self.pageLinkName(module.menu) }}\">{{ module.menu }}</a></li>
- {% endfor %}
- {% for mitem in site.menu %}
- <li>
- <a {% if mitem.class %}class=\"{{ mitem.class }}\"{% endif %} href=\"{{ mitem.url }}\">
- {% if mitem.icon %}<i class=\"fa fa-{{ mitem.icon }}\"></i>{% endif %}
- {{ mitem.text }}
- </a>
- </li>
- {% endfor %}
- </ul>
- {% else %}
- {{ parent() }}
- {% endif %}
- {% endblock %}
- {% block hero %}
- {% for module in page.collection() if module.template == 'modular/hero' %}
- <div id=\"{{ _self.pageLinkName(module.menu) }}\"></div>
- {{ module.content }}
- {% endfor %}
- {% endblock %}
- {% block body %}
- {% for module in page.collection() if module.template != 'modular/hero' %}
- <div id=\"{{ _self.pageLinkName(module.menu) }}\"></div>
- {{ module.content }}
- {% endfor %}
- {% endblock %}
- ", "modular.html.twig", "/mnt/data/Sites/r2c.net/user/themes/r2c/templates/modular.html.twig");
- }
- }
|