-
Notifications
You must be signed in to change notification settings - Fork 0
/
posts.njk
30 lines (26 loc) · 1.08 KB
/
posts.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
---
layout: layouts/base.njk
title: "Archivo"
---
{% set postsList = collections.publishables %}
{% set postsListCount = collections.publishables | length %}
<h1 class="text-accent-500 dark:text-accent-dark-500 font-black text-3xl mb-8">Archivo 📂 ({{ postsListCount }} posts)</h1>
<section class="flex flex-col space-y-8 mb-8">
{% for date, posts in postsList | reverse | groupby("data.monthYear") %}
<div class="relative">
<div class="absolute inset-0 flex items-center" aria-hidden="true">
<div class="w-full border-t border-gray-300"></div>
</div>
<div class="relative flex justify-start">
<span class="pr-3 bg-background dark:bg-background-dark text-lg font-medium text-primary dark:text-primary-dark"> {{ date | capitalize }} ({{ posts | length }} posts) </span>
</div>
</div>
<div class="pb-2 px-4 sm:px-6 lg:pb-4 lg:px-8">
<div class="pt-4 grid gap-16 lg:grid-cols-2 lg:gap-x-5 lg:gap-y-12">
{% for post in posts %}
{% include "postitem.njk" %}
{% endfor %}
</div>
</div>
{% endfor %}
</section>