-
Notifications
You must be signed in to change notification settings - Fork 0
/
posts-list.html
70 lines (61 loc) · 2.31 KB
/
posts-list.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{% extends 'partials/base.html' %}
{% block title %}
{{ super() }}
{{ site.title }} · {{ meta.description }}
{% endblock title %}
{% block content %}
{{ super() }}
<div class="container post-list">
{% if filters.tags %}
<div class="tags-title">
<h1>{{ filters.tags|tags(last_separator=' and ', prefix='Posts tagged: ', autolink=False) }}</h1>
</div>
{% endif %}
{% for post in posts %}
<article class="post">
{% if post.title %}
{% if post.linked_url %}
<h2 class="post-title">
<a href="{{ post.linked_url }}">{{ post.title }}</a>
<span class="link-char">→</span>
</h2>
{% else %}
<h1 class="post-title"><a href="{{ post.url }}" rel="bookmark">{{ post.title }}</a></h1>
{% endif %}
{% endif %}
<div class="post-meta">
{{ post.authors|authors(last_separator=' and ', prefix='by ', suffix=' on ') }}
<a href="{{ post.url }}" rel="bookmark"><time datetime="{{ post.published_at|date(isoformat=True) }}">{{ post.published_at|date('%B %-d %Y') }}</time></a>
{{ post.tags|tags(last_separator=' and ', prefix=' in ') }}
</div>
<div class="content">
{% if post.title %}
{% if post.linked_url %}
{{ post.content }}
<a href="{{ post.url }}" class="read-more" rel="bookmark">Permalink</a>
{% else %}
{{ post.excerpt }}
<a href="{{ post.url }}" class="read-more">Read more...</a>
{% endif %}
{% else %}
{{ post.content }}
{% endif %}
</div>
</article>
{% else %}
<h1>No posts</h1>
{% endfor %}
</div>
{% if pagination.has_pages %}
<nav class="site-pagination">
<ul>
{% if pagination.has_prev %}
<li class="newer"><a href="{{ pagination.prev }}" aria-label="Newer"><span aria-hidden="true">Newer Posts <i class="fa fa-arrow-left"></i></span></a></li>
{% endif %}
{% if pagination.has_next %}
<li class="older"><a href="{{ pagination.next }}" aria-label="Older"><span aria-hidden="true"><i class="fa fa-arrow-right"></i> Older Posts</span></a></li>
{% endif %}
</ul>
</nav>
{% endif %}
{% endblock content %}