chiark / gitweb /
theme: ability to add a spacer into the bottom navigation.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 3 Dec 2017 11:40:06 +0000 (12:40 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 4 Dec 2017 18:20:40 +0000 (19:20 +0100)
doc/pelican/theme.rst
pelican-theme/templates/base.html

index 26fc0d2b39a0fcb7332d0cdb1e14c8affb17021b..c0255b70904dd4ac71d9e2bb1bc7fdbb1f7cd701 100644 (file)
@@ -175,7 +175,8 @@ given column empty.
 The variables are lists of 2-tuples, containing link title and URL. First item
 is used for column header, if link URL of the first item is empty, given column
 header is just a plain :html:`<h3>` without a link. The URLs are processed in
-the same way as in the `top navbar`_.
+the same way as in the `top navbar`_. A tuple entry with empty title (i.e.,
+:py:`('', '')`) will put a spacer into the list.
 
 Footer fine print can be specified via :py:`M_FINE_PRINT`. Contents of the
 variable are processed as :abbr:`reST <reStructuredText>`, so you can use all
index e584c2a730d8f3df2d9a4907727a58623e544f6b..e6293b45a5400e185ac551901383687cd1cb14db 100644 (file)
@@ -81,7 +81,7 @@
         </h3>
         <ul>
           {% for title, link in M_LINKS_FOOTER1 %}{% if loop.index0 != 0 %}
-          <li><a href="{{ link|format_siteurl }}">{{ title }}</a></li>
+          <li>{% if title %}<a href="{{ link|format_siteurl }}">{{ title }}</a>{% else %}&nbsp;{% endif %}</li>
           {% endif %}{% endfor %}
         </ul>
         {% endif %}
@@ -95,7 +95,7 @@
         </h3>
         <ul>
           {% for title, link in M_LINKS_FOOTER2 %}{% if loop.index0 != 0 %}
-          <li><a href="{{ link|format_siteurl }}">{{ title }}</a></li>
+          <li>{% if title %}<a href="{{ link|format_siteurl }}">{{ title }}</a>{% else %}&nbsp;{% endif %}</li>
           {% endif %}{% endfor %}
         </ul>
         {% endif %}
         </h3>
         <ul>
           {% for title, link in M_LINKS_FOOTER3 %}{% if loop.index0 != 0 %}
-          <li><a href="{{ link|format_siteurl }}">{{ title }}</a></li>
+          <li>{% if title %}<a href="{{ link|format_siteurl }}">{{ title }}</a>{% else %}&nbsp;{% endif %}</li>
           {% endif %}{% endfor %}
         </ul>
         {% endif %}
         </h3>
         <ul>
           {% for title, link in M_LINKS_FOOTER4 %}{% if loop.index0 != 0 %}
-          <li><a href="{{ link|format_siteurl }}">{{ title }}</a></li>
+          <li>{% if title %}<a href="{{ link|format_siteurl }}">{{ title }}</a>{% else %}&nbsp;{% endif %}</li>
           {% endif %}{% endfor %}
         </ul>
         {% else %}