aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3')
-rw-r--r--pelican-bootstrap3/README.md15
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar/images.html30
2 files changed, 27 insertions, 18 deletions
diff --git a/pelican-bootstrap3/README.md b/pelican-bootstrap3/README.md
index d990004..bb83c64 100644
--- a/pelican-bootstrap3/README.md
+++ b/pelican-bootstrap3/README.md
@@ -389,14 +389,19 @@ The footer will display a copyright message using the AUTHOR variable and the ye
### Sidebar Images
-Include a series of images in the sidebar, with an optional header:
+Include a series of _optionally linked_ images in the sidebar, with an optional
+header.
+```
SIDEBAR_IMAGES_HEADER = 'My Images'
-SIDEBAR_IMAGES = ["/path/to/image1.png", "/path/to/image2.png"]
-
-Originally developed for including certification marks in your sidebar. E.g.,
+SIDEBAR_IMAGES = (
+ ('/path/to/image1.png', 'https://link1'),
+ ('/path/to/image2.png', 'https://link2'),
+ ('/path/to/image2.png', ''),
+)
+```
-http://dmark.github.io
+Originally developed for including certification marks in your sidebar.
### Translations
diff --git a/pelican-bootstrap3/templates/includes/sidebar/images.html b/pelican-bootstrap3/templates/includes/sidebar/images.html
index 2ca2e8d..ab2da1f 100644
--- a/pelican-bootstrap3/templates/includes/sidebar/images.html
+++ b/pelican-bootstrap3/templates/includes/sidebar/images.html
@@ -1,16 +1,20 @@
{% if SIDEBAR_IMAGES %}
- {% from 'includes/sidebar/macros.jinja' import title %}
+ {% from 'includes/sidebar/macros.jinja' import title %}
-<!-- Sidebar/Images -->
-<li class="list-group-item">
- {% if SIDEBAR_IMAGES_HEADER %}
- <h4>{{ title(SIDEBAR_IMAGES_HEADER, DISABLE_SIDEBAR_TITLE_ICONS, icon='external-link-square') }}</h4>
- {% endif %}
- <ul class="list-group" id="links">
- {% for image in SIDEBAR_IMAGES %}
- <img width="100%" class="img-thumbnail" src="{{ image }}"/>
- {% endfor %}
- </ul>
-</li>
-<!-- End Sidebar/Images -->
+ <!-- Sidebar/Images -->
+ <li class="list-group-item">
+ {% if SIDEBAR_IMAGES_HEADER %}
+ <h4>{{ title(SIDEBAR_IMAGES_HEADER, DISABLE_SIDEBAR_TITLE_ICONS, icon='external-link-square') }}</h4>
+ {% endif %}
+ <ul class="list-group" id="images">
+ {% for i in SIDEBAR_IMAGES %}
+ {% if i[1] %}
+ <a href="{{ i[1] }}" target="_blank"><img width="100%" class="img-thumbnail" src="{{ i[0] }}"/></a>
+ {% else %}
+ <img width="100%" class="img-thumbnail" src="{{ i[0] }}"/>
+ {% endif %}
+ {% endfor %}
+ </ul>
+ </li>
+ <!-- End Sidebar/Images -->
{% endif %}