reorg coil gen posts + new theme

This commit is contained in:
Don Harper 2015-09-23 22:26:49 -05:00
parent 650f7ceb04
commit ad3bcc971e
79 changed files with 14597 additions and 25 deletions

View file

@ -0,0 +1,118 @@
{# -*- coding: utf-8 -*- #}
{% import 'base_helper.tmpl' as base with context %}
{% import 'annotation_helper.tmpl' as notes with context %}
{{ set_locale(lang) }}
{{ base.html_headstart() }}
{% block extra_head %}
{# Leave this block alone. #}
{% endblock %}
{{ template_hooks['extra_head']() }}
</head>
<body>
<a href="#content" class="sr-only sr-only-focusable">{{ messages("Skip to main content") }}</a>
<!-- Menubar -->
<nav class="navbar {% if header_color %}navbar-{{ header_color }}{% endif %} header-panel shadow-z-3" role="navigation">
<div class="container-fluid">
<div class="row">
<div class="col-xs-3">
{% if search_form %}
{{ search_form }}
{% endif %}
<h1 class="title-blog">
<a href="{{ abs_link(_link("root", None, lang)) }}">
{% if logo_url %}
<img src="{{ logo_url }}" alt="{{ blog_title }}" id="logo">
{% endif %}
{% if show_blog_title %}
<span id="blog-title">{{ blog_title }}</span>
{% endif %}
</a>
</h1>
</div>
</div>
</div><!-- /.container-fluid -->
</nav>
<div class="container-fluid main" id="content" role="main">
<div class="row">
<nav class="col-xs-3 menu">
<ul>
{{ base.html_navigation_links() }}
{{ template_hooks['menu']() }}
</ul>
<ul class="nav navbar-nav">
{% block belowtitle %}
{% if translations|length > 1 %}
<li>{{ base.html_translations() }}</li>
{% endif %}
{% endblock %}
{{ template_hooks['menu_alt']() }}
</ul>
</nav>
{{ template_hooks['page_header']() }}
<div class="posts-material col-xs-9">
<div class="col-xs-12 col-md-11 content-material">
{% block content %}{% endblock %}
</div>
</div>
</div>
<button class="btn btn-fab btn-raised btn-material-green btn-footer" data-toggle="modal" data-target="#footer-dialog">
<i class="mdi-communication-message"></i>
</button>
<div id="footer-dialog" class="modal fade" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
{% if biography %}
<h4 class="modal-title">{{ blog_author }}</h4>
<div>
{{ biography }}
</div>
<hr />
{% else %}
<h4 class="modal-title">{{ blog_title }} credits</h4>
{% endif %}
</div>
<div class="modal-body">
{{ content_footer }}
{{ template_hooks['page_footer']() }}
</div>
<div class="modal-footer">
<button class="btn btn-primary" data-dismiss="modal">Ok</button>
</div>
</div>
</div>
</div>
<div class="source-button">
{% if show_sourcelink %}
{% block sourcelink %}{% endblock %}
{% endif %}
</div>
{% if social_links %}
<div class="kc_fab_wrapper" ></div>
{% endif %}
</div>
{{ base.late_load_js() }}
<script>$('a.image-reference:not(.islink) img:not(.islink)').parent().colorbox({rel:"gal",maxWidth:"100%",maxHeight:"100%",scalePhotos:true});</script>
<!-- fancy dates -->
<script>
moment.locale("{{ momentjs_locales[lang] }}");
fancydates({{ date_fanciness }}, {{ js_date_format }});
</script>
<!-- end fancy dates -->
{% block extra_js %}{% endblock %}
{% if annotations and post and not post.meta('noannotations') %}
{{ notes.code() }}
{% elif not annotations and post and post.meta('annotations') %}
{{ notes.code() }}
{% endif %}
{{ body_end }}
{{ template_hooks['body_end']() }}
</body>
</html>

View file

@ -0,0 +1,228 @@
{# -*- coding: utf-8 -*- #}
{% import 'annotation_helper.tmpl' as notes with context %}
{% macro 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, initial-scale=1">
<title>{{ title|e }} | {{ blog_title|e }}</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 %}
{% if prevlink %}
<link rel="prev" href="{{ prevlink }}" type="text/html">
{% endif %}
{% if nextlink %}
<link rel="next" href="{{ nextlink }}" type="text/html">
{% endif %}
{{ mathjax_config }}
{% if use_cdn %}
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{% else %}
<!--[if lt IE 9]>
<script src="{{ url_replacer(permalink, '/assets/js/html5shiv.min.js', lang) }}"></script>
<script src="{{ url_replacer(permalink, '/assets/js/respond.min.js', lang) }}"></script>
<![endif]-->
{% endif %}
{{ extra_head_data }}
{% endmacro %}
{% macro theme_color() %}
{% if theme_color %}
{{ theme_color }}
{% else %}
'default'
{% endif %}
{% endmacro %}
{% macro late_load_js() %}
{% if use_bundles %}
{% if use_cdn %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="/assets/js/all.js"></script>
{% else %}
<script src="/assets/js/all-nocdn.js"></script>
{% endif %}
{% else %}
{% if use_cdn %}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
{% else %}
<script src="/assets/js/jquery.min.js"></script>
<script src="/assets/js/bootstrap.min.js"></script>
{% endif %}
<script src="/assets/js/kc.fab.js"></script>
<script src="/assets/js/moment-with-locales.min.js"></script>
<script src="/assets/js/fancydates.js"></script>
<script src="/assets/js/ripples.min.js"></script>
<script src="/assets/js/material.min.js"></script>
<script src="/assets/js/jquery.colorbox-min.js"></script>
{% endif %}
{% if colorbox_locales[lang] %}
<script src="/assets/js/colorbox-i18n/jquery.colorbox-{{ colorbox_locales[lang] }}.js"></script>
{% endif %}
{{ social_buttons_code }}
<script>
{% if social_links %}
var links = [
{% for item in social_links %}
{
{% for k,v in item.iteritems() %}
"{{ k }}": "{{ v }}",
{% endfor %}
},
{% endfor %}
];
{% endif %}
$(document).ready(function() {
// This command is used to initialize some elements and make them work properly
$.material.init();
{% if social_links %}
$('.kc_fab_wrapper').kc_fab(links);
{% endif %}
});
$(window).on("resize", function() {
$("html, body").height($(window).height());
$(".main, .menu").height($(window).height() - $(".header-panel").outerHeight() - 76 ); // footer margin: $("footer.footer").outerHeight()
$(".posts-material").height($(window).height());
}).trigger("resize");
</script>
{% endmacro %}
{% macro html_stylesheets() %}
{% if use_bundles %}
{% if use_cdn %}
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.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="//maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
{% else %}
<link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/font-awesome.min.css" rel="stylesheet" type="text/css">
{% endif %}
<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/colorbox.css" rel="stylesheet" type="text/css">
<link href="/assets/css/roboto.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/material.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/ripples.min.css" rel="stylesheet" type="text/css">
<link href="/assets/css/kc.fab.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 annotations and post and not post.meta('noannotations') %}
{{ notes.css() }}
{% elif not annotations and post and post.meta('annotations') %}
{{ notes.css() }}
{% endif %}
{% endmacro %}
{% macro html_navigation_links() %}
{% for url, text in navigation_links[lang] %}
{% if isinstance(url, tuple) %}
<li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ text }}<b class="caret"></b></a>
<ul class="dropdown-menu">
{% for suburl, text in url %}
{% if rel_link(permalink, suburl) == "#" %}
<li class="active"><a href="{{ permalink }}">{{ text }}</a></li>
{% else %}
<li><a href="{{ suburl }}">{{ text }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% else %}
{% if rel_link(permalink, url) == "#" %}
<li class="withripple active"><a href="{{ permalink }}">{{ text }}</a></li>
{% else %}
<li class="withripple"><a href="{{ url }}">{{ text }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
{% endmacro %}
{% macro html_feedlinks() %}
{% if rss_link %}
{{ rss_link }}
{% elif generate_rss %}
{% if translations|length > 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 generate_atom %}
{% if translations|length > 1 %}
{% for language in translations %}
<link rel="alternate" type="application/atom+xml" title="Atom ({{ language }})" href="{{ _link('index_atom', None, language) }}">
{% endfor %}
{% else %}
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ _link('index_atom', None) }}">
{% endif %}
{% endif %}
{% endmacro %}
{% macro html_translations() %}
{% for langname in translations.keys() %}
{% if langname != lang %}
<li><a href="{{ abs_link(_link("root", None, langname)) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></li>
{% endif %}
{% endfor %}
{% endmacro %}

View file

@ -0,0 +1,95 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% import 'comments_helper.tmpl' as comments with context %}
{% import 'crumbs.tmpl' as ui with context %}
{% block sourcelink %}{% endblock %}
{% block content %}
<div class="page">
{{ ui.bar(crumbs) }}
{% if title %}
<h1>{{ title|e }}</h1>
{% endif %}
{% if post %}
<p>
{{ post.text() }}
</p>
{% endif %}
{% if folders %}
<ul>
{% for folder, ftitle in folders %}
<li><a href="{{ folder }}"><i class="glyphicon glyphicon-folder-open"></i>&nbsp;{{ ftitle }}</a></li>
{% endfor %}
</ul>
{% endif %}
<div id="gallery_container"></div>
{% if photo_array %}
<noscript>
<ul class="thumbnails">
{% for image in photo_array %}
<li><a href="{{ image['url'] }}" class="thumbnail image-reference img-responsive" title="{{ image['title'] }}">
<img src="{{ image['url_thumb'] }}" alt="{{ image['title'] }}" /></a>
{% endfor %}
</ul>
</noscript>
{% endif %}
</div>
{% if site_has_comments and enable_comments %}
{{ comments.comment_form(None, permalink, title) }}
{% endif %}
{% endblock %}
{% block extra_head %}
{{ super() }}
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<style type="text/css">
.image-block {
display: inline-block;
}
.flowr_row {
width: 100%;
}
</style>
{% endblock %}
{% block extra_js %}
<script src="/assets/js/flowr.plugin.js"></script>
<script>
jsonContent = {{ photo_array_json }};
$("#gallery_container").flowr({
data : jsonContent,
height : {{ thumbnail_size }}*.6,
padding: 15,
rows: -1,
render : function(params) {
// Just return a div, string or a dom object, anything works fine
img = $("<img />").attr({
'src': params.itemData.url_thumb,
'width' : params.width,
'height' : params.height
}).css('max-width', '100%');
link = $( "<a></a>").attr({
'href': params.itemData.url,
'class': 'image-reference'
});
div = $("<div />").addClass('image-block shadow-z-3').attr({
'title': params.itemData.title,
'data-toggle': "tooltip",
});
link.append(img);
div.append(link);
div.hover(div.tooltip());
return div;
},
itemWidth : function(data) { return data.size.w; },
itemHeight : function(data) { return data.size.h; },
complete : function(params) {
if( jsonContent.length > params.renderedItems ) {
nextRenderList = jsonContent.slice( params.renderedItems );
}
}
});
$("a.image-reference").colorbox({rel:"gal", maxWidth:"100%",maxHeight:"100%",scalePhotos:true});
</script>
{% endblock %}

