From: Vladimír Vondruš Date: Sat, 9 Dec 2017 21:45:56 +0000 (+0100) Subject: theme: if there are no navbar links, don't even show the hamburger. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=57fb2d9f0aa983014d4684a7be0ba020b24dfed9;p=blog.git theme: if there are no navbar links, don't even show the hamburger. --- diff --git a/doc/pelican/theme.rst b/doc/pelican/theme.rst index a51487b0..688cd01e 100644 --- a/doc/pelican/theme.rst +++ b/doc/pelican/theme.rst @@ -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 diff --git a/pelican-theme/templates/base.html b/pelican-theme/templates/base.html index 3b41e434..b90d07b3 100644 --- a/pelican-theme/templates/base.html +++ b/pelican-theme/templates/base.html @@ -27,6 +27,7 @@ {%- if M_SITE_LOGO %}{% endif -%} {{- M_SITE_LOGO_TEXT or SITENAME -}} + {% if M_LINKS_NAVBAR1 or M_LINKS_NAVBAR2 %} + {% endif %}