From 57fb2d9f0aa983014d4684a7be0ba020b24dfed9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 9 Dec 2017 22:45:56 +0100 Subject: [PATCH] theme: if there are no navbar links, don't even show the hamburger. --- doc/pelican/theme.rst | 3 ++- pelican-theme/templates/base.html | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 %} -- 2.30.2