aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates
diff options
context:
space:
mode:
authorPeter Fraenkel <pnf@podsnap.com>2014-08-21 12:53:41 -0400
committerPeter Fraenkel <pnf@podsnap.com>2014-08-21 12:53:41 -0400
commitcfa5f40283668540cda45794200809640f251acd (patch)
treecf2bd8ffbea3ed4c01b5690ffd8ae2702976b583 /pelican-bootstrap3/templates
parent1cd742a84a81f135234be021cf4fe7b8ff2c13ff (diff)
parenta928687830876af8c919606bae47195af65bc82d (diff)
downloadpelican-themes-cfa5f40283668540cda45794200809640f251acd.tar.gz
Merge remote-tracking branch 'upstream/master'
Keep the latex and tag-specific feeds in bootstrap3 Conflicts: pelican-bootstrap3/templates/base.html
Diffstat (limited to 'pelican-bootstrap3/templates')
-rw-r--r--pelican-bootstrap3/templates/archives.html12
-rw-r--r--pelican-bootstrap3/templates/article.html23
-rw-r--r--pelican-bootstrap3/templates/base.html80
-rw-r--r--pelican-bootstrap3/templates/categories.html33
-rw-r--r--pelican-bootstrap3/templates/category.html11
-rw-r--r--pelican-bootstrap3/templates/includes/article_info.html7
-rw-r--r--pelican-bootstrap3/templates/includes/cc-license.html64
-rw-r--r--pelican-bootstrap3/templates/includes/comment_count.html2
-rw-r--r--pelican-bootstrap3/templates/includes/comments.html9
-rw-r--r--pelican-bootstrap3/templates/includes/footer.html22
-rw-r--r--pelican-bootstrap3/templates/includes/github-js.html33
-rw-r--r--pelican-bootstrap3/templates/includes/github.html39
-rw-r--r--pelican-bootstrap3/templates/includes/links.html13
-rw-r--r--pelican-bootstrap3/templates/includes/pagination.html21
-rw-r--r--pelican-bootstrap3/templates/includes/piwik.html20
-rw-r--r--pelican-bootstrap3/templates/includes/related-posts.html10
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar.html81
-rw-r--r--pelican-bootstrap3/templates/includes/translations.html2
-rw-r--r--pelican-bootstrap3/templates/index.html27
-rw-r--r--pelican-bootstrap3/templates/page.html14
-rw-r--r--pelican-bootstrap3/templates/tag.html11
-rw-r--r--pelican-bootstrap3/templates/tags.html34
22 files changed, 437 insertions, 131 deletions
diff --git a/pelican-bootstrap3/templates/archives.html b/pelican-bootstrap3/templates/archives.html
index 0f61031..abfe51f 100644
--- a/pelican-bootstrap3/templates/archives.html
+++ b/pelican-bootstrap3/templates/archives.html
@@ -1,4 +1,14 @@
{% extends "base.html" %}
+{% block title %}Archives - {{ SITENAME }}{% endblock %}
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li class="active">Archives</li>
+ </ol>
+ {% endif %}
+{% endblock %}
+
{% block content %}
<section id="content">
<h1>Archives for {{ SITENAME }}</h1>
@@ -6,7 +16,7 @@
<dl>
{% for article in dates %}
<dt>{{ article.locale_date }}</dt>
- <dd><a href='{{ article.url }}'>{{ article.title }}</a></dd>
+ <dd><a href='{{ SITEURL }}/{{ article.url }}'>{{ article.title }}</a></dd>
{% endfor %}
</dl>
</section>
diff --git a/pelican-bootstrap3/templates/article.html b/pelican-bootstrap3/templates/article.html
index 8588bda..e1f7f00 100644
--- a/pelican-bootstrap3/templates/article.html
+++ b/pelican-bootstrap3/templates/article.html
@@ -1,5 +1,23 @@
{% extends "base.html" %}
-{% block title %}{{ article.title }}{% endblock %}
+{% block title %}{{ article.title|striptags }} - {{ SITENAME }}{% endblock %}
+
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ {% if DISPLAY_CATEGORY_IN_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li><a href="{{ SITEURL }}/{{ article.category.url }}" title="{{ article.category }}">{{ article.category }}</a></li>
+ <li class="active">{{ article.title }}</li>
+ </ol>
+ {% else %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li class="active">{{ article.title }}</li>
+ </ol>
+ {% endif %}
+ {% endif %}
+{% endblock %}
+
{% block content %}
<section id="content">
<article>
@@ -7,7 +25,7 @@
<h1>
<a href="{{ SITEURL }}/{{ article.url }}"
rel="bookmark"
- title="Permalink to {{ article.title }}">
+ title="Permalink to {{ article.title|striptags }}">
{{ article.title }}
</a>
</h1>
@@ -21,6 +39,7 @@
{{ article.content }}
</div>
<!-- /.entry-content -->
+ {% include 'includes/related-posts.html' %}
{% include 'includes/addthis.html' %}
{% include 'includes/comments.html' %}
</article>
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html
index cc41e02..200a9b0 100644
--- a/pelican-bootstrap3/templates/base.html
+++ b/pelican-bootstrap3/templates/base.html
@@ -8,6 +8,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ {% if FAVICON %}
+ <link href="{{ SITEURL }}/{{ FAVICON }}" rel="icon">
+ {% endif %}
<!-- Enable latex plugin -->
{% if article and article.latex %}
@@ -17,18 +21,19 @@
{{ page.latex }}
{% endif %}
- <!-- Open Graph tags -->
+
+ {# Open Graph tags #}
{% if USE_OPEN_GRAPH is not defined %}
{% set USE_OPEN_GRAPH = True %}
{% endif %}
-
{% if USE_OPEN_GRAPH %}
+ <!-- Open Graph tags -->
{% if OPEN_GRAPH_FB_APP_ID %}
<meta property="fb:app_id" content="{{ OPEN_GRAPH_FB_APP_ID }}"/>
{% endif %}
{% if article %}
<meta property="og:type" content="article"/>
- <meta property="og:title" content="{{ article.title }}"/>
+ <meta property="og:title" content="{{ article.title|striptags }}"/>
<meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
<meta property="og:description" content="{{ article.summary|striptags }}"/>
{% elif page %}
@@ -43,10 +48,10 @@
{% if OPEN_GRAPH_IMAGE %}
<meta property="og:image"
content="{{ SITEURL }}/static/{{ OPEN_GRAPH_IMAGE }}"/>
+ {% endif %}
{% endif %}
- {% endif %}
-
{% endif %}
+
<!-- Bootstrap -->
{% if BOOTSTRAP_THEME %}
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/>
@@ -54,13 +59,19 @@
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.min.css" type="text/css"/>
{% endif %}
<link href="{{ SITEURL }}/theme/css/font-awesome.min.css" rel="stylesheet">
- <link href="{{ SITEURL }}/theme/css/bootstrap-glyphicons.css" rel="stylesheet">
- <link href="{{ SITEURL }}/theme/css/pygments.css" rel="stylesheet">
+
+ <link href="{{ SITEURL }}/theme/css/pygments/{{ PYGMENTS_STYLE|default('native') }}.css" rel="stylesheet">
+ {% if DOCUTIL_CSS %}
+ <link href="{{ SITEURL }}/theme/css/html4css1.css" rel="stylesheet">
+ {% endif %}
+ {% if TYPOGRIFY %}
+ <link href="{{ SITEURL }}/theme/css/typogrify.css" rel="stylesheet">
+ {% endif %}
<link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css" type="text/css"/>
- <!-- JavaScript plugins (requires jQuery) -->
- <script src="http://code.jquery.com/jquery.js"></script>
+ {% if CUSTOM_CSS %}
+ <link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
+ {% endif %}
- {% if page_name == "index" %}
{% if FEED_ALL_ATOM %}
<link href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} ATOM Feed"/>
@@ -69,7 +80,6 @@
<link href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} RSS Feed"/>
{% endif %}
- {% endif %}
{% if tag and TAG_FEED_ATOM %}
<link href="{{ SITEURL }}/{{ TAG_FEED_ATOM|format(tag) }}" type="application/atom+xml" rel="alternate"
@@ -81,10 +91,10 @@
title="{{ SITENAME }} {{ category }} ATOM Feed"/>
{% endif %}
- {% include 'includes/ga.html' %}
</head>
<body>
-<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
+
+<div class="navbar {% if BOOTSTRAP_NAVBAR_INVERSE %}navbar-inverse{% else %}navbar-default{% endif %} navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
@@ -93,7 +103,10 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a href="{{ SITEURL }}" class="navbar-brand">{{ SITENAME }}</a>
+ <a href="{{ SITEURL }}/" class="navbar-brand">
+ {% if SITELOGO %}<img src="{{ SITEURL }}/{{ SITELOGO }}" width="{{ SITELOGO_SIZE }}"/> {% endif %}
+ {% if not HIDE_SITENAME %}{{ SITENAME }}{% endif %}
+ </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
@@ -101,37 +114,51 @@
<li><a href="{{ link }}">{{ title }}</a></li>
{% endfor %}
{% if DISPLAY_PAGES_ON_MENU %}
- {% for page in PAGES %}
- <li><a href="{{ SITEURL }}/{{ page.url }}">{{ page.title }}</a></li>
- {% endfor %}
+ {% for p in PAGES %}
+ <li{% if p == page %} class="active"{% endif %}><a href="{{ SITEURL }}/{{ p.url }}">
+ {{ p.title }}
+ </a></li>
+ {% endfor %}
{% endif %}
{% if DISPLAY_CATEGORIES_ON_MENU %}
{% for cat, null in categories %}
<li {% if cat == category %}class="active"{% endif %}>
- <a href="{{ SITEURL }}/{{ cat.url }}">{{ cat }}</a>
+ <a href="{{ SITEURL }}/{{ cat.url }}">{{ cat | capitalize }}</a>
</li>
{% endfor %}
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
- <li><a href="{{ SITEURL }}/archives.html"><i class="icon-th-list"></i>Archives</a></li>
+ <li><a href="{{ SITEURL }}/{{ ARCHIVES_URL | default('archives.html') }}"><i class="fa fa-th-list"></i><span class="icon-label">Archives</span></a></li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
-</nav>
-<!-- /.navbar -->
+</div> <!-- /.navbar -->
+
<div class="container">
<div class="row">
- <div class="col-lg-9">
- {% block content %}
- {% endblock %}
+ {% if not HIDE_SIDEBAR %}
+ <div class="col-sm-9">
+ {% else %}
+ <div class="col-lg-12">
+ {% endif %}
+ {% block breadcrumbs %}
+ {% endblock %}
+
+ {% block content %}
+ {% endblock %}
</div>
- <div class="col-lg-3 well well-sm" id="sidebar">
+ {% if not HIDE_SIDEBAR %}
+ <div class="col-sm-3 well well-sm" id="sidebar">
{% include 'includes/sidebar.html' %}
</div>
+ {% endif %}
</div>
</div>
+{% include 'includes/footer.html' %}
+
+<script src="//code.jquery.com/jquery.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script>
@@ -139,6 +166,9 @@
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="{{ SITEURL }}/theme/js/respond.min.js"></script>
+{% include 'includes/github-js.html' %}
{% include 'includes/disqus_script.html' %}
+{% include 'includes/ga.html' %}
+{% include 'includes/piwik.html' %}
</body>
</html>
diff --git a/pelican-bootstrap3/templates/categories.html b/pelican-bootstrap3/templates/categories.html
index 2e1d523..6898f97 100644
--- a/pelican-bootstrap3/templates/categories.html
+++ b/pelican-bootstrap3/templates/categories.html
@@ -1,13 +1,36 @@
{% extends "base.html" %}
-{% block title %}{{ SITENAME }} - Categories{% endblock %}
+{% block title %}Categories - {{ SITENAME }}{% endblock %}
+
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li class="active">Categories</li>
+ </ol>
+ {% endif %}
+{% endblock %}
{% block content %}
<section id="categories">
- <h1>Categories for {{ SITENAME }}</h1>
- <ul>
+ <h1>All Categories for {{ SITENAME }}</h1>
+ <div class="panel-group" id="accordion">
{% for category, articles in categories %}
- <li><a href="{{ category.url }}">{{ category }}</a></li>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapse-{{category.slug}}">{{ category }} <span class="badge pull-right">{{ articles|count }}</span></a>
+ </h4>
+ </div>
+ <div id="collapse-{{category.slug}}" class="panel-collapse collapse">
+ <div class="panel-body">
+ {% for article in articles %}
+ <p><span class="categories-timestamp"><time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time></span> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></p>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
{% endfor %}
- </ul>
+ </div>
+
</section>
{% endblock %}
diff --git a/pelican-bootstrap3/templates/category.html b/pelican-bootstrap3/templates/category.html
index 56f8e93..9cfa5ad 100644
--- a/pelican-bootstrap3/templates/category.html
+++ b/pelican-bootstrap3/templates/category.html
@@ -1,2 +1,11 @@
{% extends "index.html" %}
-{% block title %}{{ SITENAME }} - {{ category }}{% endblock %}
+{% block title %}{{ category }} - {{ SITENAME }}{% endblock %}
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li><a href="{{ SITEURL}}/{{ CATEGORIES_URL }}" title="{{ SITENAME }} Categories">Categories</a></li>
+ <li class="active">{{ category }}</li>
+ </ol>
+ {% endif %}
+{% endblock %}
diff --git a/pelican-bootstrap3/templates/includes/article_info.html b/pelican-bootstrap3/templates/includes/article_info.html
index 6610aa2..abbf807 100644
--- a/pelican-bootstrap3/templates/includes/article_info.html
+++ b/pelican-bootstrap3/templates/includes/article_info.html
@@ -1,12 +1,12 @@
<footer class="post-info">
<span class="label label-default">Date</span>
<span class="published">
- <i class="icon-calendar"></i>{{ article.locale_date }}
+ <i class="fa fa-calendar"></i><time datetime="{{ article.date.isoformat() }}"> {{ article.locale_date }}</time>
</span>
{# Uncomment if you want the author shown #}
{#{% if article.author %}#}
{#<span class="label">By</span>#}
- {#<a href="{{ SITEURL }}/{{ article.author.url }}"><i class="icon-user"></i>{{ article.author }}</a>#}
+ {#<a href="{{ SITEURL }}/{{ article.author.url }}"><i class="fa fa-user"></i> {{ article.author }}</a>#}
{#{% endif %}#}
{# Uncomment if you want to show Categories#}
@@ -20,5 +20,6 @@
{% endif %}
{% include 'includes/taglist.html' %}
- {% include 'includes/translations.html' %}
+ {% import 'includes/translations.html' as translations with context %}
+ {{ translations.translations_for(article) }}
</footer><!-- /.post-info -->
diff --git a/pelican-bootstrap3/templates/includes/cc-license.html b/pelican-bootstrap3/templates/includes/cc-license.html
new file mode 100644
index 0000000..5c44993
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/cc-license.html
@@ -0,0 +1,64 @@
+{# ------------------------------------------------------------------------ #}
+{# Creative Commons license mark generator for Jinja2 templates, including #}
+{# Pelican-generated static sites (or blogs). #}
+{# ------------------------------------------------------------------------ #}
+{# To use, put this file in a location where your template can import it. #}
+{# Then import into the template, for example like this: #}
+{# {% from '/path/to/where/you/placed/the/file' import cc_license_mark %} #}
+{# Then call as simply as {{ cc_license_mark("CC-BY") }}. #}
+{# #}
+{# If full attribution markup is desired in a Pelican template, the #}
+{# attr_props dict can be defaulted to the following when calling the macro:#}
+{# attr_props={'title':SITENAME,'name':AUTHOR,'url':SITEURL}
+{# ------------------------------------------------------------------------ #}
+{# Generate a license mark for Creative Commons licensed content. #}
+{# Choose the license either by name (CC-BY, CC-BY-SA, CC-BY-NC-SA, or #}
+{# CC-BY-NC-ND), or by its features (allow derivatives: Yes, No, ShareAlike;#}
+{# allow commercial reuse: Yes, No). Name, if provided, takes precedence, #}
+{# and case is ignored. #}
+{# #}
+{# Optional: #}
+{# br_after_icon: if true put a line break after the license icon #}
+{# attr_markup: if true create markup for fulll attribution #}
+{# attr_props: if attr_markup, a dict with title, name, and url keys #}
+{# specifying how under which title, to which creator, and #}
+{# to which URL to attribute the work #}
+{# The parameters all mirror the Creative Commone license chooser: #}
+{# http://creativecommons.org/choose/ #}
+{# ------------------------------------------------------------------------ #}
+{# Copyright (c) 1994 Hilmar Lapp, hlapp@drycafe.net. #}
+{# Licensed under the terms of the MIT License. #}
+{# Source at http://github.com/hlapp/cc-tools. Please fork & contribute. #}
+{# ------------------------------------------------------------------------ #}
+{% macro cc_license_mark(cc_name,
+ derivatives, commercial,
+ br_after_icon=false,
+ attr_markup=false,
+ attr_props={}) %}
+ {% if cc_name %}
+ {% set cc_name = cc_name|lower|replace("cc-","") %}
+ {% else %}
+ {% set cc_name = "by" %}
+ {% set cc_title_suffix = "" %}
+ {% if (not commercial) or (commercial|lower == "no") %}
+ {% set cc_name = cc_name ~ "-nc" %}
+ {% set cc_title_suffix = "-NonCommercial" %}
+ {% endif %}
+ {% if derivatives|lower == "no" %}
+ {% set cc_name = cc_name ~ "-nd" %}
+ {% set cc_title_suffix = cc_title_suffix ~ "-NoDerivatives" %}
+ {% elif derivatives|lower == "sharealike" %}
+ {% set cc_name = cc_name ~ "-sa" %}
+ {% set cc_title_suffix = cc_title_suffix ~ "-ShareAlike" %}
+ {% endif %}
+ {% endif %}
+ {% set cc_title, cc_uri, cc_icon = ("Creative Commons Attribution 4.0 InternationalCCSUFFIX License","http://creativecommons.org/licenses/CCNAME/4.0/","http://i.creativecommons.org/l/CCNAME/4.0/80x15.png") %}
+ <a rel="license" href="{{ cc_uri|replace('CCNAME',cc_name) }}"><img alt="Creative Commons License" style="border-width:0" src="{{ cc_icon|replace('CCNAME',cc_name) }}" /></a>
+ {% if br_after_img %}<br/>{% endif %}
+ {% if attr_markup %}
+ &quot;<span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">{{ attr_props['title'] }}</span>&quot; by <a xmlns:cc="http://creativecommons.org/ns#" href="{{ attr_props['url'] }}" property="cc:attributionName" rel="cc:attributionURL">{{ attr_props['name'] }}</a> is
+ {% else %}
+ Content
+ {% endif %}
+ licensed under a <a rel="license" href="{{ cc_uri|replace('CCNAME',cc_name) }}">{{ cc_title|replace('CCSUFFIX',cc_title_suffix) }}</a>, except where indicated otherwise.
+{% endmacro %}
diff --git a/pelican-bootstrap3/templates/includes/comment_count.html b/pelican-bootstrap3/templates/includes/comment_count.html
index 7ebaf20..151c501 100644
--- a/pelican-bootstrap3/templates/includes/comment_count.html
+++ b/pelican-bootstrap3/templates/includes/comment_count.html
@@ -1 +1 @@
-{% if DISQUS_SITENAME %}<p><small>There are <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" data-disqus-identifier="{{ article.slug }}">comments</a>.</small></p>{% endif %} \ No newline at end of file
+{% if DISQUS_SITENAME and DISQUS_DISPLAY_COUNTS %}<p><small>There are <a href="{{ SITEURL }}/{{ article.url }}#disqus_thread" {% if not DISQUS_NO_ID %}data-disqus-identifier="{{ article.date|strftime('%Y-%m-') ~ article.slug if DISQUS_ID_PREFIX_SLUG else article.slug }}"{% endif %}>comments</a>.</small></p>{% endif %} \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/comments.html b/pelican-bootstrap3/templates/includes/comments.html
index b16517b..94deef4 100644
--- a/pelican-bootstrap3/templates/includes/comments.html
+++ b/pelican-bootstrap3/templates/includes/comments.html
@@ -6,8 +6,13 @@
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = '{{ DISQUS_SITENAME }}'; // required: replace example with your forum shortname
- var disqus_identifier = '{{ article.slug }}';
+ {% if not DISQUS_NO_ID %}
+ var disqus_identifier = '{{ article.date|strftime('%Y-%m-') ~ article.slug if DISQUS_ID_PREFIX_SLUG else article.slug }}';
+ {% endif %}
var disqus_url = '{{ SITEURL }}/{{ article.url }}';
+ var disqus_config = function () {
+ this.language = "{{ DEFAULT_LANG }}";
+ };
/* * * DON'T EDIT BELOW THIS LINE * * */
(function () {
@@ -23,4 +28,4 @@
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</section>
-{% endif %} \ No newline at end of file
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/footer.html b/pelican-bootstrap3/templates/includes/footer.html
new file mode 100644
index 0000000..7b430cd
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/footer.html
@@ -0,0 +1,22 @@
+<footer>
+ <div class="container">
+ <hr>
+ <div class="row">
+ {% if articles %}
+ {% set copy_date = articles[0].date.strftime('%Y') %}
+ {% else %}
+ {% set copy_date = '' %}
+ {% endif %}
+ <div class="col-xs-10">&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>
+ {%- if CC_LICENSE or CC_LICENSE_DERIVATIVES or CC_LICENSE_COMMERCIAL %}
+ {% from 'includes/cc-license.html' import cc_license_mark %}
+ <p><small>{{ cc_license_mark(cc_name=CC_LICENSE,derivatives=CC_LICENSE_DERIVATIVES,commercial=CC_LICENSE_COMMERCIAL,attr_markup=CC_ATTR_MARKUP,attr_props={'title':SITENAME,'name':article.author if article else AUTHOR,'url':SITEURL}) }}</small></p>
+ {% endif %}
+ </div>
+ <div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
+ </div>
+ </div>
+</footer> \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/github-js.html b/pelican-bootstrap3/templates/includes/github-js.html
new file mode 100644
index 0000000..f1b321f
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/github-js.html
@@ -0,0 +1,33 @@
+{% if GITHUB_USER %}
+ {% if GITHUB_REPO_COUNT is not defined %}
+ {% set GITHUB_REPO_COUNT = 5 %}
+ {% endif %}
+ {% if GITHUB_SKIP_FORK is not defined %}
+ {% set GITHUB_SKIP_FORK = "false" %}
+ {% else %}
+ {% if GITHUB_SKIP_FORK %}
+ {% set GITHUB_SKIP_FORK = "true" %}
+ {% else %}
+ {% set GITHUB_SKIP_FORK = "false" %}
+ {% endif %}
+ {% endif %}
+ <script type="text/javascript">
+ $(document).ready(function () {
+ if (!window.jXHR) {
+ var jxhr = document.createElement('script');
+ jxhr.type = 'text/javascript';
+ jxhr.src = '{{ SITEURL }}/theme/js/jXHR.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(jxhr, s);
+ }
+
+ github.showRepos({
+ user: '{{ GITHUB_USER }}',
+ count: {{ GITHUB_REPO_COUNT }},
+ skip_forks: {{ GITHUB_SKIP_FORK }},
+ target: '#gh_repos'
+ });
+ });
+ </script>
+ <script src="{{ SITEURL }}/theme/js/github.js" type="text/javascript"></script>
+{% endif %} \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/github.html b/pelican-bootstrap3/templates/includes/github.html
index 1d1e7f2..00ea0f3 100644
--- a/pelican-bootstrap3/templates/includes/github.html
+++ b/pelican-bootstrap3/templates/includes/github.html
@@ -1,46 +1,11 @@
{% if GITHUB_USER %}
- {% if GITHUB_REPO_COUNT is not defined %}
- {% set GITHUB_REPO_COUNT = 5 %}
- {% endif %}
- {% if GITHUB_SKIP_FORK is not defined %}
- {% set GITHUB_SKIP_FORK = "false" %}
- {% else %}
- {% if GITHUB_SKIP_FORK %}
- {% set GITHUB_SKIP_FORK = "true" %}
- {% else %}
- {% set GITHUB_SKIP_FORK = "false" %}
- {% endif %}
- {% endif %}
-
- <section>
- <ul class="list-group list-group-flush">
- <li class="list-group-item"><h4><i class="icon-github icon-large"></i>GitHub Repos</h4></li>
+ <li class="list-group-item"><h4><i class="fa fa-github fa-lg"></i><span class="icon-label">GitHub Repos</span></h4>
<div id="gh_repos">
<p class="list-group-item">Status updating...</p>
</div>
{% if GITHUB_SHOW_USER_LINK is defined %}
<a href="https://github.com/{{ GITHUB_USER }}">@{{ GITHUB_USER }}</a> on GitHub
{% endif %}
- </ul>
- <script type="text/javascript">
- $(document).ready(function () {
- if (!window.jXHR) {
- var jxhr = document.createElement('script');
- jxhr.type = 'text/javascript';
- jxhr.src = '{{ SITEURL }}/theme/js/jXHR.js';
- var s = document.getElementsByTagName('script')[0];
- s.parentNode.insertBefore(jxhr, s);
- }
-
- github.showRepos({
- user: '{{ GITHUB_USER }}',
- count: {{ GITHUB_REPO_COUNT }},
- skip_forks: {{ GITHUB_SKIP_FORK }},
- target: '#gh_repos'
- });
- });
- </script>
- <script src="{{ SITEURL }}/theme/js/github.js" type="text/javascript"></script>
- </section>
+ </li>
{% endif %} \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/links.html b/pelican-bootstrap3/templates/includes/links.html
new file mode 100644
index 0000000..3286b5a
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/links.html
@@ -0,0 +1,13 @@
+{% if LINKS %}
+ <li class="list-group-item"><h4><i class="fa fa-external-link-square fa-lg"></i><span class="icon-label">Links</span></h4>
+ <ul class="list-group" id="links">
+ {% for name, link in LINKS %}
+ <li class="list-group-item">
+ <a href="{{ link }}" target="_blank">
+ {{ name }}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ </li>
+{% endif %} \ No newline at end of file
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/piwik.html b/pelican-bootstrap3/templates/includes/piwik.html
new file mode 100644
index 0000000..70c45c2
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/piwik.html
@@ -0,0 +1,20 @@
+{% if PIWIK_SITE_ID and PIWIK_URL %}
+ {% if PIWIK_SSL_URL is not defined %}
+ {% set PIWIK_SSL_URL = PIWIK_URL %}
+ {% endif %}
+<!-- Piwik -->
+<script type="text/javascript">
+ var _paq = _paq || [];
+ _paq.push(["trackPageView"]);
+ _paq.push(["enableLinkTracking"]);
+
+ (function() {
+ var u=(("https:" == document.location.protocol) ? "https://{{ PIWIK_SSL_URL }}/" : "http://{{ PIWIK_URL }}/");
+ _paq.push(["setTrackerUrl", u+"piwik.php"]);
+ _paq.push(["setSiteId", "{{ PIWIK_SITE_ID }}"]);
+ var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
+ g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Piwik Code -->
+{% endif %} \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/includes/related-posts.html b/pelican-bootstrap3/templates/includes/related-posts.html
new file mode 100644
index 0000000..70a56f3
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/related-posts.html
@@ -0,0 +1,10 @@
+{% if article.related_posts %}
+<section class="well" id="related-posts">
+ <h4>{{ RELATED_POSTS_TEXT|default('Related Posts:') }}</h4>
+ <ul>
+ {% for related_post in article.related_posts %}
+ <li><a href="{{ SITEURL }}/{{ related_post.url }}">{{ related_post.title }}</a></li>
+ {% endfor %}
+ </ul>
+</section>
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html
index 1398ac7..ebb4d8a 100644
--- a/pelican-bootstrap3/templates/includes/sidebar.html
+++ b/pelican-bootstrap3/templates/includes/sidebar.html
@@ -1,35 +1,70 @@
+{% if DISPLAY_TAGS_ON_SIDEBAR is not defined %}
+ {% set DISPLAY_TAGS_ON_SIDEBAR = True %}
+{% endif %}
+
<aside>
<section>
<ul class="list-group list-group-flush">
{% if SOCIAL %}
- <li class="list-group-item"><h4><i class="icon-home icon-large"></i>Social</h4></li>
- {% for name, link in SOCIAL %}
+ <li class="list-group-item"><h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Social</span></h4>
+ <ul class="list-group" id="social">
+ {% for name, link in SOCIAL %}
<li class="list-group-item"><a href="{{ link }}"><i
- class="icon-{{ name }}-sign icon-large"></i>{{ name }}
+ class="fa fa-{{ name|lower|replace('+','-plus') }}-square fa-lg"></i> {{ name }}
</a></li>
- {% endfor %}
+ {% endfor %}
+ </ul>
+ </li>
{% endif %}
- {# Uncomment if you want to show Categories #}
-
- {# <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 %}#}
+ {% 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="fa fa-home fa-lg"></i><span class="icon-label">Recent Posts</span></h4>
+ <ul class="list-group" id="recentposts">
+ {% for article in articles[:RECENT_POST_COUNT] %}
+ <li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ article.url }}">
+ {{ article.title }}
+ </a>
+ </li>
+ {% endfor %}
+ </ul>
+ </li>
+ {% 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>
+ {% if DISPLAY_CATEGORIES_ON_SIDEBAR %}
+ <li class="list-group-item"><a href="{{ SITEURL }}/{{ CATEGORIES_URL }}"><h4><i class="fa fa-home fa-lg"></i><span class="icon-label">Categories</span></h4></a>
+ <ul class="list-group" id="categories">
+ {% for cat, null in categories %}
+ <li class="list-group-item">
+ <a href="{{ SITEURL }}/{{ cat.url }}">
+ <i class="fa fa-folder-open fa-lg"></i> {{ cat }}
+ </a>
+ </li>
+ </ul>
+ {% endfor %}
</li>
- {% endfor %}
+ {% endif %}
+
+ {% if DISPLAY_TAGS_ON_SIDEBAR %}
+ <li class="list-group-item"><a href="{{ SITEURL }}/{{ TAGS_URL }}"><h4><i class="fa fa-tags fa-lg"></i><span class="icon-label">Tags</span></h4></a>
+ <ul class="list-group" id="tags">
+ {% 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 %}
+ </ul>
+ </li>
+ {% endif %}
+ {% include 'includes/github.html' %}
+ {% include 'includes/links.html' %}
+
</ul>
</section>
- {% include 'includes/github.html' %}
-</aside> \ No newline at end of file
+
+</aside>
diff --git a/pelican-bootstrap3/templates/includes/translations.html b/pelican-bootstrap3/templates/includes/translations.html
index 65c5684..ea693df 100644
--- a/pelican-bootstrap3/templates/includes/translations.html
+++ b/pelican-bootstrap3/templates/includes/translations.html
@@ -1,6 +1,8 @@
+{% macro translations_for(article) %}
{% if article.translations %}
<span class="label label-default">Lang</span>
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}
+{% endmacro %} \ No newline at end of file
diff --git a/pelican-bootstrap3/templates/index.html b/pelican-bootstrap3/templates/index.html
index d948704..b38c0ee 100644
--- a/pelican-bootstrap3/templates/index.html
+++ b/pelican-bootstrap3/templates/index.html
@@ -5,8 +5,7 @@
<article>
<h2><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></h2>
<div class="summary">{{ article.summary }}
- {# Uncomment if you want to show comment counts #}
- {#{% include 'includes/comment_count.html' %}#}
+ {% include 'includes/comment_count.html' %}
<a class="btn btn-default btn-xs" href="{{ SITEURL }}/{{ article.url }}">more ...</a>
</div>
</article>
@@ -14,25 +13,5 @@
{% endfor %}
{% endif %}
- {% 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 }}/{{ page_name }}{{ num if num > 1 else '' }}.html">&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 }}/{{ page_name }}{{ articles_page.next_page_number() }}.html">&raquo;</a></li>
- {% else %}
- <li class="next disabled"><a href="#">&laquo;</a></li>
- {% endif %}
- </ul>
- {% endif %}
-{% endblock content %} \ No newline at end of file
+ {% include 'includes/pagination.html' %}
+{% endblock content %}
diff --git a/pelican-bootstrap3/templates/page.html b/pelican-bootstrap3/templates/page.html
index a53f3db..179b2d7 100644
--- a/pelican-bootstrap3/templates/page.html
+++ b/pelican-bootstrap3/templates/page.html
@@ -1,8 +1,20 @@
{% extends "base.html" %}
-{% block title %}{{ page.title }}{% endblock %}
+{% block title %}{{ page.title }} - {{ SITENAME }}{% endblock %}
+
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li class="active">{{ page.title }}</li>
+ </ol>
+ {% endif %}
+{% endblock %}
+
{% block content %}
<section id="content" class="body">
<h1 class="entry-title">{{ page.title }}</h1>
+ {% import 'includes/translations.html' as translations with context %}
+ {{ translations.translations_for(page) }}
{% if PDF_PROCESSOR %}
<a href="{{ SITEURL }}/pdf/{{ page.slug }}.pdf">
get the pdf
diff --git a/pelican-bootstrap3/templates/tag.html b/pelican-bootstrap3/templates/tag.html
index 68cdcba..9895705 100644
--- a/pelican-bootstrap3/templates/tag.html
+++ b/pelican-bootstrap3/templates/tag.html
@@ -1,2 +1,11 @@
{% extends "index.html" %}
-{% block title %}{{ SITENAME }} - {{ tag }}{% endblock %}
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li><a href="{{ SITEURL }}/{{ TAGS_URL }}" title="Tags">Tags</a></li>
+ <li class="active">{{ tag }}</li>
+ </ol>
+ {% endif %}
+{% endblock %}
+{% block title %}{{ tag }} - {{ SITENAME }}{% endblock %}
diff --git a/pelican-bootstrap3/templates/tags.html b/pelican-bootstrap3/templates/tags.html
index e2fe903..3f29a36 100644
--- a/pelican-bootstrap3/templates/tags.html
+++ b/pelican-bootstrap3/templates/tags.html
@@ -1,13 +1,37 @@
{% extends "base.html" %}
-{% block title %}{{ SITENAME }} - Tags{% endblock %}
+
+{% block title %}Tags - {{ SITENAME }}{% endblock %}
+
+{% block breadcrumbs %}
+ {% if DISPLAY_BREADCRUMBS %}
+ <ol class="breadcrumb">
+ <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
+ <li class="active">Tags</li>
+ </ol>
+ {% endif %}
+{% endblock %}
{% block content %}
<section id="tags">
<h1>Tags for {{ SITENAME }}</h1>
- <ul>
+ <div class="panel-group" id="accordion">
{%- for tag, articles in tags|sort %}
- <li><a href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a> ({{ articles|count }})</li>
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ <h4 class="panel-title">
+ <a data-toggle="collapse" data-parent="#accordion" href="#collapse-{{tag.slug}}">{{ tag }} <span class="badge pull-right">{{ articles|count }}</span></a>
+ </h4>
+ </div>
+ <div id="collapse-{{tag.slug}}" class="panel-collapse collapse">
+ <div class="panel-body">
+ {% for article in articles %}
+ <p><span class="categories-timestamp"><time datetime="{{ article.date.isoformat() }}">{{ article.locale_date }}</time></span> <a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></p>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
{% endfor %}
- </ul>
+ </div>
+
</section>
-{% endblock %} \ No newline at end of file
+{% endblock %}