Skip to content

Commit

Permalink
Grunt build
Browse files Browse the repository at this point in the history
  • Loading branch information
magopian authored and agjohnson committed Feb 22, 2017
1 parent afaf0dc commit ce8dc13
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/badge_only.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sphinx_rtd_theme/static/css/theme.css.map

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions sphinx_rtd_theme/static/js/theme.js
Expand Up @@ -98,6 +98,19 @@ function ThemeNav () {
try {
var link = $('.wy-menu-vertical')
.find('[href="' + anchor + '"]');
// If we didn't find a link, it may be because we clicked on
// something that is not in the sidebar (eg: when using
// sphinxcontrib.httpdomain it generates headerlinks but those
// aren't picked up and placed in the toctree). So let's find
// the closest header in the document and try with that one.
if (link.length === 0) {
var doc_link = $('.document a[href="' + anchor + '"]');
var closest_section = doc_link.closest('div.section');
// 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');
Expand Down

0 comments on commit ce8dc13

Please sign in to comment.