aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3
diff options
context:
space:
mode:
authorJohannes 'josch' Schauer <josch@mister-muffin.de>2017-07-29 19:57:37 +0200
committerJohannes 'josch' Schauer <josch@mister-muffin.de>2017-07-29 20:05:55 +0200
commit09aae94c108f54b99614ac0747c24287dbce115d (patch)
treefb80e3c2dfaf3cd6b8dc5461787704bafc25d4cc /pelican-bootstrap3
parent2a00d3cbf6ed7745ae3cd2f6a557bad31d4a3990 (diff)
downloadpelican-themes-09aae94c108f54b99614ac0747c24287dbce115d.tar.gz
pelican-bootstrap3: Add authors to sidebar
Diffstat (limited to 'pelican-bootstrap3')
-rw-r--r--pelican-bootstrap3/README.md1
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar.html1
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/authors.html22
3 files changed, 24 insertions, 0 deletions
diff --git a/pelican-bootstrap3/README.md b/pelican-bootstrap3/README.md
index 02a130a..ffb3c6c 100644
--- a/pelican-bootstrap3/README.md
+++ b/pelican-bootstrap3/README.md
@@ -251,6 +251,7 @@ icon to show. You can provide an alternative icon string as the third string (as
* **Categories** will be shown if `DISPLAY_CATEGORIES_ON_SIDEBAR` is set to _True_
* **Recent Posts** will be shown if `DISPLAY_RECENT_POSTS_ON_SIDEBAR` is set to _True_
* Use `RECENT_POST_COUNT` to control the amount of recent posts. Defaults to **5**
+* **Authors** will be shown if `DISPLAY_AUTHORS_ON_SIDEBAR` is set to _True_
Other sidebar related options include:
diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html
index 7772ff8..d83a7b8 100644
--- a/pelican-bootstrap3/templates/includes/sidebar.html
+++ b/pelican-bootstrap3/templates/includes/sidebar.html
@@ -10,6 +10,7 @@
{% include 'includes/sidebar/github.html' %}
{% include 'includes/sidebar/twitter_timeline.html' %}
{% include 'includes/sidebar/links.html' %}
+ {% include 'includes/sidebar/authors.html' %}
{% include 'includes/sidebar/images.html' %}
{% include 'includes/sidebar/optional_bottom.html' ignore missing %}
</ul>
diff --git a/pelican-bootstrap3/templates/includes/sidebar/authors.html b/pelican-bootstrap3/templates/includes/sidebar/authors.html
new file mode 100644
index 0000000..114c688
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar/authors.html
@@ -0,0 +1,22 @@
+{% if DISPLAY_AUTHORS_ON_SIDEBAR %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
+
+<!-- Sidebar/Authors -->
+<li class="list-group-item">
+ <h4>{{ title(_('Authors'), DISABLE_SIDEBAR_TITLE_ICONS) }}</h4>
+ <ul class="list-group" id="authors">
+ {% for author, articles in authors|sort %}
+ <li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ author.url }}">
+ {%- if not DISABLE_SIDEBAR_TITLE_ICONS -%}
+ <i class="fa fa-user fa-lg"></i>
+ {%- endif -%}
+ {{- author -}}
+ </a>
+ ({{ articles|count }})
+ </li>
+ {% endfor %}
+ </ul>
+</li>
+<!-- End Sidebar/Authors -->
+{% endif %}