1
0
mirror of https://github.com/avitex/avitex.github.io synced 2024-11-16 09:29:57 +00:00
1bit.pw/templates/post_macros.html
2020-04-12 03:22:25 +10:00

40 lines
1.5 KiB
HTML

{% macro meta(page) %}
<svg style="margin-bottom: -3px" class="icon i-edit" viewBox="0 0 32 32"
width="16" height="16" fill="none" stroke="currentcolor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<path d="M30 7 L25 2 5 22 3 29 10 27 Z M21 6 L26 11 Z M5 22 L10 27 Z"/>
</svg>
<time datetime="{{ page.date | date(format="%F") }}" itemprop="datePublished">{{ page.date | date(format="%b %d, %Y") }}</time>
<svg style="margin-bottom:-3px" class="icon i-clock" viewBox="0 0 32 32"
width="16" height="16" fill="none" stroke="currentcolor"
stroke-linecap="round" stroke-linejoin="round" stroke-width="6.25%">
<circle cx="16" cy="16" r="14"/>
<path d="M16 8 L16 16 20 20"/>
</svg>
<span>{{ page.reading_time }} minute read</span>
{% endmacro meta %}
{% macro page_in_list(page) %}
<article itemscope itemtype="http://schema.org/CreativeWork">
<header>
<h2 itemprop="name">
<a href="{{ page.permalink }}">{{ page.title }}</a>
</h2>
<span class="muted mono">{{ self::meta(page=page) }}</span>
</header>
{% if page.summary %}
<div itemprop="summary">
{{ page.summary | safe }}
<nav class="readmore">
<a itemprop="url" href="{{ page.permalink }}">
<span>Read More</span>
<svg class="icon i-caret-r" xmlns="http://www.w3.org/2000/svg" fill="currentcolor" viewBox="0 0 5.9 9" width="5.9" height="9">
<path d="M5.9 4.5L4.5 3.1 1.4 0 0 1.4l3.1 3.1-3.1 3L1.4 9l3.1-3.1z"></path>
</svg>
</a>
</nav>
</div>
{% endif %}
</article>
{% endmacro page_in_list %}