From 45026eee4c93bbbe6141dd23a664abe6e9ff3ca2 Mon Sep 17 00:00:00 2001 From: nolawz Date: Tue, 3 Mar 2026 04:04:23 +0530 Subject: Added events section and components required for that --- src/pages/index.astro | 90 ++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 52 deletions(-) (limited to 'src/pages/index.astro') diff --git a/src/pages/index.astro b/src/pages/index.astro index 019283d..9549a7c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,13 +1,15 @@ --- import BlogCard from '@/components/BlogCard.astro' +import EventCard from '@/components/EventCard.astro' import Link from '@/components/Link.astro' import PageHead from '@/components/PageHead.astro' import { buttonVariants } from '@/components/ui/button' import { SITE } from '@/consts' import Layout from '@/layouts/Layout.astro' -import { getRecentPosts } from '@/lib/data-utils' +import { getRecentPosts, getRecentEvents } from '@/lib/data-utils' const blog = await getRecentPosts(SITE.featuredPostCount) +const events = await getRecentEvents(SITE.featuredEventsCount) --- @@ -16,69 +18,53 @@ const blog = await getRecentPosts(SITE.featuredPostCount)

er·u·dite

- /ˈer(y)əˌdīt/ • adjective + /ˈer(y)əˌdīt/ • adjective

-
-

- astro-erudite is an opinionated, unstyled static blogging template built - with Astro, Tailwind, and shadcn/ui. Extraordinarily loosely based on the Astro Micro theme. -

-

- To use this template, check out the GitHub repository. To learn more about why this template exists, read this blog - post: The State of Static Blogs in 2024. -

+ +
+

Latest events

+
    + { + events.map((event) => ( +
  • + +
  • + )) + } +
+
+ + See all posts → +

Latest posts

    { - blog.map((post) => ( -
  • - -
  • - )) + blog.map((post) => ( +
  • + +
  • + )) }
- See all posts → + href="/blog" + class={buttonVariants({ variant: 'ghost' }) + ' group'} + > + See all posts →
-- cgit v1.2.3