From 353a3338fd080b385821d5d2b7b14ee99f8b8e70 Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Fri, 30 May 2025 18:49:09 +0200 Subject: [PATCH] feat: latest posts view --- src/pages/index.astro | 93 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 79 insertions(+), 14 deletions(-) diff --git a/src/pages/index.astro b/src/pages/index.astro index 0645f91..7becb4f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,8 +1,12 @@ --- -import PageHead from '@/components/PageHead.astro' -import Layout from '@/layouts/Layout.astro' -import Link from '@/components/Link.astro' import BentoSpotify from '@/components/BentoSpotify' +import Link from '@/components/Link.astro' +import PageHead from '@/components/PageHead.astro' +import { Badge } from '@/components/ui/badge' +import Layout from '@/layouts/Layout.astro' +import { getRecentPosts } from '@/lib/data-utils' +import { Icon } from 'astro-icon/components' +const allPosts = await getRecentPosts(2) --- @@ -11,15 +15,30 @@ import BentoSpotify from '@/components/BentoSpotify'
-
- +
+

Hi! I'm Izan, a student from Málaga, Spain

-

I mainly do open source work at sern and Hack Club.

-

In my free time, I enjoy coding, reading and learning languages.

+

+ I mainly do open source work at sern and Hack Club. +

+

+ In my free time, I enjoy coding, reading and learning languages. +

@@ -28,20 +47,66 @@ import BentoSpotify from '@/components/BentoSpotify'
-
+ + +
+
+

Latest Posts

+ View all → +
+
+ { + allPosts.map((post) => ( +
+ +
+

+ {post.data.title} +

+
+ {post.data.tags && ( + + )} +
+ {post.data.description && ( +

+ {post.data.description} +

+ )} + +
+ )) + } +
+
+
discord
wakatime
- - -
- github graph -