salt/doc/_templates/modules-sidebar.html
Seth House f300e75afe Restored html_default_sidebars setting; added JS TOC to modules sidebar
Using JavaScript to generate a local table of contents for the modules
is less than ideal but this isn't easily accomplished with autosummary
(see 87c1000) and we badly need this.
2013-02-28 10:14:14 -07:00

31 lines
627 B
HTML

<div id="module-funcs"></div>
<script>
jQuery.fn.local_toc = function(tgt_sel) {
var tgt = jQuery(tgt_sel);
tgt.append('<h4>Table of Contents</h4>');
jQuery('dt .headerlink').each(function(idx, elem) {
var i = [
'<li><a href="', elem.href, '">',
last(elem.href.split('.')),
'</a></li>']
.join('');
tgt.append(i);
});
function last(list) {
return list[list.length - 1];
}
};
</script>
<script>
;(function($) {
$.fn.local_toc('#module-funcs');
})(jQuery);
</script>