aboutsummaryrefslogtreecommitdiffstats
path: root/pelican-bootstrap3/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pelican-bootstrap3/templates')
-rw-r--r--pelican-bootstrap3/templates/article.html3
-rw-r--r--pelican-bootstrap3/templates/base.html51
-rw-r--r--pelican-bootstrap3/templates/includes/article_info.html8
-rw-r--r--pelican-bootstrap3/templates/includes/cc-license.html3
-rw-r--r--pelican-bootstrap3/templates/includes/comments.html2
-rw-r--r--pelican-bootstrap3/templates/includes/footer.html6
-rw-r--r--pelican-bootstrap3/templates/includes/github-js.html6
-rw-r--r--pelican-bootstrap3/templates/includes/minify_tipuesearch.html3
-rw-r--r--pelican-bootstrap3/templates/includes/series.html22
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar-images.html9
-rw-r--r--pelican-bootstrap3/templates/includes/sidebar.html37
-rw-r--r--pelican-bootstrap3/templates/search.html7
12 files changed, 119 insertions, 38 deletions
diff --git a/pelican-bootstrap3/templates/article.html b/pelican-bootstrap3/templates/article.html
index 087e432..4cb6a70 100644
--- a/pelican-bootstrap3/templates/article.html
+++ b/pelican-bootstrap3/templates/article.html
@@ -89,6 +89,7 @@
</div>
<!-- /.entry-content -->
{% include 'includes/related-posts.html' %}
+ {% include 'includes/series.html' %}
{% include 'includes/addthis.html' %}
{% include 'includes/shariff.html' %}
{% include 'includes/comments.html' %}
@@ -106,6 +107,6 @@
{% endif %}
{% if SHARIFF|default(false) %}
<!-- add shariff support -->
- <script src="{{ SITEURL }}/theme/js/shariff.min.js"></script>
+ <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/shariff.min.js"></script>
{% endif %}
{% endblock %}
diff --git a/pelican-bootstrap3/templates/base.html b/pelican-bootstrap3/templates/base.html
index 112c249..610d050 100644
--- a/pelican-bootstrap3/templates/base.html
+++ b/pelican-bootstrap3/templates/base.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
-<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}"
- {% if USE_OPEN_GRAPH %}
- xmlns:og="http://ogp.me/ns#"
- xmlns:fb="https://www.facebook.com/2008/fbml"{% endif %}>
+{% if USE_OPEN_GRAPH is not defined %}
+ {% set USE_OPEN_GRAPH = True %}
+{% endif %}
+<html lang="{% block html_lang %}{{ DEFAULT_LANG }}{% endblock %}"{% if USE_OPEN_GRAPH %} prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml"{% endif %}>
<head>
<title>{% block title %}{{ SITENAME }}{% endblock %}</title>
<!-- Using the latest rendering mode for IE -->
@@ -32,9 +32,6 @@
{% endblock %}
{# Open Graph tags #}
- {% if USE_OPEN_GRAPH is not defined %}
- {% set USE_OPEN_GRAPH = True %}
- {% endif %}
{% if USE_OPEN_GRAPH %}
{% block opengraph %}
<!-- Open Graph tags -->
@@ -58,39 +55,50 @@
<!-- Bootstrap -->
{% if BOOTSTRAP_THEME %}
- <link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/>
+ <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.{{ BOOTSTRAP_THEME }}.min.css" type="text/css"/>
{% else %}
- <link rel="stylesheet" href="{{ SITEURL }}/theme/css/bootstrap.min.css" type="text/css"/>
+ <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/bootstrap.min.css" type="text/css"/>
{% endif %}
- <link href="{{ SITEURL }}/theme/css/font-awesome.min.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/font-awesome.min.css" rel="stylesheet">
- <link href="{{ SITEURL }}/theme/css/pygments/{{ PYGMENTS_STYLE|default('native') }}.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/pygments/{{ PYGMENTS_STYLE|default('native') }}.css" rel="stylesheet">
{% if 'tipue_search' in PLUGINS %}
- <link href="{{ SITEURL}}/theme/tipuesearch/tipuesearch.css" rel="stylesheet">
+ <link href="{{ SITEURL}}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.css" rel="stylesheet">
{% endif %}
{% if DOCUTIL_CSS %}
- <link href="{{ SITEURL }}/theme/css/html4css1.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/html4css1.css" rel="stylesheet">
{% endif %}
{% if TYPOGRIFY %}
- <link href="{{ SITEURL }}/theme/css/typogrify.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/typogrify.css" rel="stylesheet">
{% endif %}
- <link rel="stylesheet" href="{{ SITEURL }}/theme/css/style.css" type="text/css"/>
+ <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/style.css" type="text/css"/>
{% if CUSTOM_CSS %}
<link href="{{ SITEURL }}/{{ CUSTOM_CSS }}" rel="stylesheet">
{% endif %}
{% if SHARIFF %}
- <link href="{{ SITEURL }}/theme/css/shariff/shariff.min.css" rel="stylesheet">
+ <link href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/css/shariff/shariff.min.css" rel="stylesheet">
{% endif %}
{% if FEED_ALL_ATOM %}
<link href="{{ SITEURL }}/{{ FEED_ALL_ATOM }}" type="application/atom+xml" rel="alternate"
title="{{ SITENAME }} ATOM Feed"/>
{% endif %}
+
{% if FEED_ALL_RSS %}
<link href="{{ SITEURL }}/{{ FEED_ALL_RSS }}" type="application/rss+xml" rel="alternate"
title="{{ SITENAME }} RSS Feed"/>
{% endif %}
+ {% if tag and TAG_FEED_ATOM %}
+ <link href="{{ SITEURL }}/{{ TAG_FEED_ATOM|format(tag.slug) }}" type="application/atom+xml" rel="alternate"
+ title="{{ SITENAME }} {{ tag }} ATOM Feed"/>
+ {% endif %}
+
+ {% if category and CATEGORY_FEED_ATOM %}
+ <link href="{{ SITEURL }}/{{ CATEGORY_FEED_ATOM|format(category.slug) }}" type="application/atom+xml" rel="alternate"
+ title="{{ SITENAME }} {{ category }} ATOM Feed"/>
+ {% endif %}
+
</head>
<body>
@@ -131,7 +139,7 @@
<ul class="nav navbar-nav navbar-right">
{% if 'tipue_search' in PLUGINS %}
<li><span>
- <form class="navbar-search" action="/search">
+ <form class="navbar-search" action="{{ SEARCH_URL | default('/search.html') }}">
<input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input" required>
</form></span>
</li>
@@ -158,7 +166,6 @@
{% endif %}
{% block breadcrumbs %}
{% endblock %}
-
{% block content %}
{% endblock %}
</div>
@@ -178,16 +185,16 @@
</div>
{% include 'includes/footer.html' %}
-<script src="{{ SITEURL }}/theme/js/jquery.min.js"></script>
+<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
-<script src="{{ SITEURL }}/theme/js/bootstrap.min.js"></script>
+<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
-<script src="{{ SITEURL }}/theme/js/respond.min.js"></script>
+<script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/respond.min.js"></script>
{% if BANNER %}
- <script src="{{ SITEURL }}/theme/js/bodypadding.js"></script>
+ <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/bodypadding.js"></script>
{% endif %}
{% include 'includes/github-js.html' %}
{% include 'includes/disqus_script.html' %}
diff --git a/pelican-bootstrap3/templates/includes/article_info.html b/pelican-bootstrap3/templates/includes/article_info.html
index ee107c9..e0c93b5 100644
--- a/pelican-bootstrap3/templates/includes/article_info.html
+++ b/pelican-bootstrap3/templates/includes/article_info.html
@@ -11,6 +11,14 @@
</span>
{% endif %}
{% endif %}
+
+ {% if SHOW_SERIES %}
+ {% if article.series %}
+ <span class="label label-default">Series</span>
+ Part {{ article.series.index}} of {{ article.series.name }}
+ {% endif %}
+ {% endif %}
+
{% if SHOW_ARTICLE_AUTHOR %}
{% if article.author %}
<span class="label label-default">By</span>
diff --git a/pelican-bootstrap3/templates/includes/cc-license.html b/pelican-bootstrap3/templates/includes/cc-license.html
index 73c7720..c64f265 100644
--- a/pelican-bootstrap3/templates/includes/cc-license.html
+++ b/pelican-bootstrap3/templates/includes/cc-license.html
@@ -37,6 +37,7 @@
attr_props={}) %}
{% if cc_name %}
{% set cc_name = cc_name|lower|replace("cc-","") %}
+ {% set cc_title_suffix = cc_name|replace("by", "")|replace("-nc","-NonCommercial")|replace("-nd","-NoDerivatives")|replace("-sa","-ShareAlike") %}
{% else %}
{% set cc_name = "by" %}
{% set cc_title_suffix = "" %}
@@ -52,7 +53,7 @@
{% 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/","//i.creativecommons.org/l/CCNAME/4.0/80x15.png") %}
+ {% set cc_title, cc_uri, cc_icon = ("Creative Commons AttributionCCSUFFIX 4.0 International License","http://creativecommons.org/licenses/CCNAME/4.0/","//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 %}
diff --git a/pelican-bootstrap3/templates/includes/comments.html b/pelican-bootstrap3/templates/includes/comments.html
index e49cfce..eade006 100644
--- a/pelican-bootstrap3/templates/includes/comments.html
+++ b/pelican-bootstrap3/templates/includes/comments.html
@@ -29,7 +29,7 @@
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
- dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
+ dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
diff --git a/pelican-bootstrap3/templates/includes/footer.html b/pelican-bootstrap3/templates/includes/footer.html
index 76e8ed4..ccd951b 100644
--- a/pelican-bootstrap3/templates/includes/footer.html
+++ b/pelican-bootstrap3/templates/includes/footer.html
@@ -8,15 +8,17 @@
{% 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>,
+ &middot; Powered by <a href="https://github.com/getpelican/pelican-themes/tree/master/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>
+ {% elif CUSTOM_LICENSE %}
+ <p><small>{{ CUSTOM_LICENSE }}</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
+</footer>
diff --git a/pelican-bootstrap3/templates/includes/github-js.html b/pelican-bootstrap3/templates/includes/github-js.html
index 85d9ae5..42c54de 100644
--- a/pelican-bootstrap3/templates/includes/github-js.html
+++ b/pelican-bootstrap3/templates/includes/github-js.html
@@ -17,7 +17,7 @@
if (!window.jXHR) {
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
- jxhr.src = '{{ SITEURL }}/theme/js/jXHR.js';
+ jxhr.src = '{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
@@ -30,6 +30,6 @@
});
});
</script>
- <script src="{{ SITEURL }}/theme/js/github.js" type="text/javascript"></script>
+ <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/js/github.js" type="text/javascript"></script>
<!-- End GitHub JS Code -->
-{% endif %} \ No newline at end of file
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/minify_tipuesearch.html b/pelican-bootstrap3/templates/includes/minify_tipuesearch.html
new file mode 100644
index 0000000..dff9542
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/minify_tipuesearch.html
@@ -0,0 +1,3 @@
+{% assets filters="rjsmin", output="tipuesearch/tipuesearch.packed.min.js", "tipuesearch/tipuesearch_set.js", "tipuesearch/tipuesearch.js" %}
+<script type="text/javascript" src="{{ SITEURL }}/{{ ASSET_URL }}"></script>
+{% endassets %}
diff --git a/pelican-bootstrap3/templates/includes/series.html b/pelican-bootstrap3/templates/includes/series.html
new file mode 100644
index 0000000..3998440
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/series.html
@@ -0,0 +1,22 @@
+{% if article.series %}
+<section class="well" id="related-posts">
+ {% set text = SERIES_TEXT|default('Part %(index)s of the %(name)s series') %}
+ <h4>{{ text|format(index=article.series.index, name=article.series.name) }}</h4>
+ {% if article.series.all_previous %}
+ <h5>Previous articles</h5>
+ <ul>
+ {% for article in article.series.all_previous %}
+ <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% if article.series.all_next %}
+ <h5>Next articles</h5>
+ <ul>
+ {% for article in article.series.all_next %}
+ <li><a href="{{ SITEURL }}/{{ article.url }}">{{ article.title }}</a></li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+</section>
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar-images.html b/pelican-bootstrap3/templates/includes/sidebar-images.html
new file mode 100644
index 0000000..59282ab
--- /dev/null
+++ b/pelican-bootstrap3/templates/includes/sidebar-images.html
@@ -0,0 +1,9 @@
+{% if SIDEBAR_IMAGES %}
+ <li class="list-group-item">
+ <ul class="list-group" id="links">
+ {% for image in SIDEBAR_IMAGES %}
+ <img width="100%" class="img-thumbnail" src="{{ image }}"/>
+ {% endfor %}
+ </ul>
+ </li>
+{% endif %}
diff --git a/pelican-bootstrap3/templates/includes/sidebar.html b/pelican-bootstrap3/templates/includes/sidebar.html
index db8d0a3..ea4134d 100644
--- a/pelican-bootstrap3/templates/includes/sidebar.html
+++ b/pelican-bootstrap3/templates/includes/sidebar.html
@@ -7,14 +7,18 @@
{% if 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 %}
- {% set name_sanitized = name|lower|replace('+','-plus')|replace(' ','-') %}
+ {% for s in SOCIAL %}
+ {% if s[2] %}
+ {% set name_sanitized = s[2]|lower|replace('+','-plus')|replace(' ','-') %}
+ {% else %}
+ {% set name_sanitized = s[0]|lower|replace('+','-plus')|replace(' ','-') %}
+ {% endif %}
{% if name_sanitized in ['flickr', 'spotify', 'stack-overflow', 'weibo'] %}
{% set iconattributes = '"fa fa-' ~ name_sanitized ~ ' fa-lg"' %}
{% else %}
{% set iconattributes = '"fa fa-' ~ name_sanitized ~ '-square fa-lg"' %}
{% endif %}
- <li class="list-group-item"><a href="{{ link }}"><i class={{ iconattributes }}></i> {{ name }}</a></li>
+ <li class="list-group-item"><a href="{{ s[1] }}"><i class={{ iconattributes }}></i> {{ s[0] }}</a></li>
{% endfor %}
</ul>
</li>
@@ -51,7 +55,7 @@
</li>
{% endif %}
- {% if DISPLAY_TAGS_ON_SIDEBAR %}
+ {% if 'tag_cloud' in PLUGINS and DISPLAY_TAGS_ON_SIDEBAR %}
{% if DISPLAY_TAGS_INLINE %}
{% set tags = tag_cloud | sort(attribute='0') %}
{% else %}
@@ -69,9 +73,34 @@
</ul>
</li>
{% endif %}
+
+ {% if DISPLAY_SERIES_ON_SIDEBAR %}
+ {% if article %}
+ {% 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 %}
+ <h5></i> Previous article</h5>
+ <a href="{{ SITEURL }}/{{ article.series.previous.url }}">{{ article.series.previous.title }}</a>
+ {% endif %}
+ </li>
+ <li class="list-group-item">
+ {% if article.series.next %}
+ <h5>Next article</h5>
+ <a href="{{ SITEURL }}/{{ article.series.next.url }}">{{ article.series.next.title }}</a>
+ {% endif %}
+ </li>
+ </ul>
+ </li>
+ {% endif%}
+ {% endif %}
+ {% endif %}
+
{% include 'includes/github.html' %}
{% include 'includes/twitter_timeline.html' %}
{% include 'includes/links.html' %}
+ {% include 'includes/sidebar-images.html' %}
</ul>
</section>
diff --git a/pelican-bootstrap3/templates/search.html b/pelican-bootstrap3/templates/search.html
index a194256..04e308b 100644
--- a/pelican-bootstrap3/templates/search.html
+++ b/pelican-bootstrap3/templates/search.html
@@ -6,11 +6,10 @@ Search - {{ super() }}
{% block scripts %}
{% if 'assets' in PLUGINS %}
- {% include '_includes/minify_tipuesearch.html' with context %}
+ {% include 'includes/minify_tipuesearch.html' with context %}
{% else %}
- <link href="{{ SITEURL }}/theme/tipuesearch/tipuesearch.css" rel="stylesheet">
- <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch_set.js"></script>
- <script type="text/javascript" src="{{ SITEURL }}/theme/tipuesearch/tipuesearch.min.js"></script>
+ <script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.js"></script>
+ <script type="text/javascript" src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script>
{% endif %}
<script>
$(document).ready(function() {