View file

@ -0,0 +1,51 @@
{# -*- coding: utf-8 -*- #}
{% import 'index_helper.tmpl' as helper with context %}
{% import 'comments_helper.tmpl' as comments with context %}
{% extends 'base.tmpl' %}
{% block extra_head %}
{{ super() }}
{% if posts and (permalink == '/' or permalink == '/' + index_file) %}
<link rel="prefetch" href="{{ posts[0].permalink() }}" type="text/html">
{% endif %}
{% endblock %}
{% block content %}
<div class="postindex well post-material ">
{% for post in posts %}
<article class="h-entry post-{{ post.meta('type') }}">
<header>
<h1 class="p-name entry-title header"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1>
<div class="metadata">
<span class="byline author vcard">
{% if author_avatar %}
<img class="img-circle" src="{{ author_avatar }}" alt="icon"/>
{% else %}
<i class="mdi-action-face-unlock"></i>
{% endif %}
{{ post.author() }}
</span>
<span class="dateline"><a href="{{ post.permalink() }}" rel="bookmark">
<i class="mdi-device-access-time"></i><time class="published dt-published" datetime="{{ post.date.isoformat() }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></a></span>
{% if not post.meta('nocomments') and site_has_comments %}
<span class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }}</span>
{% endif %}
</div>
<hr />
</header>
{% if index_teasers %}
<div class="p-summary entry-summary">
{{ post.text(teaser_only=True) }}
{% else %}
<div class="e-content entry-content">
{{ post.text(teaser_only=False) }}
{% endif %}
</div>
</article>
{% endfor %}
</div>
{{ helper.html_pager() }}
{{ comments.comment_link_script() }}
{{ helper.mathjax_script(posts) }}
{% endblock %}

