Files
blog/_layouts/post.html

62 lines
2.9 KiB
HTML

{% include header.html %}
<section itemscope itemtype="http://schema.org/BlogPosting">
<header>
<div class="timeline">
{% if page.date %}
<time datetime="{{ page.date|date_to_xmlschema }}" title="{{ page.date|date_to_xmlschema }}"><strong>{{ page.date|date:"%b %d"|upcase }}</strong><br />{{ page.date|date:"%Y" }}</time>
{% endif %}
{% if page.location %}
<a href="https://maps.google.com/maps?hl=en&amp;ll={{ page.location.latitude }},{{ page.location.longitude }}&amp;t=w&amp;z=12"><img alt="map" height="49" src="https://maps.googleapis.com/maps/api/staticmap?center={{ page.location.latitude }},{{ page.location.longitude }}&amp;zoom=9&amp;size=98x98&amp;sensor=false" title="{{ page.location.title }}" width="49" /></a>
{% endif %}
{% if page.code %}
<a href="{{ page.code }}"><img alt="code" height="49" src="{{ site.static_prefix }}/icon/code.png" width="49" /></a>
{% endif %}
</div>
<ul style="margin-top: 0;">
{% if page.previous %}
<li><a href="/{{ site.baseurl }}{{ page.previous.url }}" rel="prev">&nbsp;&larr;&nbsp;{{ page.previous.title }}&nbsp;</a></li>
{% else %}
<li><span class="noanchor">&nbsp;&larr;&nbsp;</span></li>
{% endif %}
{% if page.next %}
<li><a href="/{{ site.baseurl }}{{ page.next.url }}" rel="next">&nbsp;{{ page.next.title }}&nbsp;&rarr;&nbsp;</a></li>
{% else %}
<li><span class="noanchor">&nbsp;&rarr;&nbsp;</span></li>
{% endif %}
</ul>
<h1>
<a href="/{{ site.baseurl }}{{ page.url }}"><span itemprop="name">{{ page.title }}</span></a>
<small class="print-only" itemprop="datePublished" content="{{ page.date|date:'%F') }}">{{ page.date|date:'%A, %B %d, %Y' }}</small>
</h1>
{% if page.end_date %}
<span class="date-range">&#x1f557; {{ page.date | date:"%d/%m/%Y" }} - {{ page.end_date | date:"%d/%m/%Y" }}</span>
{% endif %}
</header>
<section class="post-content" itemprop="articleBody">
{{ content | hyphenate }}
</section>
<section>
{% assign items = ''|split:'' %}
{% assign filename = page.url | remove: '/blog/' | replace: '/', '-' | remove: '.html' %}
{% for p in site.posts %}
{% if p.content contains filename %}
{% assign items = items | push:p %}
{% endif %}
{% endfor %}
{% assign size=items | size %}
{% if size > 0 %}
<p>{{ site.mentioned_in }}</p>
<ul>
{% for item in items %}
<li><a href="{{ item.url }}">{{ item.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</section>
{% if false != page.comments %}
{% include disqus.html %}
{% endif %}
</section>
{% include footer.html %}