From f327cafe5dc153ee4d5980222521f2628e6fd04a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 7 Dec 2017 11:21:58 +0100 Subject: [PATCH] theme: make the top navbar markup a bit more compact. --- pelican-theme/templates/base.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pelican-theme/templates/base.html b/pelican-theme/templates/base.html index 2376e832..6078e60c 100644 --- a/pelican-theme/templates/base.html +++ b/pelican-theme/templates/base.html @@ -33,31 +33,35 @@
    {% for title, link, slug, sub in M_LINKS_NAVBAR1 %} + {% if not sub %} +
  1. {{ title }}
  2. + {% else %}
  3. {{ title }} - {% if sub %}
      {% for title, link, slug in sub %}
    1. {{ title }}
    2. {% endfor %}
    - {% endif %}
  4. + {% endif %} {% endfor %}
{% set start = M_LINKS_NAVBAR1|length + 1 %}
    {% for title, link, slug, sub in M_LINKS_NAVBAR2 %} + {% if not sub %} +
  1. {{ title }}
  2. + {% else %}
  3. {{ title }} - {% if sub %}
      {% for title, link, slug in sub %}
    1. {{ title }}
    2. {% endfor %}
    - {% endif %}
  4. + {% endif %} {% endfor %}
-- 2.30.2