View file

@ -0,0 +1,23 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% block content %}
<article class="listpage">
<header>
<h1>{{ title }}</h1>
<hr />
</header>
{% if items %}
<ul class="postlist">
{% for text, link, count in items %}
<li><a href="{{ link }}"><i class="mdi-action-done"></i>{{ text }}</a>
{% if count %}
({{ count }})
{% endif %}
{% endfor %}
</ul>
{% else %}
<p>{{ messages("Nothing found.") }}</p>
{% endif %}
</article>
{% endblock %}

View file

@ -0,0 +1,32 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% block content %}
<article class="listpage">
<header>
<h1>{{ title }}</h1>
</header>
{% if posts %}
<div class="postlist list-group">
{% for post in posts %}
<div class="list-group-item">
<div class="row-action-primary">
<i class="mdi-content-create"></i>
</div>
<div class="row-content">
<div class="least-content">
<time class="listdate" datetime="{{ post.date.isoformat() }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></div>
<h4 class="list-group-item-heading">
<a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}</a>
</h4>
<p class="list-group-item-text">{{ post.description()|e }}</p>
</div>
</div>
<div class="list-group-separator"></div>
{% endfor %}
</div>
{% else %}
<p>{{ messages("No posts found.") }}</p>
{% endif %}
</article>
{% endblock %}

