chiark / gitweb /
theme: if there are no navbar links, don't even show the hamburger.
authorVladimír Vondruš <mosra@centrum.cz>
Sat, 9 Dec 2017 21:45:56 +0000 (22:45 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Dec 2017 01:48:25 +0000 (02:48 +0100)
doc/pelican/theme.rst
pelican-theme/templates/base.html

index a51487b0727d39382618198fd4ec8144e2a4b86a..688cd01e464e5ac76ecf99062a6816a2bb735586 100644 (file)
@@ -140,7 +140,8 @@ logo/text is a link that leads to :py:`SITTEURL`.
 in the top navbar. On narrow screens, the navbar is divided into two columns,
 links from the first variable are in the left column while links from the
 second variable are in the right column. Omit the second variable if you want
-the links to be in a single column.
+the links to be in a single column. Omitting both variables will cause the
+hamburger menu link on small screen sizes to not even be present.
 
 Both variables have the same format --- a list of 4-tuples, where first item is
 link title, second the URL, third page slug of the corresponding page (used
index 3b41e434fb9a12cff6445cb4be648fd2d2000ef7..b90d07b33ddaa5186edd13b513ea7c6dedbbdb7e 100644 (file)
@@ -27,6 +27,7 @@
         {%- if M_SITE_LOGO %}<img src="{{ M_SITE_LOGO }}" />{% endif -%}
         {{- M_SITE_LOGO_TEXT or SITENAME -}}
       </a>
+      {% if M_LINKS_NAVBAR1 or M_LINKS_NAVBAR2 %}
       <a id="m-navbar-show" href="#navigation" title="Show navigation" class="m-col-t-3 m-hide-m m-text-right"></a>
       <a id="m-navbar-hide" href="#" title="Hide navigation" class="m-col-t-3 m-hide-m m-text-right"></a>
       <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
@@ -68,6 +69,7 @@
           {% endif %}
         </div>
       </div>
+      {% endif %}
     </div>
   </div>
 </nav></header>