Skip to content

Commit cfa3e74

Browse files
committed
add a dropdown to switch documentation versions
1 parent 5e4b82e commit cfa3e74

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/_includes/sidebar.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
<aside class="col-lg-3 pl-4 pt-1 pb-1 bg-gray">
2+
<label class="d-flex mr-4 flex-items-center">
3+
<span class="mr-4">Version</span>
4+
<select class="flex-1" onchange="window.location.href = this.value">
5+
<option value="/guide/introduction" {% if page.version == 1 %} selected{% endif %}>v1.x.x</option>
6+
<option value="/guide-v2/introduction" {% if page.version == 2 %} selected{% endif %}>v2.x.x</option>
7+
</select>
8+
</label>
9+
<br>
10+
211
<nav class="position-sticky top-100px">
312
<ol class="f3-light ml-4">
413
{% for item in sidebarItems %}

0 commit comments

Comments
 (0)