forked from cockroachdb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathversion-switcher.html
43 lines (43 loc) · 1.5 KB
/
version-switcher.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<div id="version-switcher">
<script src="{{ 'js/initVersionSwitcher.js' | relative_url }}"></script>
<ul class="nav" style="display: none">
<li class="tier-1">
<a href="#">
Version: <span class="version-name">{{ page.version.name }}</span>
<div class="arrow-down"></div>
</a>
<ul>
{% for v in page.versions %}
<li class="tier-2 {% if v.version == page.version %}active{% endif %}">
<a
{% if v.url %}
href="{{ v.url | relative_url }}"
class="version--mobile"
{% else %}
class="version--mobile version--page-dne"
{% endif %}>
{{ v.version.name }}
{% if v.version.tag %}({{ v.version.tag | capitalize }}){% endif %}
{% unless v.url %}
<span class="version-text--page-dne">
This page does not exist in {{ v.version.version }}
</span>
{% endunless %}
</a>
<a
{% if v.url %}
href="{{ v.url | relative_url }}"
class="version--desktop"
{% else %}
class="version--desktop version--page-dne"
data-tooltip data-placement="left" data-container="body" title="This page does not exist in {{ v.version.version }}."
{% endif %}>
{{ v.version.name }}
{% if v.version.tag %}({{ v.version.tag | capitalize }}){% endif %}
</a>
</li>
{% endfor %}
</ul>
</li>
</ul>
</div>