View file

@ -0,0 +1,28 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% import 'crumbs.tmpl' as ui with context %}
{% block content %}
{{ ui.bar(crumbs) }}
{% if folders or files %}
<ul class="list-unstyled">
{% for name in folders %}
<li><a href="{{ name }}"><i class="glyphicon glyphicon-folder-open"></i> {{ name }}</a>
{% endfor %}
{% for name in files %}
<li><a href="{{ name }}.html"><i class="glyphicon glyphicon-file"></i> {{ name }}</a>
{% endfor %}
</ul>
{% endif %}
{% if code %}
{{ code }}
{% endif %}
{% endblock %}
{% block sourcelink %}
{% if source_link %}
<a class="btn btn-fab btn-raised btn-material-indigo" target="_blank" href="{{ source_link }}" title="{{ messages("Source") }}">
<i class="mdi-file-cloud-download"></i>
</a>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,61 @@
{# -*- coding: utf-8 -*- #}
{% import 'post_helper.tmpl' as helper with context %}
{% import 'post_header.tmpl' as pheader with context %}
{% import 'comments_helper.tmpl' as comments with context %}
{% extends 'base.tmpl' %}
{% block extra_head %}
{{ super() }}
{% if post.meta('keywords') %}
<meta name="keywords" content="{{ post.meta('keywords')|e }}">
{% endif %}
{% if post.description() %}
<meta name="description" itemprop="description" content="{{ post.description() }}">
{% endif %}
<meta name="author" content="{{ post.author() }}">
{% if post.prev_post %}
<link rel="prev" href="{{ post.prev_post.permalink() }}" title="{{ post.prev_post.title()|e }}" type="text/html">
{% endif %}
{% if post.next_post %}
<link rel="next" href="{{ post.next_post.permalink() }}" title="{{ post.next_post.title()|e }}" type="text/html">
{% endif %}
{% if post.is_draft %}
<meta name="robots" content="noindex">
{% endif %}
{{ helper.open_graph_metadata(post) }}
{{ helper.twitter_card_information(post) }}
{{ helper.meta_translations(post) }}
{% endblock %}
{% block content %}
<article class="post-{{ post.meta('type') }} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article">
{{ pheader.html_post_header() }}
<div class="e-content entry-content" itemprop="articleBody text">
{{ post.text() }}
</div>
<aside class="postpromonav">
<nav>
{{ helper.html_tags(post) }}
{{ helper.html_pager(post) }}
</nav>
</aside>
{% if not post.meta('nocomments') and site_has_comments %}
<section class="comments">
<h2><i class="mdi-communication-forum"></i>{{ messages("Comments") }}</h2>
<hr />
{{ comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path) }}
</section>
{% endif %}
{{ helper.mathjax_script(post) }}
</article>
{{ comments.comment_link_script() }}
{% endblock %}
{% block sourcelink %}
{% if show_sourcelink %}
<a class="btn btn-fab btn-raised btn-material-indigo" target="_blank" href="{{ post.source_link() }}" title="{{ messages("Source") }}">
<i class="mdi-file-cloud-download"></i>
</a>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,62 @@
{# -*- coding: utf-8 -*- #}
{% import 'post_helper.tmpl' as helper with context %}
{% import 'comments_helper.tmpl' as comments with context %}
{% macro html_title() %}
{% if title and not post.meta('hidetitle') %}
<h1 class="p-name entry-title" itemprop="headline name"><a href="{{ post.permalink() }}" class="u-url">{{ post.title()|e }}</a></h1><hr/>
{% endif %}
{% endmacro %}
{% macro html_translations(post) %}
{% if post.translated_to|length > 1 %}
<div class="metadata posttranslations translations">
<h3 class="posttranslations-intro">{{ messages("Also available in:") }}</h3>
{% for langname in translations.keys() %}
{% if langname != lang and post.is_translation_available(langname) %}
<p><a href="{{ post.permalink(langname) }}" rel="alternate" hreflang="{{ langname }}">{{ messages("LANGUAGE", langname) }}</a></p>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endmacro %}
{% macro html_sourcelink() %}
{% if show_sourcelink %}
<p class="sourceline"><a href="{{ post.source_link() }}" id="sourcelink">{{ messages("Source") }}</a></p>
{% endif %}
{% endmacro %}
{% macro html_post_header() %}
<header>
{{ html_title() }}
<div class="metadata">
<span class="byline author vcard">
<a href="{{ post.permalink() }}" >
{% if author_avatar %}
<img class="img-circle" src="{{ author_avatar }}" alt="icon"/>
{% else %}
<i class="mdi-action-face-unlock"></i>
{% endif %}
{{ post.author() }}
</a>
</span>
<span class="dateline">
<a href="{{ post.permalink() }}" rel="bookmark"><i class="mdi-device-access-time"></i>
<time class="published dt-published" datetime="{{ post.date.isoformat() }}" itemprop="datePublished" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time>
</a>
</span>
{% if post.meta('link') %}
<span><a href='{{ post.meta('link') }}'><i class="mdi-action-launch"></i>{{ messages("Original site") }}</a></span>
{% endif %}
{% if not post.meta('nocomments') and site_has_comments %}
<span class="commentline">{{ comments.comment_link(post.permalink(), post._base_path) }}</span>
{% endif %}
{% if post.description() %}
<meta name="description" itemprop="description" content="{{ post.description() }}">
{% endif %}
</div>
{{ html_translations(post) }}
<hr />
</header>
{% endmacro %}

