summaryrefslogtreecommitdiffstats
path: root/nikola/data/themes/base/templates
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2013-11-20 16:58:50 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2013-11-20 16:58:50 -0300
commitca94afc07df55cb7fc6fe3b4f3011877b7881195 (patch)
treed81e1f275aa77545f33740723f307a83dde2e0b4 /nikola/data/themes/base/templates
parentf794eee787e9cde54e6b8f53e45d69c9ddc9936a (diff)
Imported Upstream version 6.2.1upstream/6.2.1
Diffstat (limited to 'nikola/data/themes/base/templates')
-rw-r--r--nikola/data/themes/base/templates/annotation_helper.tmpl16
-rw-r--r--nikola/data/themes/base/templates/base.tmpl40
-rw-r--r--nikola/data/themes/base/templates/base_helper.tmpl90
-rw-r--r--nikola/data/themes/base/templates/comments_helper.tmpl49
-rw-r--r--nikola/data/themes/base/templates/crumbs.tmpl9
-rw-r--r--nikola/data/themes/base/templates/disqus_helper.tmpl58
-rw-r--r--nikola/data/themes/base/templates/facebook_helper.tmpl62
-rw-r--r--nikola/data/themes/base/templates/gallery.tmpl28
-rw-r--r--nikola/data/themes/base/templates/googleplus_helper.tmpl17
-rw-r--r--nikola/data/themes/base/templates/index.tmpl29
-rw-r--r--nikola/data/themes/base/templates/index_helper.tmpl23
-rw-r--r--nikola/data/themes/base/templates/intensedebate_helper.tmpl25
-rw-r--r--nikola/data/themes/base/templates/list.tmpl14
-rw-r--r--nikola/data/themes/base/templates/list_post.tmpl14
-rw-r--r--nikola/data/themes/base/templates/listing.tmpl17
-rw-r--r--nikola/data/themes/base/templates/livefyre_helper.tmpl37
-rw-r--r--nikola/data/themes/base/templates/moot_helper.tmpl13
-rw-r--r--nikola/data/themes/base/templates/mustache-comment-form.tmpl5
-rw-r--r--nikola/data/themes/base/templates/post.tmpl41
-rw-r--r--nikola/data/themes/base/templates/post_helper.tmpl75
-rw-r--r--nikola/data/themes/base/templates/post_list_directive.tmpl14
-rw-r--r--nikola/data/themes/base/templates/slides.tmpl22
-rw-r--r--nikola/data/themes/base/templates/story.tmpl16
-rw-r--r--nikola/data/themes/base/templates/tag.tmpl32
-rw-r--r--nikola/data/themes/base/templates/tags.tmpl25
25 files changed, 771 insertions, 0 deletions
diff --git a/nikola/data/themes/base/templates/annotation_helper.tmpl b/nikola/data/themes/base/templates/annotation_helper.tmpl
new file mode 100644
index 0000000..70077ab
--- /dev/null
+++ b/nikola/data/themes/base/templates/annotation_helper.tmpl
@@ -0,0 +1,16 @@
+<%def name="css()">
+ <link rel="stylesheet" href="http://assets.annotateit.org/annotator/v1.2.5/annotator.min.css">
+</%def>
+
+<%def name="code()">
+ <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script>
+ <script src="http://assets.annotateit.org/annotator/v1.2.7/annotator-full.js"></script>
+ <script>
+ jQuery(function ($) {
+ $('body').annotator().annotator('setupPlugins', {}, {
+ // Disable filter bar
+ Filter: false
+ });
+ });
+ </script>
+</%def>
diff --git a/nikola/data/themes/base/templates/base.tmpl b/nikola/data/themes/base/templates/base.tmpl
new file mode 100644
index 0000000..31c1747
--- /dev/null
+++ b/nikola/data/themes/base/templates/base.tmpl
@@ -0,0 +1,40 @@
+## -*- coding: utf-8 -*-
+<%namespace name="base" file="base_helper.tmpl" import="*"/>
+<%namespace name="annotations" file="annotation_helper.tmpl"/>
+${set_locale(lang)}
+<!DOCTYPE html>
+<html
+%if comment_system == 'facebook':
+xmlns:fb="http://ogp.me/ns/fb#"
+%endif
+lang="${lang}">
+<head>
+ ${base.html_head()}
+ <%block name="extra_head">
+ </%block>
+ ${extra_head_data}
+</head>
+<body>
+ <h1 id="blog-title">
+ <a href="${abs_link('/')}" title="${blog_title}" rel="home">${blog_title}</a>
+ </h1>
+ <%block name="belowtitle">
+ %if len(translations) > 1:
+ <small>
+ ${(messages("Also available in"))}:&nbsp;
+ ${base.html_translations()}
+ </small>
+ %endif
+ </%block>
+ <%block name="content"></%block>
+ <small>${content_footer}</small>
+ <!--Sidebar content-->
+ <ul class="unstyled">
+ <li>${license}
+ ${base.html_social()}
+ ${base.html_navigation_links()}
+ <li>${search_form}
+ </ul>
+ ${base.late_load_js()}
+ ${social_buttons_code}
+</body>
diff --git a/nikola/data/themes/base/templates/base_helper.tmpl b/nikola/data/themes/base/templates/base_helper.tmpl
new file mode 100644
index 0000000..ac1dea3
--- /dev/null
+++ b/nikola/data/themes/base/templates/base_helper.tmpl
@@ -0,0 +1,90 @@
+## -*- coding: utf-8 -*-
+<%def name="html_head()">
+ <meta charset="utf-8">
+ %if description:
+ <meta name="description" content="${description}">
+ %endif
+ <meta name="author" content="${blog_author}">
+ <title>${title|striphtml} | ${blog_title|striphtml}</title>
+ ${mathjax_config}
+ %if use_bundles:
+ %if use_cdn:
+ <link href="/assets/css/all.css" rel="stylesheet" type="text/css">
+ %else:
+ <link href="/assets/css/all-nocdn.css" rel="stylesheet" type="text/css">
+ %endif
+ %else:
+ <link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/code.css" rel="stylesheet" type="text/css">
+ <link href="/assets/css/theme.css" rel="stylesheet" type="text/css"/>
+ %if has_custom_css:
+ <link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
+ %endif
+ %endif
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
+ <![endif]-->
+ %if rss_link:
+ ${rss_link}
+ %else:
+ %if len(translations) > 1:
+ %for language in translations:
+ <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}">
+ %endfor
+ %else:
+ <link rel="alternate" type="application/rss+xml" title="RSS" href="${_link('rss', None)}">
+ %endif
+ %endif
+ %if favicons:
+ %for name, file, size in favicons:
+ <link rel="${name}" href="${file}" sizes="${size}"/>
+ %endfor
+ %endif
+ % if comment_system == 'facebook':
+ <meta property="fb:app_id" content="${comment_system_id}">
+ % endif
+</%def>
+
+<%def name="late_load_js()">
+</%def>
+
+<%def name="html_social()">
+ ${social_buttons_code}
+</%def>
+
+<!--FIXME: remove in v7 -->
+<%def name="html_sidebar_links()">
+ ${html_navigation_links()}
+</%def>
+
+<%def name="html_navigation_links()">
+ %for url, text in navigation_links[lang]:
+ % if isinstance(url, tuple):
+ <li> ${text}
+ <ul>
+ %for suburl, text in url:
+ % if rel_link(permalink, suburl) == "#":
+ <li class="active"><a href="${suburl}">${text}</a>
+ %else:
+ <li><a href="${suburl}">${text}</a>
+ %endif
+ %endfor
+ </ul>
+ % else:
+ % if rel_link(permalink, url) == "#":
+ <li class="active"><a href="${url}">${text}</a>
+ %else:
+ <li><a href="${url}">${text}</a>
+ %endif
+ % endif
+ %endfor
+</%def>
+
+
+<%def name="html_translations()">
+ %for langname in translations.keys():
+ %if langname != lang:
+ <a href="${_link("index", None, langname)}">${messages("LANGUAGE", langname)}</a>
+ %endif
+ %endfor
+</%def>
diff --git a/nikola/data/themes/base/templates/comments_helper.tmpl b/nikola/data/themes/base/templates/comments_helper.tmpl
new file mode 100644
index 0000000..e74a146
--- /dev/null
+++ b/nikola/data/themes/base/templates/comments_helper.tmpl
@@ -0,0 +1,49 @@
+## -*- coding: utf-8 -*-
+
+<%namespace name="disqus" file="disqus_helper.tmpl"/>
+<%namespace name="livefyre" file="livefyre_helper.tmpl"/>
+<%namespace name="intensedebate" file="intensedebate_helper.tmpl"/>
+<%namespace name="moot" file="moot_helper.tmpl"/>
+<%namespace name="googleplus" file="googleplus_helper.tmpl"/>
+
+<%def name="comment_form(url, title, identifier)">
+ %if comment_system == 'disqus':
+ ${disqus.comment_form(url, title, identifier)}
+ % elif comment_system == 'livefyre':
+ ${livefyre.comment_form(url, title, identifier)}
+ % elif comment_system == 'intensedebate':
+ ${intensedebate.comment_form(url, title, identifier)}
+ % elif comment_system == 'moot':
+ ${moot.comment_form(url, title, identifier)}
+ % elif comment_system == 'googleplus':
+ ${googleplus.comment_form(url, title, identifier)}
+ %endif
+</%def>
+
+<%def name="comment_link(link, identifier)">
+ %if comment_system == 'disqus':
+ ${disqus.comment_link(link, identifier)}
+ % elif comment_system == 'livefyre':
+ ${livefyre.comment_link(link, identifier)}
+ % elif comment_system == 'intensedebate':
+ ${intensedebate.comment_link(link, identifier)}
+ % elif comment_system == 'moot':
+ ${moot.comment_link(link, identifier)}
+ % elif comment_system == 'googleplus':
+ ${googleplus.comment_link(link, identifier)}
+ %endif
+</%def>
+
+<%def name="comment_link_script()">
+ %if comment_system == 'disqus':
+ ${disqus.comment_link_script()}
+ % elif comment_system == 'livefyre':
+ ${livefyre.comment_link_script()}
+ % elif comment_system == 'intensedebate':
+ ${intensedebate.comment_link_script()}
+ % elif comment_system == 'moot':
+ ${moot.comment_link_script()}
+ % elif comment_system == 'googleplus':
+ ${googleplus.comment_link_script()}
+ %endif
+</%def>
diff --git a/nikola/data/themes/base/templates/crumbs.tmpl b/nikola/data/themes/base/templates/crumbs.tmpl
new file mode 100644
index 0000000..c458cbe
--- /dev/null
+++ b/nikola/data/themes/base/templates/crumbs.tmpl
@@ -0,0 +1,9 @@
+## -*- coding: utf-8 -*-
+
+<%def name="bar(crumbs)">
+<ul class="breadcrumb">
+ % for link, text in crumbs:
+ <li><a href="${link}">${text}</a></li>
+ % endfor
+</ul>
+</%def>
diff --git a/nikola/data/themes/base/templates/disqus_helper.tmpl b/nikola/data/themes/base/templates/disqus_helper.tmpl
new file mode 100644
index 0000000..211f27a
--- /dev/null
+++ b/nikola/data/themes/base/templates/disqus_helper.tmpl
@@ -0,0 +1,58 @@
+## -*- coding: utf-8 -*-
+<%!
+ import json
+ translations = {
+ 'es': 'es_ES',
+ }
+%>
+
+<%def name="comment_form(url, title, identifier)">
+ %if comment_system_id:
+ <div id="disqus_thread"></div>
+ <script type="text/javascript">
+ var disqus_shortname ="${comment_system_id}";
+ %if url:
+ var disqus_url="${url}";
+ %endif
+ var disqus_title=${json.dumps(title)};
+ var disqus_identifier="${identifier}";
+ var disqus_config = function () {
+ this.language = "${translations.get(lang, lang)}";
+ };
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+ </script>
+ <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+ <a href="http://disqus.com" class="dsq-brlink">Comments powered by <span class="logo-disqus">Disqus</span></a>
+ %endif
+</%def>
+
+<%def name="comment_link(link, identifier)">
+ <p>
+ %if comment_system_id:
+ <a href="${link}#disqus_thread" data-disqus-identifier="${identifier}">Comments</a>
+ %endif
+</%def>
+
+
+<%def name="comment_link_script()">
+ %if comment_system_id:
+ <script type="text/javascript">var disqus_shortname="${comment_system_id}";(function(){var a=document.createElement("script");a.async=true;a.type="text/javascript";a.src="http://"+disqus_shortname+".disqus.com/count.js";(document.getElementsByTagName("HEAD")[0]||document.getElementsByTagName("BODY")[0]).appendChild(a)}());</script>
+ %endif
+</%def>
+
+## FIXME: remove aliases in v7
+<%def name="html_disqus(url, title, identifier)">
+ ${comment_form(url, title, identifier)}
+</%def>
+
+<%def name="html_disqus_link(link, identifier)">
+ ${comment_link(link, identifier)}
+</%def>
+
+<%def name="html_disqus_script()">
+ ${comment_link_script()}
+</%def>
diff --git a/nikola/data/themes/base/templates/facebook_helper.tmpl b/nikola/data/themes/base/templates/facebook_helper.tmpl
new file mode 100644
index 0000000..d6059a1
--- /dev/null
+++ b/nikola/data/themes/base/templates/facebook_helper.tmpl
@@ -0,0 +1,62 @@
+## -*- coding: utf-8 -*-
+<%def name="comment_form(url, title, identifier)">
+<div id="fb-root"></div>
+<script>
+ window.fbAsyncInit = function() {
+ // init the FB JS SDK
+ FB.init({
+ appId : '${comment_system_id}',
+ status : true,
+ xfbml : true
+ });
+
+ };
+
+ // Load the SDK asynchronously
+ (function(d, s, id){
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js";
+ fjs.parentNode.insertBefore(js, fjs);
+ }(document, 'script', 'facebook-jssdk'));
+</script>
+
+<div class="fb-comments" data-href="${url}" data-width="470"></div>
+</%def>
+
+<%def name="comment_link(link, identifier)">
+<span class="fb-comments-count" data-url="${link}">
+</%def>
+
+<%def name="comment_link_script()">
+<div id="fb-root"></div>
+<script>
+ // thank lxml for this
+ $('.fb-comments-count').each(function(i, obj) {
+ var url = obj.attributes['data-url'].value;
+ // change here if you dislike the default way of displaying
+ // this
+ obj.innerHTML = '<fb:comments-count href="' + url + '"></fb:comments-count> comments';
+ });
+
+ window.fbAsyncInit = function() {
+ // init the FB JS SDK
+ FB.init({
+ appId : '${comment_system_id}',
+ status : true,
+ xfbml : true
+ });
+
+ };
+
+ // Load the SDK asynchronously
+ (function(d, s, id){
+ var js, fjs = d.getElementsByTagName(s)[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement(s); js.id = id;
+ js.src = "//connect.facebook.net/en_US/all.js";
+ fjs.parentNode.insertBefore(js, fjs);
+ }(document, 'script', 'facebook-jssdk'));
+</script>
+</%def>
diff --git a/nikola/data/themes/base/templates/gallery.tmpl b/nikola/data/themes/base/templates/gallery.tmpl
new file mode 100644
index 0000000..be9cc6f
--- /dev/null
+++ b/nikola/data/themes/base/templates/gallery.tmpl
@@ -0,0 +1,28 @@
+## -*- coding: utf-8 -*-
+<%inherit file="base.tmpl"/>
+<%namespace name="comments" file="comments_helper.tmpl"/>
+<%namespace name="ui" file="crumbs.tmpl" import="bar"/>
+<%block name="sourcelink"></%block>
+
+<%block name="content">
+ ${ui.bar(crumbs)}
+ %if text:
+ <p>
+ ${text}
+ </p>
+ %endif
+ <ul>
+ % for folder in folders:
+ <li><a href="${folder}"><i class="icon-folder-open"></i>&nbsp;${folder}</a></li>
+ % endfor
+ </ul>
+ <ul class="thumbnails">
+ %for image in photo_array:
+ <li><a href="${image['url']}" class="thumbnail image-reference" title="${image['title']}">
+ <img src="${image['url_thumb']}" alt="${image['title']}" /></a>
+ %endfor
+ </ul>
+%if enable_comments:
+ ${comments.comment_form(None, permalink, title)}
+%endif
+</%block>
diff --git a/nikola/data/themes/base/templates/googleplus_helper.tmpl b/nikola/data/themes/base/templates/googleplus_helper.tmpl
new file mode 100644
index 0000000..5a5c4d7
--- /dev/null
+++ b/nikola/data/themes/base/templates/googleplus_helper.tmpl
@@ -0,0 +1,17 @@
+## -*- coding: utf-8 -*-
+<%def name="comment_form(url, title, identifier)">
+<script src="https://apis.google.com/js/plusone.js"></script>
+<div class="g-comments"
+ data-href="${url}"
+ data-first_party_property="BLOGGER"
+ data-view_type="FILTERED_POSTMOD">
+</div>
+</%def>
+
+<%def name="comment_link(link, identifier)">
+<div class="g-commentcount" data-href="${link}"></div>
+<script src="https://apis.google.com/js/plusone.js"></script>
+</%def>
+
+<%def name="comment_link_script()">
+</%def>
diff --git a/nikola/data/themes/base/templates/index.tmpl b/nikola/data/themes/base/templates/index.tmpl
new file mode 100644
index 0000000..6de79e2
--- /dev/null
+++ b/nikola/data/themes/base/templates/index.tmpl
@@ -0,0 +1,29 @@
+## -*- coding: utf-8 -*-
+<%namespace name="helper" file="index_helper.tmpl"/>
+<%namespace name="comments" file="comments_helper.tmpl"/>
+<%inherit file="base.tmpl"/>
+<%block name="content">
+ % for post in posts:
+ <div class="postbox h-entry">
+ <h1 class="p-name"><a href="${post.permalink()}" class="u-url">${post.title()}</a>
+ <small>&nbsp;&nbsp;
+ ${messages("Posted")}: <time class="published dt-published" datetime="${post.date.isoformat()}">${post.formatted_date(date_format)}</time>
+ </small></h1>
+ <hr>
+ %if index_teasers:
+ <div class="p-summary">
+ ${post.text(teaser_only=True)}
+ %else:
+ <div class="e-content">
+ ${post.text(teaser_only=False)}
+ %endif
+ </div>
+ % if not post.meta('nocomments'):
+ ${comments.comment_link(post.permalink(), post._base_path)}
+ % endif
+ </div>
+ % endfor
+ ${helper.html_pager()}
+ ${comments.comment_link_script()}
+ ${helper.mathjax_script(posts)}
+</%block>
diff --git a/nikola/data/themes/base/templates/index_helper.tmpl b/nikola/data/themes/base/templates/index_helper.tmpl
new file mode 100644
index 0000000..a914846
--- /dev/null
+++ b/nikola/data/themes/base/templates/index_helper.tmpl
@@ -0,0 +1,23 @@
+## -*- coding: utf-8 -*-
+<%def name="html_pager()">
+<div>
+<ul class="pager">
+ %if prevlink:
+ <li class="previous">
+ <a href="${prevlink}" rel="prev">&larr; ${messages("Newer posts")}</a>
+ </li>
+ %endif
+ %if nextlink:
+ <li class="next">
+ <a href="${nextlink}" rel="next">${messages("Older posts")} &rarr;</a>
+ </li>
+ %endif
+</ul>
+</div>
+</%def>
+
+<%def name="mathjax_script(posts)">
+ %if any(post.is_mathjax for post in posts):
+ <script src="/assets/js/mathjax.js" type="text/javascript"></script>
+ %endif
+</%def>
diff --git a/nikola/data/themes/base/templates/intensedebate_helper.tmpl b/nikola/data/themes/base/templates/intensedebate_helper.tmpl
new file mode 100644
index 0000000..6462f74
--- /dev/null
+++ b/nikola/data/themes/base/templates/intensedebate_helper.tmpl
@@ -0,0 +1,25 @@
+## -*- coding: utf-8 -*-
+<%def name="comment_form(url, title, identifier)">
+<script>
+var idcomments_acct = '${comment_system_id}';
+var idcomments_post_id = "${identifier}";
+var idcomments_post_url = "${url}";
+</script>
+<span id="IDCommentsPostTitle" style="display:none"></span>
+<script type='text/javascript' src='http://www.intensedebate.com/js/genericCommentWrapperV2.js'></script>
+</script>
+</%def>
+
+<%def name="comment_link(link, identifier)">
+<a href="{link}" onclick="this.href='${link}'; this.target='_self';"><span class='IDCommentsReplace' style='display:none'>${identifier}</span>
+<script>
+var idcomments_acct = '${comment_system_id}';
+var idcomments_post_id = "${identifier}";
+var idcomments_post_url = "${link}";
+</script>
+<script type="text/javascript" src="http://www.intensedebate.com/js/genericLinkWrapperV2.js"></script>
+</a>
+</%def>
+
+<%def name="comment_link_script()">
+</%def>
diff --git a/nikola/data/themes/base/templates/list.tmpl b/nikola/data/themes/base/templates/list.tmpl
new file mode 100644
index 0000000..a60b508
--- /dev/null
+++ b/nikola/data/themes/base/templates/list.tmpl
@@ -0,0 +1,14 @@
+## -*- coding: utf-8 -*-
+<%inherit file="base.tmpl"/>
+<%block name="content">
+ <!--Body content-->
+ <div class="postbox">
+ <h1>${title}</h1>
+ <ul class="unstyled">
+ % for text, link in items:
+ <li><a href="${link}">${text}</a>
+ % endfor
+ </ul>
+ </div>
+ <!--End of body content-->
+</%block>
diff --git a/nikola/data/themes/base/templates/list_post.tmpl b/nikola/data/themes/base/templates/list_post.tmpl
new file mode 100644
index 0000000..f0e159d
--- /dev/null
+++ b/nikola/data/themes/base/templates/list_post.tmpl
@@ -0,0 +1,14 @@
+## -*- coding: utf-8 -*-
+<%inherit file="base.tmpl"/>
+<%block name="content">
+ <!--Body content-->
+ <div class="postbox">
+ <h1>${title}</h1>
+ <ul class="unstyled">
+ % for post in posts:
+ <li><a href="${post.permalink()}">[${post.formatted_date(date_format)}] ${post.title()}</a>
+ % endfor
+ </ul>
+ </div>
+ <!--End of body content-->
+</%block>
diff --git a/nikola/data/themes/base/templates/listing.tmpl b/nikola/data/themes/base/templates/listing.tmpl
new file mode 100644
index 0000000..b6ca83f
--- /dev/null
+++ b/nikola/data/themes/base/templates/listing.tmpl
@@ -0,0 +1,17 @@
+## -*- coding: utf-8 -*-
+<%inherit file="base.tmpl"/>
+<%namespace name="ui" file="crumbs.tmpl" import="bar"/>
+<%block name="content">
+${ui.bar(crumbs)}
+<ul class="unstyled">
+% for name in folders:
+ <li><a href="${name}"><i class="icon-folder-open"></i> ${name}</a>
+% endfor
+% for name in files:
+ <li><a href="${name}.html"><i class="icon-file"></i> ${name}</a>
+% endfor
+</ul>
+% if code:
+ ${code}
+% endif
+</%block>
diff --git a/nikola/data/themes/base/templates/livefyre_helper.tmpl b/nikola/data/themes/base/templates/livefyre_helper.tmpl
new file mode 100644
index 0000000..6916459
--- /dev/null
+++ b/nikola/data/themes/base/templates/livefyre_helper.tmpl
@@ -0,0 +1,37 @@
+## -*- coding: utf-8 -*-
+<%def name="comment_form(url, title, identifier)">
+<div id="livefyre-comments"></div>
+<script type="text/javascript" src="http://zor.livefyre.com/wjs/v3.0/javascripts/livefyre.js"></script>
+<script type="text/javascript">
+(function () {
+ var articleId = "${identifier}";
+ fyre.conv.load({}, [{
+ el: 'livefyre-comments',
+ network: "livefyre.com",
+ siteId: "${comment_system_id}",
+ articleId: articleId,
+ signed: false,
+ collectionMeta: {
+ articleId: articleId,
+ url: fyre.conv.load.makeCollectionUrl(),
+ }
+ }], function() {});
+}());
+</script>
+</%def>
+
+<%def name="comment_link(link, identifier)">
+ <p>
+ <a href="${link}">
+ <span class="livefyre-commentcount" data-lf-site-id="${comment_system_id}" data-lf-article-id="${identifier}">
+ 0 Comments
+ </span></a>
+</%def>
+
+
+<%def name="comment_link_script()">
+<script
+ type="text/javascript"
+ src="http://zor.livefyre.com/wjs/v1.0/javascripts/CommentCount.js">
+</script>
+</%def>
diff --git a/nikola/data/themes/base/templates/moot_helper.tmpl b/nikola/data/themes/base/templates/moot_helper.tmpl
new file mode 100644
index 0000000..951553e
--- /dev/null
+++ b/nikola/data/themes/base/templates/moot_helper.tmpl
@@ -0,0 +1,13 @@
+## -*- coding: utf-8 -*-
+
+<%def name="comment_form(url, title, identifier)">
+ <a class="moot" href="https://moot.it/i/${comment_system_id}/${identifier}">${comment_system_id} forums</a>
+</%def>
+
+<%def name="comment_link(link, identifier)">
+</%def>
+
+
+<%def name="comment_link_script()">
+<script src="https://cdn.moot.it/1/moot.min.js"></script>
+</%def>
diff --git a/nikola/data/themes/base/templates/mustache-comment-form.tmpl b/nikola/data/themes/base/templates/mustache-comment-form.tmpl
new file mode 100644
index 0000000..593d0aa
--- /dev/null
+++ b/nikola/data/themes/base/templates/mustache-comment-form.tmpl
@@ -0,0 +1,5 @@
+## -*- coding: utf-8 -*-
+<%namespace name="comments" file="comments_helper.tmpl"/>
+% if not post.meta('nocomments'):
+ ${comments.comment_form(post.permalink(absolute=True), post.title(), post.base_path)}
+% endif
diff --git a/nikola/data/themes/base/templates/post.tmpl b/nikola/data/themes/base/templates/post.tmpl
new file mode 100644
index 0000000..fd6316d
--- /dev/null
+++ b/nikola/data/themes/base/templates/post.tmpl
@@ -0,0 +1,41 @@
+## -*- coding: utf-8 -*-
+<%namespace name="helper" file="post_helper.tmpl"/>
+<%namespace name="comments" file="comments_helper.tmpl"/>
+<%inherit file="base.tmpl"/>
+<%block name="extra_head">
+${helper.twitter_card_information(post)}
+% if post.meta('keywords'):
+ <meta name="keywords" content="${post.meta('keywords')|h}">
+% endif
+</%block>
+<%block name="content">
+ <div class="postbox">
+ <div class="h-entry" itemscope="itemscope" itemtype="http://schema.org/Article">
+ ${helper.html_title()}
+ <hr>
+ <small>
+ ${messages("Posted")}: <time class="published dt-published" datetime="${post.date.isoformat()}" itemprop="datePublished">${post.formatted_date(date_format)}</time>
+ ${helper.html_translations(post)}
+ ${helper.html_tags(post)}
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ <%block name="sourcelink">
+ % if not post.meta('password'):
+ <a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a>
+ % endif
+ </%block>
+ </small>
+ <hr>
+ <div class="e-content" itemprop="articleBody text">
+ ${post.text()}
+ </div>
+ %if post.description():
+ <meta content="${post.description()}" itemprop="description">
+ %endif
+ </div>
+ ${helper.html_pager(post)}
+ % if not post.meta('nocomments'):
+ ${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)}
+ % endif
+ ${helper.mathjax_script(post)}
+ </div>
+</%block>
diff --git a/nikola/data/themes/base/templates/post_helper.tmpl b/nikola/data/themes/base/templates/post_helper.tmpl
new file mode 100644
index 0000000..f6b0535
--- /dev/null
+++ b/nikola/data/themes/base/templates/post_helper.tmpl
@@ -0,0 +1,75 @@
+## -*- coding: utf-8 -*-
+<%def name="html_title()">
+ <h1 class="p-name" itemprop="headline name">${title|h}</h1>
+ % if link:
+ <p><a href='${link}'>${messages("Original site")}</a></p>
+ % endif
+</%def>
+
+
+<%def name="html_translations(post)">
+ %if len(translations) > 1:
+ %for langname in translations.keys():
+ %if langname != lang and post.is_translation_available(langname):
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ <a href="${post.permalink(langname)}">${messages("Read in English", langname)}</a>
+ %endif
+ %endfor
+ %endif
+</%def>
+
+
+<%def name="html_tags(post)">
+ %if post.tags:
+ &nbsp;&nbsp;|&nbsp;&nbsp;${messages("More posts about")}
+ <span itemprop="keywords">
+ %for tag in post.tags:
+ <a class="tag p-category" href="${_link('tag', tag)}"><span class="badge badge-info">${tag}</span></a>
+ %endfor
+ </span>
+ %endif
+</%def>
+
+<%def name="html_pager(post)">
+ <ul class="pager">
+ %if post.prev_post:
+ <li class="previous">
+ <a href="${post.prev_post.permalink()}" rel="prev">&larr; ${messages("Previous post")}</a>
+ </li>
+ %endif
+ %if post.next_post:
+ <li class="next">
+ <a href="${post.next_post.permalink()}" rel="next">${messages("Next post")} &rarr;</a>
+ </li>
+ %endif
+ </ul>
+</%def>
+
+<%def name="twitter_card_information(post)">
+ %if twitter_card and twitter_card['use_twitter_cards']:
+ <meta name="twitter:card" content="${twitter_card.get('card', 'summary')|h}">
+ <meta name="og:url" content="${post.permalink(absolute=True)}">
+ %if 'site:id' in twitter_card:
+ <meta name="twitter:site:id" content="${twitter_card['site:id']}">
+ %elif 'site' in twitter_card:
+ <meta name="twitter:site" content="${twitter_card['site']}">
+ %endif
+ %if 'creator:id' in twitter_card:
+ <meta name="twitter:creator:id" content="${twitter_card['creator:id']}">
+ %elif 'creator' in twitter_card:
+ <meta name="twitter:creator" content="${twitter_card['creator']}">
+ %endif
+ <meta name="og:title" content="${post.title()[:70]|h}">
+ %if post.description():
+ <meta name="og:description" content="${post.description()[:200]|h}">
+ %else:
+ <meta name="og:description" content="${post.text(strip_html=True)[:200]|h}">
+ %endif
+ %endif
+</%def>
+
+<%def name="mathjax_script(post)">
+ %if post.is_mathjax:
+ <script src="/assets/js/mathjax.js"></script>
+ %endif
+</%def>
diff --git a/nikola/data/themes/base/templates/post_list_directive.tmpl b/nikola/data/themes/base/templates/post_list_directive.tmpl
new file mode 100644
index 0000000..3345ae4
--- /dev/null
+++ b/nikola/data/themes/base/templates/post_list_directive.tmpl
@@ -0,0 +1,14 @@
+## -*- coding: utf-8 -*-
+<!-- Begin post-list ${post_list_id} -->
+<div id="${post_list_id}" class="post-list">
+ <ul class="post-list">
+ % for post in posts:
+ <li class="post-list-item">
+ ${post.formatted_date(date_format)}
+ &nbsp;
+ <a href="${post.permalink(lang)}">${post.title(lang)}</a>
+ </li>
+ % endfor
+ </ul>
+</div>
+<!-- End post-list ${post_list_id} -->
diff --git a/nikola/data/themes/base/templates/slides.tmpl b/nikola/data/themes/base/templates/slides.tmpl
new file mode 100644
index 0000000..14983ad
--- /dev/null
+++ b/nikola/data/themes/base/templates/slides.tmpl
@@ -0,0 +1,22 @@
+<div id="${carousel_id}" class="carousel slide">
+ <ol class="carousel-indicators">
+ % for i in range(len(content)):
+ % if i == 0:
+ <li data-target="#${carousel_id}" data-slide-to="${i}" class="active"></li>
+ % else:
+ <li data-target="#${carousel_id}" data-slide-to="${i}"></li>
+ % endif
+ % endfor
+ </ol>
+ <div class="carousel-inner">
+ % for i, image in enumerate(content):
+ % if i == 0:
+ <div class="item active"><img src="${image}" alt="" style="margin: 0 auto 0 auto;"></div>
+ % else:
+ <div class="item"><img src="${image}" alt="" style="margin: 0 auto 0 auto;"></div>
+ % endif
+ % endfor
+ </div>
+ <a class="left carousel-control" href="#${carousel_id}" data-slide="prev">&lsaquo;</a>
+ <a class="right carousel-control" href="#${carousel_id}" data-slide="next">&rsaquo;</a>
+</div>
diff --git a/nikola/data/themes/base/templates/story.tmpl b/nikola/data/themes/base/templates/story.tmpl
new file mode 100644
index 0000000..7406f05
--- /dev/null
+++ b/nikola/data/themes/base/templates/story.tmpl
@@ -0,0 +1,16 @@
+## -*- coding: utf-8 -*-
+<%inherit file="post.tmpl"/>
+<%namespace name="helper" file="post_helper.tmpl"/>
+<%namespace name="comments" file="comments_helper.tmpl"/>
+<%block name="extra_head">
+${helper.twitter_card_information(post)}
+</%block>
+<%block name="content">
+%if title and not post.meta('hidetitle'):
+ <h1>${title}</h1>
+%endif
+ ${post.text()}
+%if enable_comments and not post.meta('nocomments'):
+ ${comments.comment_form(post.permalink(absolute=True), post.title(), post.base_path)}
+%endif
+</%block>
diff --git a/nikola/data/themes/base/templates/tag.tmpl b/nikola/data/themes/base/templates/tag.tmpl
new file mode 100644
index 0000000..2ca9db4
--- /dev/null
+++ b/nikola/data/themes/base/templates/tag.tmpl
@@ -0,0 +1,32 @@
+## -*- coding: utf-8 -*-
+<%inherit file="list_post.tmpl"/>
+<%block name="extra_head">
+ %if len(translations) > 1:
+ %for language in translations:
+ <link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for ${kind} ${tag} (${language})" href="${_link(kind + "_rss", tag, language)}">
+ %endfor
+ %else:
+ <link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for ${kind} ${tag}" href="${_link(kind + "_rss", tag)}">
+ %endif
+</%block>
+
+<%block name="content">
+ <!--Body content-->
+ <div class="postbox">
+ <h1>${title}</h1>
+ %if len(translations) > 1:
+ %for language in translations:
+ <a href="${_link(kind + "_rss", tag, language)}">RSS (${language})</a>&nbsp;
+ %endfor
+ %else:
+ <a href="${_link(kind + "_rss", tag)}">RSS</a>
+ %endif
+ <br>
+ <ul class="unstyled">
+ % for post in posts:
+ <li><a href="${post.permalink()}">[${post.formatted_date(date_format)}] ${post.title()}</a>
+ % endfor
+ </ul>
+ </div>
+ <!--End of body content-->
+</%block>
diff --git a/nikola/data/themes/base/templates/tags.tmpl b/nikola/data/themes/base/templates/tags.tmpl
new file mode 100644
index 0000000..6c8c5e9
--- /dev/null
+++ b/nikola/data/themes/base/templates/tags.tmpl
@@ -0,0 +1,25 @@
+## -*- coding: utf-8 -*-
+<%inherit file="base.tmpl"/>
+<%block name="content">
+ <h1>${title}</h1>
+ % if cat_items:
+ <h2>${messages("Categories")}</h2>
+ <ul class="unstyled bricks">
+ % for text, link in cat_items:
+ % if text:
+ <li><a class="reference" href="${link}">${text}</a></li>
+ % endif
+ % endfor
+ </ul>
+ % if items:
+ <h2>${messages("Tags")}</h2>
+ % endif
+ %endif
+ % if items:
+ <ul class="unstyled bricks">
+ % for text, link in items:
+ <li><a class="reference" href="${link}">${text}</a></li>
+ % endfor
+ </ul>
+ % endif
+</%block>