Pre-render nav

This commit is contained in:
John Mulhausen 2016-11-15 11:49:18 -08:00
parent 69b3a3d434
commit 4b05d07fb7
3 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{% for item in tree %}{% if item.heading %}{% else %}{% if item.sectiontitle %}<li class="leaf menu-closed"><a href="/" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>{{ item.sectiontitle }}</a>
{% for item in tree %}{% if item.heading %}{% else %}{% if item.sectiontitle %}<li class="leaf menu-closed"><a href="#" class="expand-menu "><span class="menu-icon" aria-hidden="true"></span>{{ item.sectiontitle }}</a>
<ul class="nav-sub">
{% assign tree = item.section %}{% include tree.html %}
</ul>

View File

@ -187,7 +187,8 @@ ng\:form {
<div class="row">
<div class="col-xs-12 col-sm-3 col-md-2 col-xl-2 docsidebarnav_section">
<div class="region region-hero-sub"><ul class="nav-sub">
{% assign tree = site.data.toc.toc %}
{% include tree.html %}
</ul>
</div>
</div>

View File

@ -41,12 +41,15 @@ function hookupTOCEvents()
});
}
jQuery(document).ready(function(){
/*
$.getJSON( "/toc.txt", function( data ) {
tocData = data;
renderTree(data.toc);
$(".nav-sub").html(treeOutput.join(''));
hookupTOCEvents();
});
*/
hookupTOCEvents();
$("#TableOfContents ul").empty();
var prevH2Item = null;