-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.njk
44 lines (40 loc) · 1.46 KB
/
index.njk
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
---
pagination:
data: feeds
size: 5
---
{% extends 'base.njk' %}
{% block content %}
<div class="list-container">
<aside>
<p>
Right now, there are {{ feeds|length }} aggregated posts from {{ sources.feeds|length }} publications.
Last updated <span data-relative-time="{{ 'now'|date('iso') }}">{{ 'now'|date }}</span>
</p>
</aside>
<main role="main">
{% for feed in pagination.items %}
<article>
<h3><a href="{{ feed.link }}" target="_blank" rel="noreferrer">{{ feed.title }}</a></h3>
<section>
{{ feed['content:encoded']|truncate_html(50)|lower_headings(2)|safe }}
<p>
Published
{% if feed.author %} by {{ feed.author }}{% endif %}
{% if feed.isoDate %} on {{ feed.isoDate|date }}{% endif %}
</p>
</section>
</article>
<hr>
{% endfor %}
<nav>
{% if pagination.href.previous %}
<a href="{{ pagination.href.previous|url }}">Previous</a>
{% endif %}
{% if pagination.href.next %}
<a href="{{ pagination.href.next|url }}">Next</a>
{% endif %}
</nav>
</main>
</div>
{% endblock %}