aboutsummaryrefslogtreecommitdiff
path: root/src/posts/index.njk
diff options
context:
space:
mode:
authorIndrajith K L2022-11-20 04:59:39 +0530
committerIndrajith K L2022-11-20 04:59:39 +0530
commitff11d9e237e51a5eb40690e44f690108ac7175b7 (patch)
treea6db124e19c9f3ae5dfffe3bc1e8d4028e8225ce /src/posts/index.njk
parent143915cc03764082fd97d484fd3c0f3b7c018c89 (diff)
downloadindrajith-dev-feature/remove-tailwind.tar.gz
indrajith-dev-feature/remove-tailwind.tar.bz2
indrajith-dev-feature/remove-tailwind.zip
* Full Rewrite * Removed Tailwind CSS * Stripdowned to barebone css
Diffstat (limited to 'src/posts/index.njk')
-rw-r--r--src/posts/index.njk31
1 files changed, 12 insertions, 19 deletions
diff --git a/src/posts/index.njk b/src/posts/index.njk
index 1525a26..9e80d84 100644
--- a/src/posts/index.njk
+++ b/src/posts/index.njk
@@ -3,22 +3,15 @@ layout: base.njk
eleventyExcludeFromCollections: true
title: Posts
---
-<h2 class="text-2xl font-bold text-darkish-300 p-2">Published Posts</h2>
-<div class="post-lists mt-2">
- {% for post in collections.posts | reverse %}
- <div class="post-data">
- <div class="post-date p-2 bg-darkish-100 text-lightish-50 shadow-[5px_5px_0px_0px_rgba(0,0,0,255)]">
- {{post.date | dateFilter}}
- </div>
- <div class="post-title m-4 text-lightish-300 hover:text-darkish-300">
- <a href="{{post.url}}"> {{post.data.title}}</a>
- </div>
- </div>
- {% else %}
- <div class="text-center flex justify-center text-lightish-300">
- <span>No Posts </span>
- <span class="pl-2">¯\_(ツ)_/¯</span>
- </div>
- {% endfor %}
-
-</div> \ No newline at end of file
+<h2>Published Posts</h2>
+
+{% for dateP, yearPosts in collections.postsByYear %}
+ <div class="date-based">
+ <h3>{{ dateP }}</h3>
+ <ul class="post-lists">
+ {% for post in yearPosts | reverse %}
+ <li><a href="{{post.url}}">{{ post.data.title }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+{% endfor %} \ No newline at end of file