-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpost-list.njk
More file actions
59 lines (57 loc) · 1.74 KB
/
Copy pathpost-list.njk
File metadata and controls
59 lines (57 loc) · 1.74 KB
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
{%- css %}
.postlist { counter-reset: start-from
{{ (postslistCounter or postslist.length) + 1 }}; list-style-type: none;}
{% endcss %}
{% if postslist %}
<ol reversed class="postlist">
{% for post in postslist | reverse %}
<li
class="postlist-item{% if post.url == url %}postlist-item-active{% endif %}"
>
<article>
<hgroup>
<h2>
<a href="{{ post.url }}" class="postlist-link"
>{% if post.data.title %}
{{ post.data.title }}
{% else %}
<code>{{ post.url }}</code>
{% endif %}</a
>
</h2>
<p>
<small>
<time
class="postlist-date"
datetime="{{ post.date | htmlDateString }}"
>{{ post.date | readableDate("LLLL yyyy") }}</time
>
<span aria-hidden="true">|</span>
<span class="postlist-item-tags">
{% for tag in post.data.tags | filterTagList %}
<a href="/tags/{{ tag | slug }}/" class="postlist-tag"
>{{ tag }}</a
>
{% endfor %}
</span>
</small>
</p>
</hgroup>
<p class="postlist-excerpt">{{ post.data.description }}</p>
</article>
</li>
{% endfor %}
</ol>
{% endif %}
{% if postslist.length < 10 %}
<div class="text-center">
<p>
{{ "A" if postslist.length <= 0 else "More a" }}wesome posts coming soon!
</p>
<img
src="/img/black-cat-typing.gif"
alt="A black cat frantically typing on a laptop"
eleventy:ignore
/>
</div>
{% endif %}