| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| {% assign p = '/toc-menu.json' %} |
| {% capture tocm_string %}{% readj p %}{% endcapture %} |
| {% jsonball tocm from var tocm_string %} |
| |
| {% capture pagesiteurl %}{{ site.url }}{{ page.url }}{% endcapture %} |
| |
| <ul id="mainmenu"><!-- INSERT LINKS --> |
| |
| {% for x in tocm %} |
| {% capture ifactive %} |
| {% if pagesiteurl == x.file %}toc-active |
| {% else %}{% if x.children %}{% for x2 in x.children %} |
| {% if pagesiteurl == x2.file %}toc-active |
| {% else %}{% if x2.children %}{% for x3 in x2.children %} |
| {% if pagesiteurl == x3.file %}toc-active |
| {% else %}{% if x3.children %}{% for x4 in x3.children %} |
| {% if pagesiteurl == x4.file %}toc-active{% endif %} |
| {% endfor %}{% endif %} |
| {% endif %} |
| {% endfor %}{% endif %} |
| {% endif %} |
| {% endfor %}{% endif %} |
| {% endif %} |
| {% endcapture %} |
| {% capture ifactive %}{{ ifactive | trim }}{% endcapture %} |
| <li class="{{ifactive}}"><a href="{{ x.file }}">{{x.title}}</a></li> |
| {% endfor %} |
| |
| </ul> |