Skip to content

Commit 71ecd2d

Browse files
Alex Goldmannbbrooks
andauthored
Add version buttons and indicator in sidebar header (#557)
* Add version dropdown to top of sidebar. Updated wording on version notification. Update theme version popout at bottom of page (not used). * Update _themes/sphinx_rtd_theme/moveit_version.html Co-authored-by: Nathan Brooks <nbbrooks@gmail.com> * add lable to dropdown Co-authored-by: Nathan Brooks <nbbrooks@gmail.com>
1 parent c0eba93 commit 71ecd2d

3 files changed

Lines changed: 26 additions & 32 deletions

File tree

_themes/sphinx_rtd_theme/layout.html

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,18 @@
101101
<a href="http://moveit.ros.org">
102102
<img src="{{ pathto('_static/logo.png', 1) }}"/>
103103
</a>
104-
104+
105+
<div class="version">
106+
<div class="version-dropdown">
107+
<lable for="version-list">Version:</lable>
108+
<select class="version-list" id="version-list" onchange="this.options[this.selectedIndex].value && (window.location = this.options[this.selectedIndex].value);">
109+
<option value=''>{{ version }}</option>
110+
<option value="http://docs.ros.org/en/melodic/api/moveit_tutorials/html/index.html">Melodic</option>
111+
<option value="http://docs.ros.org/en/kinetic/api/moveit_tutorials/html/index.html">Kinetic</option>
112+
<option value="http://docs.ros.org/en/indigo/api/moveit_tutorials/html/index.html">Indigo (EOL)</option>
113+
</select>
114+
</div>
115+
</div><br>
105116
{% include "searchbox.html" %}
106117

107118
{% endblock %}
@@ -153,12 +164,9 @@
153164
</div>
154165

155166
</section>
156-
157167
</div>
158-
{% include "versions.html" %}
159-
168+
160169
{% if not embedded %}
161-
162170
<script type="text/javascript">
163171
var DOCUMENTATION_OPTIONS = {
164172
URL_ROOT:'{{ url_root }}',
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<br />
22
<div class="admonition note">
3-
<p class="first admonition-title">Tutorials Version: Master</p>
4-
<p class="last">This is the latest version, which is actively developed. For beginners, we recommmend the stable <a class="reference external" href="http://docs.ros.org/melodic/api/moveit_tutorials/html/index.html">Melodic tutorials</a>. If you are still running a Kinetic release, please use the <a class="reference external" href="http://docs.ros.org/kinetic/api/moveit_tutorials/html/index.html">Kinetic tutorials.</a></p>
3+
<p class="first admonition-title">Tutorials Version: Noetic</p>
4+
<p class="last">This is the latest version, which is actively developed and best for beginners. If you are still running a Melodic release, please use the <a class="reference external" href="http://docs.ros.org/melodic/api/moveit_tutorials/html/index.html">Melodic tutorials</a>.</p>
55
</div>
Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,23 @@
1-
{% if READTHEDOCS %}
1+
22
{# Add rst-badge after rst-versions for small badge style. #}
33
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
44
<span class="rst-current-version" data-toggle="rst-current-version">
5-
<span class="fa fa-book"> Read the Docs</span>
6-
v: {{ current_version }}
5+
<span class="fa fa-book"> MoveIt</span>
6+
v: {{ version }}
77
<span class="fa fa-caret-down"></span>
88
</span>
99
<div class="rst-other-versions">
1010
<dl>
11-
<dt>Versions</dt>
12-
{% for slug, url in versions %}
13-
<dd><a href="{{ url }}">{{ slug }}</a></dd>
14-
{% endfor %}
15-
</dl>
16-
<dl>
17-
<dt>Downloads</dt>
18-
{% for type, url in downloads %}
19-
<dd><a href="{{ url }}">{{ type }}</a></dd>
20-
{% endfor %}
21-
</dl>
11+
<dt>Current Versions</dt>
12+
<dd><a href="https://ros-planning.github.io/moveit_tutorials/">Noetic</a></dd>
13+
<dd><a href="http://docs.ros.org/en/melodic/api/moveit_tutorials/html/index.html">Melodic</a></dd>
14+
</dl>
2215
<dl>
23-
<dt>On Read the Docs</dt>
24-
<dd>
25-
<a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/?fromdocs={{ slug }}">Project Home</a>
26-
</dd>
27-
<dd>
28-
<a href="//{{ PRODUCTION_DOMAIN }}/builds/{{ slug }}/?fromdocs={{ slug }}">Builds</a>
29-
</dd>
16+
<dt>Old Versions</dt>
17+
<dd><a href="http://docs.ros.org/en/kinetic/api/moveit_tutorials/html/index.html">Kinetic</a></dd>
18+
<dd><a href="http://docs.ros.org/en/indigo/api/moveit_tutorials/html/index.html">Indigo</a></dd>
3019
</dl>
31-
<hr/>
32-
Free document hosting provided by <a href="http://www.readthedocs.org">Read the Docs</a>.
33-
3420
</div>
3521
</div>
36-
{% endif %}
22+
3723

0 commit comments

Comments
 (0)