chiark / gitweb /
theme: fix layout for sites that don't use tags at all.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 10 Dec 2017 12:40:36 +0000 (13:40 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 11 Dec 2017 01:48:25 +0000 (02:48 +0100)
pelican-theme/templates/base_blog.html

index bfd71131b4c2ee69148a21ffe06f16c181f00c64..ecee7d37c111c5232d07e9d67ec3f6f3f15d036c 100644 (file)
@@ -15,7 +15,7 @@
 {% if article and article.cover %}
   <nav class="m-navpanel m-container">
     <div class="m-row">
-      <div class="m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-1{% else %}m-push-s-2 m-push-l-3{% endif %}">
+      <div class="m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-1{% elif tags %}m-push-s-2 m-push-l-3{% else %}m-push-s-4 m-push-l-5{% endif %}">
         <h3>Cate&shy;gories</h3>
         <ol class="m-block-bar-s">
           {% for cat, null in categories %}
@@ -24,7 +24,7 @@
         </ol>
       </div>
       {% if M_SHOW_AUTHOR_LIST %}
-      <div class="m-col-s-4 m-col-l-2 m-push-l-3">
+      <div class="m-col-s-4 m-col-l-2 {% if tags %}m-push-l-3{% else %}m-push-s-4 m-push-l-7{% endif %}">
         <h3>Authors</h3>
         <ol class="m-block-bar-s">
           {% for author, null in authors %}
@@ -33,6 +33,7 @@
         </ol>
       </div>
       {% endif %}
+      {% if tags %}
       <div class="m-col-s-4 m-col-l-2 {% if M_SHOW_AUTHOR_LIST %}m-push-l-5{% else %}m-push-s-2 m-push-l-5{% endif %}">
         <h3>Tag cloud</h3>
         <ul class="m-tagcloud">
@@ -42,6 +43,7 @@
           {% endfor %}
         </ul>
       </div>
+      {% endif %}
     </div>
   </nav>
 {% else %}