chiark / gitweb /
theme: ability to optionally show also author list.
authorVladimír Vondruš <mosra@centrum.cz>
Mon, 6 Nov 2017 16:55:44 +0000 (17:55 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Mon, 6 Nov 2017 17:10:49 +0000 (18:10 +0100)
doc/pelican/theme.rst
pelican-theme/templates/base_blog.html

index e23acce865be3bdcb43f08412d59b43267f38e83..487913d58c6d79d4462e66d0e16404fe6a07a14e 100644 (file)
@@ -418,6 +418,15 @@ dedicated article page. An exception to this is the main index or archive page,
 where the first article is fully expanded so the users are greeted with some
 actual content instead of just a boring list of article summaries.
 
+Article pages show a list of sections and tags in a right sidebar. By default,
+list of authors is not displayed as there is usually just one author. If you
+want to display the authors as well, enable it using the :py:`SHOW_AUTHOR_LIST`
+option in the configuration:
+
+.. code:: py
+
+    M_SHOW_AUTHOR_LIST = True
+
 `Jumbo articles`_
 -----------------
 
@@ -435,6 +444,9 @@ title and subtitle that's then rendered in a different font size. Example:
     :slug: jumbo-article
     :summary: Article summary paragraph.
 
+Sidebar with tag, category and author list shown in the classic article layout
+on the right is moved to the bottom for jumbo articles.
+
 .. note-info::
 
     You can compare how an article with nearly the same contents looks as
index 5b153418726dd62a031403f0fd2e5575f1741034..c5a77205df75689a0b7f1c856222fb5ceaa43bff 100644 (file)
@@ -14,7 +14,7 @@
 {% if article and article.cover %}
   <nav class="m-navpanel m-container">
     <div class="m-row">
-      <div class="m-col-m-5 m-push-m-1 m-col-s-6">
+      <div class="{% if M_SHOW_AUTHOR_LIST %}m-col-s-4{% else %}m-col-m-4 m-push-m-2 m-col-s-6{% endif %}">
         <h3>Cate&shy;gories</h3>
         <ol class="m-block-bar-m">
           {% for cat, null in categories %}
           {% endfor %}
         </ol>
       </div>
-      <div class="m-col-m-5 m-push-m-1 m-col-s-6">
+      {% if M_SHOW_AUTHOR_LIST %}
+      <div class="m-col-s-4">
+        <h3>Authors</h3>
+        <ol class="m-block-bar-m">
+          {% for author, null in authors %}
+          <li><a href="{{ author.url|format_siteurl }}">{{ author }}</a></li>
+          {% endfor %}
+        </ol>
+      </div>
+      {% endif %}
+      <div class="{% if M_SHOW_AUTHOR_LIST %}m-col-s-4{% else %}m-col-m-4 m-push-m-2 m-col-s-6{% endif %}">
         <h3>Tag cloud</h3>
         <ul class="m-tagcloud">
           {% set max_articles_per_tag = tags|map(attribute='1')|map('length')|sort|last %}
         <li><a href="{{ cat.url|format_siteurl }}">{{ cat|hyphenate }}</a></li>
         {% endfor %}
       </ol>
+      {% if M_SHOW_AUTHOR_LIST %}
+      <h3>Authors</h3>
+      <ol class="m-block-bar-m">
+        {% for author, null in authors %}
+        <li><a href="{{ author.url|format_siteurl }}">{{ author }}</a></li>
+        {% endfor %}
+      </ol>
+      {% endif %}
       <h3>Tag cloud</h3>
       <ul class="m-tagcloud">
         {% set max_articles_per_tag = tags|map(attribute='1')|map('length')|sort|last %}