Skip to content

Commit 57d7a50

Browse files
committed
Added navigation elements for docset versions. Refs #256.
1 parent 12ab065 commit 57d7a50

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

docs/theme/deis/layout.html

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@
9292
<div class="docs-border"></div>
9393
{%- include "searchbox.html" %}
9494
{{ toctree(collapse=False, maxdepth=3) }}
95+
<ul class="current">
96+
<li class="toctree-l1">
97+
<a class="reference internal" href="../" state="open">Versions</a>
98+
<ul class="current">
99+
{% for slug, url in versions %}
100+
<li class="toctree-l2"><a href="{{ url }}{%- for word in pagename.split('/') -%}
101+
{%- if word != 'index' -%}
102+
{%- if word != '' -%}
103+
{{ word }}/
104+
{%- endif -%}
105+
{%- endif -%}
106+
{%- endfor -%}"
107+
title="Switch to {{ slug }}">{{ slug }}</a></li>
108+
{% endfor %}
109+
</ul>
110+
</li>
111+
</ul>
95112
</div>
96113

97114
</div> <!-- .row -->
@@ -125,9 +142,5 @@
125142
<script src="{{ pathto('_static/js/checkURL.js', 1) }}"></script>
126143
<script src="{{ pathto('_static/js/adjustments.js', 1) }}"></script>
127144

128-
<div class="rtd-docs">
129-
{%- block footer %}{%- endblock %}
130-
</div>
131-
132145
</body>
133146
</html>

web/static/js/checkURL.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,6 @@ switch(pathName[num]) {
3535
$('.toctree-l1 > a:contains("Server Reference")').attr('state', 'open');
3636
break;
3737
default:
38+
$('.toctree-l1 > a:contains("Version")').attr('state', 'close');
39+
break;
3840
}

0 commit comments

Comments
 (0)