blob: 3b2ad7d1856cc6b4b1caf0462cbb3365b5aa53f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
{% macro meta(post) %}
<hr>
<aside class="meta">
<time datetime="{{ post.date }}">{{ post.date | date(format="%e %B %Y") }}</time>
{% if post.taxonomies.categories %}
<article class="category">
§
{% for category in post.taxonomies.categories %}
<a href="{{ get_taxonomy_url(kind="categories", name=category) }}">{{ category }}</a>
{% endfor %}
</article>
{% endif %}
{% if post.taxonomies.categories %}
<article class="tags">
∈
<menu>
{% for tag in post.taxonomies.tags %}
<li><a href="{{ get_taxonomy_url(kind="tags", name=tag) }}">{{ tag }}</a></li>
{% endfor %}
</menu>
</article>
{% endif %}
</aside>
{% endmacro meta %}
{% macro summary(post) %}
<article class="post-summary">
<h2>
<a href="{{ post.permalink }}">{{ post.title }}</a>
</h2>
{{ post_macros::meta(post=post) }}
{% if post.extra.visual_aid_src and post.extra.visual_aid_alt %}
<section class="hero-summary">
{% set resized_image = resize_image(path=post.extra.visual_aid_src, width=98, height=73) %}
<img src="{{ resized_image.url }}" alt="{{post.extra.visual_aid_alt}}" title="{{post.extra.visual_aid_alt}}">
<p>{{ post.summary | safe }}</p>
</section>
{% else %}
<p>{{ post.summary | safe }}</p>
{% endif %}
</article>
{% endmacro summary %}
|