only display Episodes drop-down if we have episodes to show (#491)
authorFrançois Michonneau <francois.michonneau@gmail.com>
Tue, 11 Aug 2020 14:36:48 +0000 (16:36 +0200)
committerGitHub <noreply@github.com>
Tue, 11 Aug 2020 14:36:48 +0000 (10:36 -0400)
_includes/navbar.html

index e406d871275ab15c9688320bec9f77b33627e6b5..a243a95741c4c601e7d0c50f30e8703902382d55 100644 (file)
@@ -49,6 +49,7 @@
         <li><a href="{{ relative_root_path }}{% link setup.md %}">Setup</a></li>
 
         {% comment %} Show lesson episodes for lessons. {% endcomment %}
+        {% if lesson_episodes.length > 0 %}
         <li class="dropdown">
           <a href="{{ relative_root_path }}/" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Episodes <span class="caret"></span></a>
           <ul class="dropdown-menu">
@@ -64,6 +65,7 @@
             <li><a href="{{ relative_root_path }}{% link aio.md %}">All in one page (Beta)</a></li>
           </ul>
         </li>
+        {% endif %}
        {% endif %}
 
        {% comment %} Show extras for lessons or if this is the main workshop-template repo (where they contain documentation). {% endcomment %}