Skip to content

Commit

Permalink
fix: hide tutorials in the sidebar when empty
Browse files Browse the repository at this point in the history
fixes #90
  • Loading branch information
wojtek-krysiak committed Jul 2, 2020
1 parent 30e37c6 commit 73174c2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tmpl/topnav.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@
>
API Documentation
</a>
<?js if (this.tutorials.length) { ?>
<div class="dropdown is-hoverable is-right">
<a class="dropdown-trigger link">
Tutorials
<i class="fas fa-chevron-down fa-xs"></i>
</a>
<div class="dropdown-menu">
<div class="dropdown-content">
<?js if (this.tutorials.length) { ?>
<?js this.tutorials.forEach(function(tutorial) { ?>
<a class="dropdown-item" href="<?js= self.tutorialToUrl(tutorial.name) ?>">
<?js= tutorial.title ?>
</a>
<?js }); ?>
<?js } ?>
<?js this.tutorials.forEach(function(tutorial) { ?>
<a class="dropdown-item" href="<?js= self.tutorialToUrl(tutorial.name) ?>">
<?js= tutorial.title ?>
</a>
<?js }); ?>
</div>
</div>
</div>
<?js } ?>
<?js if(betterDocs.navLinks && betterDocs.navLinks.length) { ?>
<?js betterDocs.navLinks.forEach(function(link) { ?>
<a
Expand Down

0 comments on commit 73174c2

Please sign in to comment.