/
nav-version-switcher.html
28 lines (26 loc) · 1.57 KB
/
nav-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
<!-- only displayed in mobile; be sure to update version-switcher.html too -->
<div class="version-switcher">
<a href="{{ '/versions/' | url }}" class="switcher-fallback">Versions</a>
<div hidden role="region" class="switcher switcher--version" aria-labelledby="nav-version-switcher-label" id="nav-version-switcher">
<span id="nav-version-switcher-label" hidden>Version Switcher</span>
<div class="infobox visually-hidden" id="nav-version-infobox">
Selecting a version will take you to the chosen version of the ESLint docs.
</div>
<label class="switcher__label label--block" for="version-select">
<span class="label__text">Version</span>
</label>
<select name="version selector" id="nav-version-select" aria-describedby="nav-version-infobox" class="c-custom-select switcher__select auto-switcher">
<option value="HEAD" data-url="/docs/head/" {% if HEAD %}selected{% endif %}>HEAD</option>
{% if config.showNextVersion == true %}
<option value="NEXT" data-url="/docs/next/" {% if GIT_BRANCH == "next" %}selected{% endif %}>NEXT</option>
{% endif %}
<option value="{{ eslintVersion }}" data-url="/docs/latest/" {% if GIT_BRANCH == "latest" %}selected{% endif %}>v{{ eslintVersion }}</option>
{% for version in versions.items %}
<option value="{{ version.number }}"
data-url="{{ version.url }}">
v{{ version.number }}
</option>
{% endfor %}
</select>
</div>
</div>