Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
107 lines (95 sloc) 3.72 KB
## -*- coding: utf-8 -*-
<%namespace name="helper" file="post_helper.tmpl"/>
<%namespace name="pheader" file="post_header.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
%if post.description():
<meta name="description" itemprop="description" content="${post.description()|h}">
%endif
<meta name="author" content="${post.author()|h}">
%if post.prev_post:
<link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html">
%endif
%if post.next_post:
<link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" 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)}
</%block>
<%block name="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 hidden-print">
<form class="form-horizontal staticman-comment-form" method="POST" action="https://api.staticman.net/v2/entry/ralsina/staticman-data/master">
<fieldset>
<!-- Form Name -->
<legend>Leave a comment</legend>
<!-- Text input-->
<div class="form-group">
<input type="hidden" name="options[slug]" value="${post._base_path}">
<label class="col-md-4 control-label" for="commentName">Name</label>
<div class="col-md-4">
<input id="commentName" name="fields[name]" type="text" placeholder="John Doe" class="form-control input-md" required="">
<span class="help-block">The name you want to show others</span>
</div>
</div>
<!-- Textarea -->
<div class="form-group">
<label class="col-md-4 control-label" for="commentText">Comment</label>
<div class="col-md-4">
<textarea class="form-control" id="commentText" name="fields[comment]" required></textarea>
</div>
</div>
<!-- Button -->
<div class="form-group">
<label class="col-md-4 control-label" for="submit"></label>
<div class="col-md-4">
<button id="commentSubmit" class="btn btn-primary" name="submit" class="btn btn-success">Submit</button>
</div>
</div>
</fieldset>
</form>
% for k in sorted(data.keys(), reverse=True):
% if post._base_path in k:
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Comment by: ${data[k]['name'] | h}</h3>
</div>
<div class="panel-body">
${data[k]['comment'] | h}
</div>
</div>
% endif
% endfor
</section>
% endif
${helper.mathjax_script(post)}
</article>
${comments.comment_link_script()}
</%block>
<%block name="sourcelink">
% if show_sourcelink:
<li>
<a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a>
</li>
% endif
</%block>