View file

@ -0,0 +1,93 @@
{# -*- coding: utf-8 -*- #}
{% macro meta_translations(post) %}
{% if translations|length > 1 %}
{% for langname in translations.keys() %}
{% if langname != lang and post.is_translation_available(langname) %}
<link rel="alternate" hreflang="{{ langname }}" href="{{ post.permalink(langname) }}">
{% endif %}
{% endfor %}
{% endif %}
{% endmacro %}
{% macro html_tags(post) %}
{% if post.tags %}
<div itemprop="keywords" class="tags">
{% for tag in post.tags %}
{% if tag not in hidden_tags %}
<a class="tag p-category btn btn-success btn-raised btn-sm" href="{{ _link('tag', tag) }}" rel="tag">{{ tag }}</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
{% endmacro %}
{% macro html_pager(post) %}
{% if post.prev_post or post.next_post %}
<ul class="pager">
{% if post.prev_post %}
<li class="previous">
<a href="{{ post.prev_post.permalink() }}" rel="prev" title="{{ post.prev_post.title()|e }}">{{ messages("Previous post") }}</a>
</li>
{% endif %}
{% if post.next_post %}
<li class="next">
<a href="{{ post.next_post.permalink() }}" rel="next" title="{{ post.next_post.title()|e }}">{{ messages("Next post") }}</a>
</li>
{% endif %}
</ul>
{% endif %}
{% endmacro %}
{% macro open_graph_metadata(post) %}
{% if use_open_graph %}
<meta property="og:site_name" content="{{ blog_title|e }}">
<meta property="og:title" content="{{ post.title()[:70]|e }}">
<meta property="og:url" content="{{ abs_link(permalink) }}">
{% if post.description() %}
<meta property="og:description" content="{{ post.description()[:200]|e }}">
{% else %}
<meta property="og:description" content="{{ post.text(strip_html=True)[:200]|e }}">
{% endif %}
{% if post.previewimage %}
<meta property="og:image" content="{{ url_replacer(permalink, post.previewimage, lang, 'absolute') }}">
{% endif %}
<meta property="og:type" content="article">
{# Will only work with Pintrest and breaks everywhere else who expect a [Facebook] URI. #}
{# %if post.author(): #}
{# <meta property="article:author" content="{{ post.author() }}"> #}
{# %endif #}
{% if post.date.isoformat() %}
<meta property="article:published_time" content="{{ post.date.isoformat() }}">
{% endif %}
{% if post.tags %}
{% for tag in post.tags %}
<meta property="article:tag" content="{{ tag }}">
{% endfor %}
{% endif %}
{% endif %}
{% endmacro %}
{% macro twitter_card_information(post) %}
{% if twitter_card and twitter_card['use_twitter_cards'] %}
<meta name="twitter:card" content="{{ twitter_card.get('card', 'summary')|e }}">
{% 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 %}
{% endif %}
{% endmacro %}
{% macro mathjax_script(post) %}
{% if post.is_mathjax %}
<script type="text/x-mathjax-config">
MathJax.Hub.Config({tex2jax: {inlineMath: [['$latex ','$'], ['\\(','\\)']]}});</script>
<script src="/assets/js/mathjax.js"></script>
{% endif %}
{% endmacro %}

View file

@ -0,0 +1,28 @@
{% block content %}
<div id="{{ carousel_id }}" class="carousel slide">
<ol class="carousel-indicators">
{% for i in range(slides_content|length) %}
{% 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(slides_content) %}
{% if i == 0 %}
<div class="item active"><img class=" shadow-z-3" src="{{ image }}" alt="" style="margin: 0 auto 0 auto;"></div>
{% else %}
<div class="item"><img class=" shadow-z-3" src="{{ image }}" alt="" style="margin: 0 auto 0 auto;"></div>
{% endif %}
{% endfor %}
</div>
<a class="btn btn-fab btn-raised btn-material-teal arrow-back" href="#{{ carousel_id }}" data-slide="prev">
<i class="mdi-navigation-arrow-back"></i>
</a>
<a class="btn btn-fab btn-raised btn-material-teal arrow-forward" href="#{{ carousel_id }}" data-slide="next">
<i class="mdi-navigation-arrow-forward"></i>
</a>
</div>
{% endblock %}

View file

@ -0,0 +1,57 @@
{# -*- coding: utf-8 -*- #}
{% extends 'list_post.tmpl' %}
{% block extra_head %}
{{ super() }}
{% if translations|length > 1 and generate_rss %}
{% 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 %}
{% elif generate_rss %}
<link rel="alternate" type="application/rss+xml" type="application/rss+xml" title="RSS for {{ kind }} {{ tag }}" href="{{ _link(kind + "_rss", tag) }}">
{% endif %}
{% endblock %}
{% block content %}
<article class="tagpage">
<header>
<h1>{{ title|e }}</h1>
<hr />
{% if description %}
<p>{{ description }}</p>
{% endif %}
<div class="metadata">
{% if translations|length > 1 and generate_rss %}
{% for language in translations %}
<p class="feedlink">
<a class=" btn btn-raised btn-success" href="{{ _link(kind + "_rss", tag, language) }}" hreflang="{{ language }}" type="application/rss+xml">{{ messages('RSS feed', language) }} ({{ language }})</a>&nbsp;
</p>
{% endfor %}
{% elif generate_rss %}
<p class="feedlink"><a class="btn btn-raised btn-success" href="{{ _link(kind + "_rss", tag) }}" type="application/rss+xml">{{ messages('RSS feed') }}</a></p>
{% endif %}
</div>
</header>
{% if posts %}
<div class="postlist list-group">
{% for post in posts %}
<div class="list-group-item">
<div class="row-action-primary">
<i class="mdi-content-create"></i>
</div>
<div class="row-content">
<div class="least-content">
<time class="listdate" datetime="{{ post.date.isoformat() }}" title="{{ post.formatted_date(date_format) }}">{{ post.formatted_date(date_format) }}</time></div>
<h4 class="list-group-item-heading">
<a href="{{ post.permalink() }}" class="listtitle">{{ post.title()|e }}</a>
</h4>
<p class="list-group-item-text">{{ post.description()|e }}</p>
</div>
</div>
<div class="list-group-separator"></div>
{% endfor %}
</div>
{% endif %}
</article>
{% endblock %}

View file

@ -0,0 +1,34 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% block content %}
<div class="page">
<h1>{{ title }}</h1>
<hr />
{% if cat_items %}
{% if items %}
<h2>{{ messages("Categories") }}</h2>
{% endif %}
<div class="postlist">
{% for text, link in cat_items %}
{% if text and text not in hidden_categories %}
<div><a class="reference" href="{{ link }}"> <i class="mdi-action-done"></i>{{ text }}</a></div>
{% endif %}
{% endfor %}
</div>
{% if items %}
<h2>{{ messages("Tags") }}</h2>
{% endif %}
{% endif %}
{% if items %}
<ul class="list-inline">
{% for text, link in items %}
{% if text not in hidden_tags %}
<li><a class="reference badge" href="{{ link }}">{{ text }}</a></li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
{% endblock %}