initial commit to seperate repo
This commit is contained in:
commit
8630e4db13
23669 changed files with 1067407 additions and 0 deletions
169
themes/zen/templates/arusahni_helper.tmpl
Normal file
169
themes/zen/templates/arusahni_helper.tmpl
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
## Override only the functions that differ from base or boopstrap/templates/base_helper.tmpl
|
||||
<%def name="html_headstart()">
|
||||
<!DOCTYPE html>
|
||||
<html
|
||||
\
|
||||
% if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']) or (comment_system == 'facebook'):
|
||||
prefix='\
|
||||
%if use_open_graph or (twitter_card and twitter_card['use_twitter_cards']):
|
||||
og: http://ogp.me/ns# \
|
||||
%endif
|
||||
%if use_open_graph:
|
||||
article: http://ogp.me/ns/article# \
|
||||
%endif
|
||||
%if comment_system == 'facebook':
|
||||
fb: http://ogp.me/ns/fb# \
|
||||
%endif
|
||||
'\
|
||||
%endif
|
||||
\
|
||||
% if is_rtl:
|
||||
dir="rtl" \
|
||||
% endif
|
||||
\
|
||||
lang="${lang}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
%if description:
|
||||
<meta name="description" content="${description}">
|
||||
%endif
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>${title|striphtml} | ${blog_title|striphtml}</title>
|
||||
|
||||
${html_stylesheets()}
|
||||
${html_feedlinks()}
|
||||
%if permalink:
|
||||
<link rel="canonical" href="${abs_link(permalink)}">
|
||||
%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
|
||||
|
||||
${mathjax_config}
|
||||
%if use_cdn:
|
||||
<!--[if lt IE 9]><script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||||
%else:
|
||||
<!--[if lt IE 9]><script src="/assets/js/html5.js"></script><![endif]-->
|
||||
%endif
|
||||
|
||||
${extra_head_data}
|
||||
</%def>
|
||||
|
||||
<%def name="html_stylesheets()">
|
||||
%if use_bundles:
|
||||
%if use_cdn:
|
||||
<link href='//fonts.googleapis.com/css?family=Bitter:400,400italic,700' rel='stylesheet' type='text/css'>
|
||||
<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:
|
||||
%if use_cdn:
|
||||
<link href='//fonts.googleapis.com/css?family=Bitter:400,400italic,700' rel='stylesheet' type='text/css'>
|
||||
%else:
|
||||
<link href="/assets/css/bitter.css" rel="stylesheet" type="text/css">
|
||||
%endif
|
||||
<link href="/assets/css/main.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/rst.css" rel="stylesheet" type="text/css">
|
||||
<link href="/assets/css/code.css" rel="stylesheet" type="text/css">
|
||||
%if has_custom_css:
|
||||
<link href="/assets/css/custom.css" rel="stylesheet" type="text/css">
|
||||
%endif
|
||||
%endif
|
||||
% if annotations and post and not post.meta('noannotations'):
|
||||
${notes.css()}
|
||||
% elif not annotations and post and post.meta('annotations'):
|
||||
${notes.css()}
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="late_load_js()">
|
||||
%if use_bundles:
|
||||
%if use_cdn:
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.1.0/jquery.timeago.min.js"></script>
|
||||
%else:
|
||||
<script src="/assets/js/all-nocdn.js" type="text/javascript"></script>
|
||||
%endif
|
||||
%else:
|
||||
%if use_cdn:
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.1.0/jquery.timeago.min.js"></script>
|
||||
%else:
|
||||
<script src="/assets/js/jquery-1.10.2.min.js" type="text/javascript"></script>
|
||||
<script src="/assets/js/jquery.timeago.js" type="text/javascript"></script>
|
||||
%endif
|
||||
%endif
|
||||
${social_buttons_code}
|
||||
</%def>
|
||||
|
||||
<%def name="html_feedlinks()">
|
||||
%if rss_link:
|
||||
${rss_link}
|
||||
%elif generate_rss:
|
||||
%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
|
||||
</%def>
|
||||
|
||||
<%def name="html_navigation_links()">
|
||||
%for url, text, icon in navigation_links[lang]:
|
||||
% if rel_link(permalink, url) == "#":
|
||||
<li><a href="${url}" title="${text}"><i class="${icon}"></i></a></li>
|
||||
%else:
|
||||
<li><a href="${url}" title="${text}"><i class="${icon}"></i></a></li>
|
||||
%endif
|
||||
%endfor
|
||||
</%def>
|
||||
|
||||
## Override only the functions that differ from base/templates/post_helper.tmpl
|
||||
<%def name="html_tags(post)">
|
||||
%if post.tags:
|
||||
<div itemprop="keywords" class="tags">
|
||||
<ul>
|
||||
${messages("Tags")} :
|
||||
%for tag in post.tags:
|
||||
<li><a class="tag p-category" href="${_link('tag', tag)}" rel="tag">${tag}</a></li>
|
||||
%endfor
|
||||
</ul>
|
||||
</div>
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
## Override only the functions that differ from base/templates/post_header.tmpl
|
||||
<%def name="html_title()">
|
||||
%if title and not post.meta('hidetitle'):
|
||||
<h1 class="p-name entry-title" itemprop="headline name">${title|h}</h1>
|
||||
%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):
|
||||
<a href="${post.permalink(langname)}" rel="alternate" hreflang="${langname}">
|
||||
${messages("LANGUAGE", langname)}</a>
|
||||
% endif
|
||||
% endfor
|
||||
% endif
|
||||
</%def>
|
||||
|
||||
<%def name="html_sourcelink()">
|
||||
% if show_sourcelink:
|
||||
|
|
||||
<a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a>
|
||||
% endif
|
||||
</%def>
|
||||
35
themes/zen/templates/base.tmpl
Normal file
35
themes/zen/templates/base.tmpl
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%namespace name="arusahni" file="arusahni_helper.tmpl" import="*" />
|
||||
<%namespace name="footer" file="base_footer.tmpl" import="*"/>
|
||||
<%namespace name="annotations" file="annotation_helper.tmpl"/>
|
||||
${set_locale(lang)}
|
||||
${arusahni.html_headstart()}
|
||||
<%block name="extra_head">
|
||||
### Leave this block alone.
|
||||
</%block>
|
||||
${template_hooks['extra_head']()}
|
||||
</head>
|
||||
<body>
|
||||
<section class="social">
|
||||
<ul>
|
||||
${arusahni.html_navigation_links()}
|
||||
</ul>
|
||||
</section>
|
||||
<section class="page-content">
|
||||
<div class="content" rel="main">
|
||||
<%block name="content"></%block>
|
||||
${footer.html_footer()}
|
||||
</div>
|
||||
</section>
|
||||
${body_end}
|
||||
${template_hooks['body_end']()}
|
||||
${arusahni.late_load_js()}
|
||||
<%block name="extra_js">
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('.timeago').timeago();
|
||||
});
|
||||
</script>
|
||||
</%block>
|
||||
</body>
|
||||
</html>
|
||||
34
themes/zen/templates/index.tmpl
Normal file
34
themes/zen/templates/index.tmpl
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%namespace name="arusahni" file="arusahni_helper.tmpl" import="*" />
|
||||
<%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="post">
|
||||
<h1 class="title"><a href="${post.permalink()}">${post.title()}</a></h1>
|
||||
<div class="meta">
|
||||
<div class="authordate">
|
||||
<time class="timeago" datetime="${post.date.isoformat()}">${post.formatted_date(date_format)}</time>
|
||||
</div>
|
||||
<div class="stats">
|
||||
% if not post.meta('nocomments'):
|
||||
${comments.comment_link(post.permalink(), post.base_path)}
|
||||
% endif
|
||||
</div>
|
||||
${arusahni.html_tags(post)}
|
||||
</div>
|
||||
<div class="body">
|
||||
%if index_teasers:
|
||||
${post.text(teaser_only=True)}
|
||||
%else:
|
||||
${post.text(teaser_only=False)}
|
||||
%endif
|
||||
</div>
|
||||
</div>
|
||||
% endfor
|
||||
${helper.html_pager()}
|
||||
${comments.comment_link_script()}
|
||||
${helper.mathjax_script(posts)}
|
||||
</%block>
|
||||
39
themes/zen/templates/post.tmpl
Normal file
39
themes/zen/templates/post.tmpl
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%namespace name="arusahni" file="arusahni_helper.tmpl" import="*" />
|
||||
<%namespace name="helper" file="post_helper.tmpl"/>
|
||||
<%namespace name="comments" file="comments_helper.tmpl"/>
|
||||
<%inherit file="base.tmpl"/>
|
||||
|
||||
<%block name="extra_head">
|
||||
${parent.extra_head()}
|
||||
% if post.meta('keywords'):
|
||||
<meta name="keywords" content="${post.meta('keywords')|h}">
|
||||
% endif
|
||||
<meta name="author" content="${post.author()}">
|
||||
${helper.open_graph_metadata(post)}
|
||||
${helper.twitter_card_information(post)}
|
||||
${helper.meta_translations(post)}
|
||||
</%block>
|
||||
|
||||
<%block name="content">
|
||||
<div class="post">
|
||||
${arusahni.html_title()}
|
||||
<div class="meta">
|
||||
<div class="authordate">
|
||||
<time class="timeago" datetime="${post.date.isoformat()}">${post.formatted_date(date_format)}</time>
|
||||
${arusahni.html_translations(post)}
|
||||
${arusahni.html_sourcelink()}
|
||||
</div>
|
||||
${arusahni.html_tags(post)}
|
||||
</div>
|
||||
<div class="body">
|
||||
${post.text()}
|
||||
</div>
|
||||
${helper.html_pager(post)}
|
||||
% if not post.meta('nocomments') and site_has_comments:
|
||||
${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)}
|
||||
% endif
|
||||
${helper.mathjax_script(post)}
|
||||
</div>
|
||||
${comments.comment_link_script()}
|
||||
</%block>
|
||||
37
themes/zen/templates/story.tmpl
Normal file
37
themes/zen/templates/story.tmpl
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%namespace name="arusahni" file="arusahni_helper.tmpl" import="*" />
|
||||
<%namespace name="helper" file="post_helper.tmpl"/>
|
||||
<%namespace name="comments" file="comments_helper.tmpl"/>
|
||||
<%inherit file="post.tmpl"/>
|
||||
|
||||
<%block name="extra_head">
|
||||
${parent.extra_head()}
|
||||
% if post.meta('keywords'):
|
||||
<meta name="keywords" content="${post.meta('keywords')|h}">
|
||||
% endif
|
||||
<meta name="author" content="${post.author()}">
|
||||
${helper.open_graph_metadata(post)}
|
||||
${helper.twitter_card_information(post)}
|
||||
${helper.meta_translations(post)}
|
||||
%if post.description():
|
||||
<meta name="description" itemprop="description" content="${post.description()}">
|
||||
%endif
|
||||
</%block>
|
||||
|
||||
<%block name="content">
|
||||
<article class="storypage" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||
<header>
|
||||
${arusahni.html_title()}
|
||||
${arusahni.html_translations(post)}
|
||||
</header>
|
||||
<div itemprop="articleBody text">
|
||||
${post.text()}
|
||||
</div>
|
||||
%if site_has_comments and enable_comments and not post.meta('nocomments'):
|
||||
<section class="comments">
|
||||
<h2>${messages("Comments")}</h2>
|
||||
${comments.comment_form(post.permalink(absolute=True), post.title(), post.base_path)}
|
||||
</section>
|
||||
%endif
|
||||
</article>
|
||||
</%block>
|
||||
Loading…
Add table
Add a link
Reference in a new issue