Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Revert installation dropdown change (#18488)
Browse files Browse the repository at this point in the history
This broke the version selector.

Co-authored-by: Yang Shi <[email protected]>
  • Loading branch information
Yang Shi and ys2843 authored Jun 5, 2020
1 parent b071522 commit a156ed8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
19 changes: 11 additions & 8 deletions docs/static_site/src/_includes/get_started/get_started.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ <h2>Installing MXNet</h2>
<div class="col-9 install-right">
<div class="dropdown" id="version-dropdown-container">
<button class="current-version dropbtn btn" type="button" data-toggle="dropdown">
Version: {{site.versions[1]}}
v1.6.0
<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true">
<path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path>
</svg>
</button>
<ul class="opt-group version-dropdown">
{% for version in site.versions %}
{% if version == site.versions[1] %}
<li class="opt active versions"><a href="#">{{version}}</a></li>
{% else %}
<li class="opt versions"><a href="#">{{version}}</a></li>
{% endif %}
{% endfor %}
<li class="opt versions"><a href="#">master</a></li>
<li class="opt active versions"><a href="#">v1.6.0</a></li>
<li class="opt versions"><a href="#">v1.5.1</a></li>
<li class="opt versions"><a href="#">v1.4.1</a></li>
<li class="opt versions"><a href="#">v1.3.1</a></li>
<li class="opt versions"><a href="#">v1.2.1</a></li>
<li class="opt versions"><a href="#">v1.1.0</a></li>
<li class="opt versions"><a href="#">v1.0.0</a></li>
<li class="opt versions"><a href="#">v0.12.1</a></li>
<li class="opt versions"><a href="#">v0.11.0</a></li>
</ul>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/static_site/src/assets/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $(document).ready(function () {
versionSelect = urlParams.get('version');
$('li.versions').removeClass('active');
$('li.versions').each(function () { is_a_match($(this), versionSelect) });
$('.current-version').html("Version: " + versionSelect + '<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true"><path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path></svg>');
$('.current-version').html(versionSelect + '<svg class="dropdown-caret" viewBox="0 0 32 32" class="icon icon-caret-bottom" aria-hidden="true"><path class="dropdown-caret-path" d="M24 11.305l-7.997 11.39L8 11.305z"></path></svg>');
queryString += 'version=' + versionSelect + '&';
}
if (urlParams.get('platform')) {
Expand Down Expand Up @@ -109,7 +109,7 @@ $(document).ready(function () {
el.siblings().removeClass('active');
el.addClass('active');
if ($(this).hasClass("versions")) {
$('.current-version').html("Version: " + $(this).text());
$('.current-version').html($(this).text());
urlParams.set("version", $(this).text());
} else if ($(this).hasClass("platforms")) {
urlParams.set("platform", label($(this).text()));
Expand Down

0 comments on commit a156ed8

Please sign in to comment.