Navigation Menu

Skip to content

Commit

Permalink
Follow-up grunt for #472 (#476)
Browse files Browse the repository at this point in the history
* grunt run

* regenerate theme css
  • Loading branch information
petermd authored and Blendify committed Oct 15, 2017
1 parent ee4d440 commit 9d704f2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css.map

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions sphinx_rtd_theme/static/js/theme.js
Expand Up @@ -109,13 +109,15 @@ function ThemeNav () {
// Try again with the closest section entry.
link = $('.wy-menu-vertical')
.find('[href="#' + closest_section.attr("id") + '"]');

}
$('.wy-menu-vertical li.toctree-l1 li.current')
.removeClass('current');
link.closest('li.toctree-l2').addClass('current');
link.closest('li.toctree-l3').addClass('current');
link.closest('li.toctree-l4').addClass('current');
// If we found a matching link then reset current and re-apply
// otherwise retain the existing match
if (link.length > 0) {
$('.wy-menu-vertical li.toctree-l1 li.current').removeClass('current');
link.closest('li.toctree-l2').addClass('current');
link.closest('li.toctree-l3').addClass('current');
link.closest('li.toctree-l4').addClass('current');
}
}
catch (err) {
console.log("Error expanding nav for anchor", err);
Expand Down

0 comments on commit 9d704f2

Please sign in to comment.