From 3f875b51644b2fa26110b2c307f43832386e9ed2 Mon Sep 17 00:00:00 2001 From: Leonardo Giordani Date: Sun, 2 Nov 2014 23:44:44 +0100 Subject: Added support for series plugin --- pelican-bootstrap3/README.md | 10 +++++++++ pelican-bootstrap3/templates/article.html | 1 + .../templates/includes/article_info.html | 9 ++++++++ pelican-bootstrap3/templates/includes/series.html | 22 ++++++++++++++++++++ pelican-bootstrap3/templates/includes/sidebar.html | 24 ++++++++++++++++++++++ 5 files changed, 66 insertions(+) create mode 100644 pelican-bootstrap3/templates/includes/series.html (limited to 'pelican-bootstrap3') diff --git a/pelican-bootstrap3/README.md b/pelican-bootstrap3/README.md index 0e9924b..a2a17f5 100644 --- a/pelican-bootstrap3/README.md +++ b/pelican-bootstrap3/README.md @@ -121,6 +121,16 @@ If you wish to use the inverse navbar from Bootstrap, set the flag `BOOTSTRAP_NA This theme has support for the [Related Posts plugin](https://github.com/getpelican/pelican-plugins/tree/master/related_posts). All you have to do, is enable the plugin, and the theme will do the rest. +### Series + +This theme supports the [Series plugin](https://github.com/getpelican/pelican-plugins/tree/master/series). If you enable the plugin you will find in the footer the links to the previous and next articles in the series. + +You may customize the header of this list setting the `SERIES_TEXT` variable, which can also include the `index` and `name` variables. The first is the index of the current article in the series (starting from 1) and the second is the name of the series. The default string is `Part %(index)s of the %(name)s series`. + +You may display on the sidebar the link to the previous and next article in the series setting `DISPLAY_SERIES_ON_SIDEBAR` to `True`. + +You may display information on the series just under the article title setting `SHOW_SERIES` to `True`. + ### IPython Notebook support This theme supports including IPython notebooks through the [Liquid Tags plugin](https://github.com/getpelican/pelican-plugins/tree/master/liquid_tags). If you enable the plugin, the theme will automatically include the right CSS/JS to make the notebooks work. diff --git a/pelican-bootstrap3/templates/article.html b/pelican-bootstrap3/templates/article.html index 2313521..fcfab20 100644 --- a/pelican-bootstrap3/templates/article.html +++ b/pelican-bootstrap3/templates/article.html @@ -87,6 +87,7 @@ {% include 'includes/related-posts.html' %} + {% include 'includes/series.html' %} {% include 'includes/addthis.html' %} {% include 'includes/comments.html' %} diff --git a/pelican-bootstrap3/templates/includes/article_info.html b/pelican-bootstrap3/templates/includes/article_info.html index f13f4d1..787c360 100644 --- a/pelican-bootstrap3/templates/includes/article_info.html +++ b/pelican-bootstrap3/templates/includes/article_info.html @@ -3,6 +3,15 @@ + + {% if SHOW_SERIES %} + {% if article.series %} + Series + Part {{ article.series.index}} of {{ article.series.name }} + {% endif %} + {% endif %} + + {% if SHOW_ARTICLE_AUTHOR %} {% if article.author %} By diff --git a/pelican-bootstrap3/templates/includes/series.html b/pelican-bootstrap3/templates/includes/series.html new file mode 100644 index 0000000..24729a2 --- /dev/null +++ b/pelican-bootstrap3/templates/includes/series.html @@ -0,0 +1,22 @@ +{% if article.series %} + +{% endif %} diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html index ef6768b..35811f6 100644 --- a/pelican-bootstrap3/templates/includes/sidebar.html +++ b/pelican-bootstrap3/templates/includes/sidebar.html @@ -70,6 +70,30 @@ {% endif %} + + {% if DISPLAY_SERIES_ON_SIDEBAR %} + {% if article %} + {% if article.series %} +
  • Series

    + +
  • + {% endif%} + {% endif %} + {% endif %} + {% include 'includes/github.html' %} {% include 'includes/twitter_timeline.html' %} {% include 'includes/links.html' %} -- cgit