aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates/includes
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3/templates/includes')
-rw-r--r--pelican-bootstrap3/templates/includes/footer.html16
-rw-r--r--pelican-bootstrap3/templates/includes/github.html16
-rw-r--r--pelican-bootstrap3/templates/includes/pagination.html21
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar.html55
-rw-r--r--pelican-bootstrap3/templates/includes/taglist.html16
5 files changed, 82 insertions, 42 deletions
diff --git a/pelican-bootstrap3/templates/includes/footer.html b/pelican-bootstrap3/templates/includes/footer.html
new file mode 100644
index 0000000..7e2cf39
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/footer.html
@@ -0,0 +1,16 @@
+<footer>
+ <div class="container">
+ <hr>
+ <p class="pull-right"><i class="icon-arrow-up"></i> <a href="#">Back to top</a></p>
+
+ {% if articles %}
+ {% set copy_date = articles[0].date.strftime('%Y') %}
+ {% else %}
+ {% set copy_date = '' %}
+ {% endif %}
+
+ <p>&copy; {{ copy_date }} {{ AUTHOR }} &middot; Powered by <a href="https://github.com/DandyDev/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>,
+ <a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
+ <a href="http://getbootstrap.com" target="_blank">Bootstrap</a></p>
+ </div>
+</footer> \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/github.html b/pelican-bootstrap3/templates/includes/github.html
index f8542c5..1d1e7f2 100644
--- a/pelican-bootstrap3/templates/includes/github.html
+++ b/pelican-bootstrap3/templates/includes/github.html
@@ -12,18 +12,6 @@
{% set GITHUB_SKIP_FORK = "false" %}
{% endif %}
{% endif %}
- {% if GITHUB_SORT_ATTRIBUTE is not defined %}
- {% set GITHUB_SORT_ATTRIBUTE = "pushed_at" %}
- {% endif %}
- {% if GITHUB_SORT_DESCENDING is not defined %}
- {% set GITHUB_SORT_DESCENDING = "true" %}
- {% else %}
- {% if GITHUB_SORT_DESCENDING %}
- {% set GITHUB_SORT_DESCENDING = "true" %}
- {% else %}
- {% set GITHUB_SORT_DESCENDING = "false" %}
- {% endif %}
- {% endif %}
<section>
<ul class="list-group list-group-flush">
@@ -49,9 +37,7 @@
user: '{{ GITHUB_USER }}',
count: {{ GITHUB_REPO_COUNT }},
skip_forks: {{ GITHUB_SKIP_FORK }},
- target: '#gh_repos',
- sort_attribute: '{{ GITHUB_SORT_ATTRIBUTE }}',
- sort_descending: {{ GITHUB_SORT_DESCENDING }}
+ target: '#gh_repos'
});
});
</script>
diff --git a/pelican-bootstrap3/templates/includes/pagination.html b/pelican-bootstrap3/templates/includes/pagination.html
new file mode 100644
index 0000000..d34c853
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/pagination.html
@@ -0,0 +1,21 @@
+{% if articles_page and articles_paginator.num_pages > 1 %}
+ <ul class="pagination">
+ {% if articles_page.has_previous() %}
+ {% set num = articles_page.previous_page_number() %}
+ <li class="prev"><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">&laquo;</a>
+ </li>
+ {% else %}
+ <li class="prev disabled"><a href="#">&laquo;</a></li>
+ {% 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>
+ {% endfor %}
+ {% if articles_page.has_next() %}
+ <li class="next"><a
+ href="{{ SITEURL }}/{{ articles_next_page.url }}">&raquo;</a></li>
+ {% else %}
+ <li class="next disabled"><a href="#">&raquo;</a></li>
+ {% endif %}
+ </ul>
+{% endif %} \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html
index 1398ac7..9f712b4 100644
--- a/pelican-bootstrap3/templates/includes/sidebar.html
+++ b/pelican-bootstrap3/templates/includes/sidebar.html
@@ -1,3 +1,7 @@
+{% if DISPLAY_TAGS_ON_SIDEBAR is not defined %}
+ {% set DISPLAY_TAGS_ON_SIDEBAR = True %}
+{% endif %}
+
<aside>
<section>
<ul class="list-group list-group-flush">
@@ -10,25 +14,42 @@
{% endfor %}
{% endif %}
- {# Uncomment if you want to show Categories #}
+ {% if DISPLAY_RECENT_POSTS_ON_SIDEBAR %}
+ {% if RECENT_POST_COUNT is not defined %}
+ {% set RECENT_POST_COUNT = 5 %}
+ {% endif %}
+ <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Recent Posts</h4></li>
+ {% for article in articles[:RECENT_POST_COUNT] %}
+ <li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ article.url }}">
+ {{ article.title }}
+ </a>
+ </li>
+ {% endfor %}
+ {% endif %}
+
+ {% if DISPLAY_CATEGORIES_ON_SIDEBAR %}
- {# <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Categories</h4></li>#}
- {# {% for cat, null in categories %}#}
- {# <li class="list-group-item">#}
- {# <a href="{{ SITEURL }}/{{ cat.url }}">#}
- {# <i class="icon-folder-open icon-large"></i>{{ cat }}#}
- {# </a>#}
- {# </li>#}
- {# {% endfor %}#}
+ <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Categories</h4></li>
+ {% for cat, null in categories %}
+ <li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ cat.url }}">
+ <i class="icon-folder-open icon-large"></i>{{ cat }}
+ </a>
+ </li>
+ {% endfor %}
+ {% endif %}
- <li class="list-group-item"><a href="{{ SITEURL }}/tags.html"><h4><i class="icon-tags icon-large"></i>Tags</h4></a></li>
- {% for tag in tag_cloud|sort(attribute='1') %}
- <li class="list-group-item tag-{{ tag.1 }}">
- <a href="{{ SITEURL }}/{{ tag.0.url }}">
- {{ tag.0 }}
- </a>
- </li>
- {% endfor %}
+ {% if DISPLAY_TAGS_ON_SIDEBAR %}
+ <li class="list-group-item"><a href="{{ SITEURL }}/tags.html"><h4><i class="icon-tags icon-large"></i>Tags</h4></a></li>
+ {% for tag in tag_cloud|sort(attribute='1') %}
+ <li class="list-group-item tag-{{ tag.1 }}">
+ <a href="{{ SITEURL }}/{{ tag.0.url }}">
+ {{ tag.0 }}
+ </a>
+ </li>
+ {% endfor %}
+ {% endif %}
</ul>
</section>
{% include 'includes/github.html' %}
diff --git a/pelican-bootstrap3/templates/includes/taglist.html b/pelican-bootstrap3/templates/includes/taglist.html
index f71ddcd..bcaa470 100644
--- a/pelican-bootstrap3/templates/includes/taglist.html
+++ b/pelican-bootstrap3/templates/includes/taglist.html
@@ -1,13 +1,9 @@
{% if article.tags %}
- {% if TAG_LIST_SEPARATOR is not defined %}
- {% set TAG_LIST_SEPARATOR = "/" %}
+<span class="label label-default">Tags</span>
+{% for tag in article.tags %}
+ <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
+ {% if not loop.last %}
+ /
{% endif %}
-
- <span class="label label-default">Tags</span>
- {% for tag in article.tags %}
- <a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>
- {% if not loop.last %}
- {{ TAG_LIST_SEPARATOR }}
- {% endif %}
- {% endfor %}
+{% endfor %}
{% endif %}