From: Vladimír Vondruš Date: Thu, 7 Dec 2017 10:21:58 +0000 (+0100) Subject: theme: make the top navbar markup a bit more compact. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=f327cafe5dc153ee4d5980222521f2628e6fd04a;p=blog.git theme: make the top navbar markup a bit more compact. --- 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 %}