19070: Still trying to fix test_with_arvbox
[arvados.git] / doc / _includes / _navbar_left.liquid
1 {% comment %}
2 Copyright (C) The Arvados Authors. All rights reserved.
3
4 SPDX-License-Identifier: CC-BY-SA-3.0
5 {% endcomment %}
6
7 {% assign highlighturl = "" %}
8 {% for section in site.navbar[page.navsection] %}
9   {% for entry in section %}
10     {% comment %}
11     Want to highlight the current page on the left nav.
12     But some pages have been renamed with a symlink from the old page to the new one.
13     Then the URL won't match.
14     So if the URL doesn't match, as a fallback look for a page with a matching title.
15     {% endcomment %}
16
17     {% for item in entry[1] %}
18       {% if site.pages[item].url == page.url %}
19         {% assign highlighturl = site.pages[item].url %}
20       {% endif %}
21     {% endfor %}
22
23     {% if highlighturl == "" %}
24       {% for item in entry[1] %}
25         {% if site.pages[item].title == page.title %}
26           {% assign highlighturl = site.pages[item].url %}
27         {% endif %}
28       {% endfor %}
29     {% endif %}
30   {% endfor %}
31 {% endfor %}
32
33 <div class="col-sm-3">
34   <div class="well">
35     <ol class="nav nav-list">
36       {% for section in site.navbar[page.navsection] %}
37       {% for entry in section %}
38       <li><span class="nav-header">{{ entry[0] }}</span>
39         <ol class="nav nav-list">
40           {% for item in entry[1] %}
41             {% assign p = site.pages[item] %}
42             <li {% if p.url == highlighturl %} class="active activesubnav" {% elsif p.title == page.subnavsection %} class="activesubnav" {% endif %}>
43               <a href="{{ site.baseurl }}{{ p.url }}">{{ p.title }}</a></li>
44           {% endfor %}
45         </ol>
46         {% endfor %}
47         {% endfor %}
48     </ol>
49   </div>
50 </div>