aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3/templates')
-rw-r--r--pelican-bootstrap3/templates/base.html15
-rw-r--r--pelican-bootstrap3/templates/includes/aboutme.html4
-rw-r--r--pelican-bootstrap3/templates/includes/pagination.html2
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar.html11
4 files changed, 19 insertions, 13 deletions
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html
index 7c041d5..a33496c 100644
--- a/pelican-bootstrap3/templates/base.html
+++ b/pelican-bootstrap3/templates/base.html
@@ -105,7 +105,7 @@
<div class="navbar {% if BOOTSTRAP_NAVBAR_INVERSE %}navbar-inverse{% else %}navbar-default{% endif %} navbar-fixed-top" role="navigation">
<div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
<div class="navbar-header">
- {% if MENUITEMS or (PAGES and DISPLAY_PAGES_ON_MENU) or (categories and DISPLAY_CATEGORIES_ON_MENU) %}
+ {% if MENUITEMS or (pages and DISPLAY_PAGES_ON_MENU) or (categories and DISPLAY_CATEGORIES_ON_MENU) %}
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
@@ -123,11 +123,16 @@
{% for title, link in MENUITEMS %}
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
+ {% if not PAGES_SORT_ATTRIBUTE -%}
+ {% set PAGES_SORT_ATTRIBUTE = 'title' %}
+ {%- endif %}
{% if DISPLAY_PAGES_ON_MENU %}
- {% for p in pages %}
+ {% for p in pages | sort(attribute=PAGES_SORT_ATTRIBUTE) %}
+ {% if p.url %}
<li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">
{{ p.menulabel|default(p.title) }}
</a></li>
+ {% endif %}
{% endfor %}
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
@@ -163,7 +168,7 @@
<!-- End Banner -->
<div class="container{% if BOOTSTRAP_FLUID %}-fluid{% endif %}">
<div class="row">
- {% if not HIDE_SIDEBAR or ABOUT_ME %}
+ {% if not HIDE_SIDEBAR or ABOUT_ME or AVATAR %}
<div class="col-sm-9">
{% else %}
<div class="col-lg-12">
@@ -173,10 +178,10 @@
{% block content %}
{% endblock %}
</div>
- {% if not HIDE_SIDEBAR or ABOUT_ME %}
+ {% if not HIDE_SIDEBAR or ABOUT_ME or AVATAR %}
<div class="col-sm-3" id="sidebar">
<aside>
- {% if ABOUT_ME %}
+ {% if ABOUT_ME or AVATAR %}
{% include 'includes/aboutme.html' %}
{% endif %}
{% if not HIDE_SIDEBAR %}
diff --git a/pelican-bootstrap3/templates/includes/aboutme.html b/pelican-bootstrap3/templates/includes/aboutme.html
index f38f0bc..3dc1c1c 100644
--- a/pelican-bootstrap3/templates/includes/aboutme.html
+++ b/pelican-bootstrap3/templates/includes/aboutme.html
@@ -1,11 +1,13 @@
<div id="aboutme">
{% if AVATAR %}
<p>
- <img width="100%" class="img-thumbnail" src="{{ AVATAR }}"/>
+ <img width="100%" class="img-thumbnail" src="{{ SITEURL }}/{{ AVATAR }}"/>
</p>
{% endif %}
+ {% if ABOUT_ME %}
<p>
<strong>About {{ AUTHOR }}</strong><br/>
{{ ABOUT_ME }}
</p>
+ {% endif %}
</div> \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/pagination.html b/pelican-bootstrap3/templates/includes/pagination.html
index 9ae4285..e74cdba 100644
--- a/pelican-bootstrap3/templates/includes/pagination.html
+++ b/pelican-bootstrap3/templates/includes/pagination.html
@@ -24,7 +24,7 @@
{% endif %}
{% for num in range( 1, 1 + articles_paginator.num_pages ) %}
<li class="{{ 'active' if num == articles_page.number else '' }}"><a
- href="{{ SITEURL }}/{{ page_name }}{{ num if num > 1 else '' }}.html">{{ num }}</a></li>
+ href="{{ SITEURL }}/{{ articles_paginator.page(num).url if num > 1 else articles_paginator.page(1).url }}">{{ num }}</a></li>
{% endfor %}
{% if articles_page.has_next() %}
<li class="next"><a
diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html
index c59b8f0..4d7e6bb 100644
--- a/pelican-bootstrap3/templates/includes/sidebar.html
+++ b/pelican-bootstrap3/templates/includes/sidebar.html
@@ -13,7 +13,7 @@
{% else %}
{% set name_sanitized = s[0]|lower|replace('+','-plus')|replace(' ','-') %}
{% endif %}
- {% if name_sanitized in ['flickr', 'slideshare', 'spotify', 'stack-overflow', 'weibo', 'line-chart'] %}
+ {% if name_sanitized in ['flickr', 'slideshare', 'spotify', 'stack-overflow', 'weibo', 'line-chart', 'home', 'user', 'users', 'envelope', 'envelope-o', 'stack-exchange', 'hacker-news'] %}
{% set iconattributes = '"fa fa-' ~ name_sanitized ~ ' fa-lg"' %}
{% else %}
{% set iconattributes = '"fa fa-' ~ name_sanitized ~ '-square fa-lg"' %}
@@ -79,18 +79,18 @@
{% if article.series %}
<li class="list-group-item"><h4><i class="fa fa-tags fa-list-ul"></i><span class="icon-label">Series</span></h4>
<ul class="list-group">
- <li class="list-group-item">
{% if article.series.previous %}
+ <li class="list-group-item">
<h5></i> Previous article</h5>
<a href="{{ SITEURL }}/{{ article.series.previous.url }}">{{ article.series.previous.title }}</a>
- {% endif %}
</li>
- <li class="list-group-item">
+ {% endif %}
{% if article.series.next %}
+ <li class="list-group-item">
<h5>Next article</h5>
<a href="{{ SITEURL }}/{{ article.series.next.url }}">{{ article.series.next.title }}</a>
- {% endif %}
</li>
+ {% endif %}
</ul>
</li>
{% endif%}
@@ -103,4 +103,3 @@
{% include 'includes/sidebar-images.html' %}
</ul>
</section>
-