2018-07-20 16:45:42 +01:00
|
|
|
{% extends "base.j2.html" %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2019-01-31 21:23:16 +00:00
|
|
|
{% block lang %} lang="{{ post.lang }}" {% endblock %}
|
|
|
|
|
|
|
|
{% block title %}{{ post.title }} - {{ site.domain }}{% endblock %}
|
|
|
|
|
2018-07-20 16:45:42 +01:00
|
|
|
{% block meta %}
|
|
|
|
<meta name="author" content="{{ author.name }} <{{ author.email }}>" />
|
|
|
|
<meta name="description" content="{{ post.summary|e }}" />
|
|
|
|
<link rel="canonical" href="{{ post.url }}" />
|
Back To Pandoc
So, Python Markdown is a bottomless pit of horrors, including crippling parsing bugs,
random out of nowhere, lack of features. It's definitely much faster, than
Pandoc, but Pandoc doesn't go full retard where there's a regex in a fenced code block,
that happens to be a regex for markdown elements.
Also added some ugly post string replacements to make Pandoc fenced code output work
with Prism:
instead of the Pandoc <pre class="codelang"><code>, Prism wants
<pre><code class="language-codelang>, so I added a regex sub, because it's 00:32.
2018-08-04 00:28:55 +01:00
|
|
|
{% if post.has_code %}
|
|
|
|
<style media="all">
|
|
|
|
{% include 'prism.css' %}
|
|
|
|
</style>
|
2018-08-04 09:30:26 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2018-08-04 09:30:26 +01:00
|
|
|
{% block prism %}
|
|
|
|
{% if post.has_code %}
|
|
|
|
<script>
|
|
|
|
{% include 'prism.js' %}
|
|
|
|
</script>
|
Back To Pandoc
So, Python Markdown is a bottomless pit of horrors, including crippling parsing bugs,
random out of nowhere, lack of features. It's definitely much faster, than
Pandoc, but Pandoc doesn't go full retard where there's a regex in a fenced code block,
that happens to be a regex for markdown elements.
Also added some ugly post string replacements to make Pandoc fenced code output work
with Prism:
instead of the Pandoc <pre class="codelang"><code>, Prism wants
<pre><code class="language-codelang>, so I added a regex sub, because it's 00:32.
2018-08-04 00:28:55 +01:00
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
2018-11-10 20:49:13 +00:00
|
|
|
{% block licence %}
|
|
|
|
<link rel="license" href="https://spdx.org/licenses/{{ post.licence }}.html" type="{{ post.licence }}" />
|
|
|
|
{% endblock %}
|
2019-01-21 16:10:27 +00:00
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
{% if post.event %}
|
|
|
|
{% set mftype = 'h-entry h-event' %}
|
|
|
|
{% else %}
|
|
|
|
{% set mftype = 'h-entry' %}
|
|
|
|
{% endif %}
|
|
|
|
<main role="main">
|
2019-01-31 21:23:16 +00:00
|
|
|
<article class="{{ mftype }} hentry singular" lang="{{ post.lang }}" itemscope="" itemprop="blogPost" itemtype="http://schema.org/BlogPosting" itemref="author">
|
2019-01-21 16:10:27 +00:00
|
|
|
<header>
|
2019-01-31 21:23:16 +00:00
|
|
|
<h1 class="entry-title p-name" itemprop="name headline">
|
2019-01-21 16:10:27 +00:00
|
|
|
{% if post.is_reply %}
|
|
|
|
<span>
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-reply" />
|
|
|
|
</svg>
|
|
|
|
<a href="{{ post.url }}">
|
|
|
|
RE:
|
|
|
|
</a>
|
2019-01-31 21:23:16 +00:00
|
|
|
<a href="{{ post.is_reply }}" class="u-in-reply-to">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.is_reply }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{% else %}
|
|
|
|
<a href="{{ post.url }}" title="{{ post.title }}">
|
|
|
|
<span>{{ post.title }}</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</h1>
|
|
|
|
</header>
|
|
|
|
|
|
|
|
{% if post.review %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<div class="h-review hreview" itemprop="review" itemscope="" itemtype="http://schema.org/Review">
|
|
|
|
<strong>Review summary of: <a href="{{ post.review.url }}" class="item fn p-name u-url p-item h-product">{{ post.review.title }}</a></strong>
|
2019-01-21 16:10:27 +00:00
|
|
|
<p>
|
|
|
|
By
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-author h-card vcard reviewer" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
|
|
|
|
<a class="fn p-name url u-url u-uid" href="{{ author.url }}" itemprop="url">
|
2019-01-21 16:10:27 +00:00
|
|
|
<span itemprop="name">{{ author.name }}</span>
|
2019-01-31 21:23:16 +00:00
|
|
|
</a></span> at <time class="dt-published dtreviewed" datetime="{{ post.pubtime }}" itemprop="datePublished">{{ post.pubdate }}</time>
|
2019-01-21 16:10:27 +00:00
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<span class="rating" itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating">
|
|
|
|
<meta itemprop="worstRating" content = "1">
|
|
|
|
<span class="value" itemprop="ratingValue">{{ post.review.rated }}</span>
|
|
|
|
out of
|
|
|
|
<span class="best" itemprop="bestRating">{{ post.review.outof }}</span>
|
|
|
|
</span>
|
|
|
|
</p>
|
2019-01-31 21:23:16 +00:00
|
|
|
<p class="p-summary summary" itemprop="reviewBody">{{ post.review.summary }}</p>
|
2019-01-21 16:10:27 +00:00
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if post.summary %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<div class="e-summary entry-summary" itemprop="description">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.html_summary }}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
2019-01-31 21:23:16 +00:00
|
|
|
<div class="e-content entry-content" itemprop="articleBody">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.html_content }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
<dl>
|
|
|
|
{% if post.event %}
|
|
|
|
<dt>Trip details</dt>
|
|
|
|
<dd>
|
|
|
|
From
|
2019-01-31 21:23:16 +00:00
|
|
|
<time class="dt-start dtstart" datetime="{{ post.event.starttime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.event.startdate }}
|
|
|
|
</time>
|
|
|
|
to
|
2019-01-31 21:23:16 +00:00
|
|
|
<time class="dt-end dtend" datetime="{{ post.event.endtime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.event.enddate }}
|
|
|
|
</time>, in
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-location location">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.event.location }}
|
|
|
|
</span>
|
|
|
|
</dd>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<dt>Author</dt>
|
2019-01-31 21:23:16 +00:00
|
|
|
<dd class="p-author h-card vcard" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
|
2019-01-21 16:10:27 +00:00
|
|
|
<img class="photo avatar u-photo u-avatar"
|
|
|
|
src="{{ author.avatar }}"
|
|
|
|
alt="Photo of {{ author.name }}"
|
|
|
|
itemprop="image" />
|
|
|
|
<a class="fn p-name url u-url u-uid"
|
|
|
|
href="{{ author.url }}"
|
|
|
|
rel="author"
|
|
|
|
itemprop="url">
|
|
|
|
<span itemprop="name">{{ author.name }}</span>
|
|
|
|
</a>
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="u-email email" href="mailto:{{ author.email }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
<span itemprop="email">{{ author.email }}</span>
|
|
|
|
</a>
|
|
|
|
<p aria-hidden="true" hidden="hidden" class="hidden" itemprop="publisher" itemscope="" itemtype="https://schema.org/Organization">
|
|
|
|
<span itemprop="name">{{ site.domain }}</span>
|
|
|
|
<a href="{{ site.url }}" itemprop="url">{{ site.url }}</a>
|
|
|
|
<span itemprop="logo" itemscope="" itemtype="https://schema.org/ImageObject">
|
|
|
|
<img src="{{ author.avatar }}" alt="" itemprop="url" />
|
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Published</dt>
|
|
|
|
<dd class="published updated">
|
|
|
|
<time class="dt-published dt-updated"
|
|
|
|
datetime="{{ post.pubtime }}"
|
|
|
|
itemprop="dateModified datePublished"
|
|
|
|
>{{ post.pubdate }}</time>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
|
|
|
|
<dt>License</dt>
|
|
|
|
<dd class="license">
|
|
|
|
{% if post.licence == 'CC-BY-4.0' %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a rel="license" href="https://creativecommons.org/licenses/by/4.0/" class="u-license" itemprop="license">
|
|
|
|
{{ post.licence }}
|
|
|
|
</a>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ul>
|
|
|
|
<li>you can share it</li>
|
|
|
|
<li>you can republish it</li>
|
|
|
|
<li>you can modify it, but you need to indicate the modifications</li>
|
|
|
|
<li>you can use it for commercial purposes</li>
|
|
|
|
<li>you always need to make a link back here</li>
|
|
|
|
</ul>
|
|
|
|
{% elif post.licence == 'CC-BY-NC-4.0' %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/" class="u-license" itemprop="license">
|
|
|
|
{{ post.licence }}
|
|
|
|
</a>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ul>
|
|
|
|
<li>you can share it</li>
|
|
|
|
<li>you can republish it</li>
|
|
|
|
<li>you can modify it, but you need to indicate the modifications</li>
|
|
|
|
<li>you can't use it for commercial purposes</li>
|
|
|
|
<li>you always need to make a link back here</li>
|
|
|
|
</ul>
|
|
|
|
For commercial use, please contact me.
|
|
|
|
{% elif post.licence == 'CC-BY-NC-ND-4.0' %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" class="u-license" itemprop="license">
|
|
|
|
{{ post.licence }}
|
|
|
|
</a>
|
2019-01-21 16:10:27 +00:00
|
|
|
<ul>
|
|
|
|
<li>you can share it</li>
|
|
|
|
<li>you can't modify it</li>
|
|
|
|
<li>you can't republish it</li>
|
|
|
|
<li>you can't use it for commercial purposes</li>
|
|
|
|
<li>you always need to make a link back here</li>
|
|
|
|
</ul>
|
|
|
|
For commercial use, please contact me.
|
|
|
|
{% endif %}
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dt>Entry URL</dt>
|
|
|
|
<dd>
|
|
|
|
{% if not post.has_mainimg %}
|
|
|
|
<img aria-hidden="true" src="{{ author.avatar }}" itemprop="image" hidden="hidden" class="hidden" />
|
|
|
|
{% endif %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="u-url u-uuid" rel="bookmark" href="{{ post.url }}" itemprop="url mainEntityOfPage">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ post.url }}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
</dl>
|
|
|
|
</footer>
|
|
|
|
|
|
|
|
{% if not post.is_page %}
|
|
|
|
{% if post.syndicate|length %}
|
|
|
|
<section class="syndication">
|
|
|
|
{% for url in post.syndicate %}
|
|
|
|
<a href="{{ url }}" class="u-syndication" itemprop="u-syndication"></a>
|
|
|
|
{% endfor %}
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
<section class="encourage">
|
|
|
|
<h2>Encourage creation!</h2>
|
|
|
|
<p>
|
|
|
|
If this entry helped you, or you simply liked it, leave a tip via <br>
|
|
|
|
{% for provider, info in author.tips.items() %}
|
|
|
|
{% if loop.last and not loop.first %} or {% endif %}
|
|
|
|
<a rel="payment" href="{{ info.url }}">
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-{{ provider }}"></use>
|
|
|
|
</svg> {{ info.text }}</a>
|
|
|
|
{% if not loop.last and not loop.first %}, {% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
{% if post.replies|length %}
|
|
|
|
<section class="replies">
|
|
|
|
<h2><a id="replies"></a>Replies</h2>
|
|
|
|
<ol>
|
|
|
|
{% for mtime, comment in post.replies.items() %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<li class="h-entry p-comment">
|
|
|
|
<time class="dt-published" datetime="{{ comment.pubtime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.pubdate }}
|
|
|
|
</time> from
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-author h-card">
|
2019-01-21 16:10:27 +00:00
|
|
|
{% if comment.author.url %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="url u-url" href="{{ comment.author.url }}">
|
|
|
|
<span class="p-name fn">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.author.name }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-name fn">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.author.name }}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
</span><br />
|
|
|
|
<span class="source">
|
|
|
|
<svg width="16" height="16">
|
|
|
|
<use xlink:href="#icon-link"></use>
|
|
|
|
</svg>
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="u-url" href="{{ comment.source }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.source }}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ol>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if post.reactions|length %}
|
|
|
|
<section class="reactions">
|
|
|
|
<h2><a id="reactions"></a>Reactions</h2>
|
|
|
|
<dl>
|
|
|
|
{% for character, comments in post.reactions.items() %}
|
|
|
|
<dt>{{ character }}</dt>
|
|
|
|
<dd>
|
|
|
|
<ul>
|
|
|
|
{% for mtime, comment in comments.items() %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<li class="h-entry p-comment">
|
2019-01-21 16:10:27 +00:00
|
|
|
<span class="reaction">
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="u-url" href="{{ comment.source }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.type }}
|
|
|
|
</a>
|
|
|
|
</span>
|
2019-01-31 21:23:16 +00:00
|
|
|
<time class="dt-published" datetime="{{ comment.pubtime }}">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.pubdate }}
|
|
|
|
</time> from
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-author h-card">
|
2019-01-21 16:10:27 +00:00
|
|
|
{% if comment.author.url %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<a class="url u-url" href="{{ comment.author.url }}">
|
|
|
|
<span class="p-name fn">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.author.name }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% else %}
|
2019-01-31 21:23:16 +00:00
|
|
|
<span class="p-name fn">
|
2019-01-21 16:10:27 +00:00
|
|
|
{{ comment.author.name }}
|
|
|
|
</span>
|
|
|
|
{% endif %}
|
|
|
|
</span>
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</dd>
|
|
|
|
{% endfor %}
|
|
|
|
</dl>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
</article>
|
|
|
|
</main>
|
|
|
|
{% endblock %}
|