chiark / gitweb /
theme: more flexibility for the footer navigation.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 6 Dec 2017 11:41:01 +0000 (12:41 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 6 Dec 2017 11:42:39 +0000 (12:42 +0100)
doc/pelican/theme.rst
pelican-theme/templates/base.html

index 470a65bd2959d4fd22828b73130e9e749bb905c4..eec71de0b91355027b5a9078261cec0d92bd96c7 100644 (file)
@@ -174,8 +174,10 @@ Similarly to the top navbar, :py:`M_LINKS_FOOTER1`, :py:`M_LINKS_FOOTER2`,
 in the footer navigation. The links are arranged in four columns, which get
 reduced to just two columns on small screens. Omitting :py:`M_LINKS_FOOTER4`
 will fill the last column with a *Blog* entry, linking to the Archives page and
-listing all blog categories; omitting any of the remaining variables will make
-given column empty.
+listing all blog categories; you can disable that entry by setting
+:py:`M_LINKS_FOOTER4 = []`. Omitting any of the remaining variables will make
+given column empty, omitting all variables will not render the navigation at
+all.
 
 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
index 5373c3c07a2052f755e942d71961f2866c1f174c..350ea335434ecdecc877af3a2041fcfe02b0c017 100644 (file)
@@ -71,6 +71,7 @@
 </main>
 <footer><nav>
   <div class="m-container">
+    {% if M_LINKS_FOOTER1 or M_LINKS_FOOTER2 or M_LINKS_FOOTER3 or M_LINKS_FOOTER4 %}
     <div class="m-row">
       <div class="m-col-s-3 m-col-t-6">
         {% if M_LINKS_FOOTER1 %}
           <li>{% if title %}<a href="{{ link|format_siteurl }}">{{ title }}</a>{% else %}&nbsp;{% endif %}</li>
           {% endif %}{% endfor %}
         </ul>
-        {% else %}
+        {% elif M_LINKS_FOOTER4 is not defined %}
         <h3><a href="{{ M_BLOG_URL|format_siteurl }}">Blog</a></h3>
         <ul>
           {% for cat, null in categories %}
         {% endif %}
       </div>
     </div>
+    {% endif %}
     <div class="m-row">
       <div class="m-col-l-10 m-push-l-1">
         {% if M_FINE_PRINT %}