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/components/EventCard.astro | 63 ++++++++++++++++++++++++++++++++++++ src/components/EventNavigation.astro | 54 +++++++++++++++++++++++++++++++ src/components/Footer.astro | 4 +-- 3 files changed, 119 insertions(+), 2 deletions(-) create mode 100644 src/components/EventCard.astro create mode 100644 src/components/EventNavigation.astro (limited to 'src/components') diff --git a/src/components/EventCard.astro b/src/components/EventCard.astro new file mode 100644 index 0000000..b615c2d --- /dev/null +++ b/src/components/EventCard.astro @@ -0,0 +1,63 @@ +--- +import { Badge } from '@/components/ui/badge' +import { formatDate, iconMappings } from '@/lib/utils' +import { Icon } from 'astro-icon/components' +import { Image } from 'astro:assets' +import type { CollectionEntry } from 'astro:content' +import Link from './Link.astro' + +interface Props { + entry: CollectionEntry<'events'> +} + +const { entry } = Astro.props +const formattedDate = formatDate(entry.data.date) +--- + +
+ + { + entry.data.image && ( +
+ {entry.data.title} +
+ ) + } + +
+

{entry.data.title}

+

{entry.data.description}

+ +
+ {formattedDate} +
+ + { + entry.data.type && ( +
+ + + {entry.data.type} + +
+ ) + } +
+ +
diff --git a/src/components/EventNavigation.astro b/src/components/EventNavigation.astro new file mode 100644 index 0000000..f1b76ce --- /dev/null +++ b/src/components/EventNavigation.astro @@ -0,0 +1,54 @@ +--- +import Link from '@/components/Link.astro' +import { buttonVariants } from '@/components/ui/button' +import { cn } from '@/lib/utils' +import { Icon } from 'astro-icon/components' + +const { newerEvent, olderEvent } = Astro.props +--- + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 7ff1e50..6b37226 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -15,10 +15,10 @@ import SocialIcons from './SocialIcons.astro'

Made with 🤍 by enscribefosscet!

-- cgit v1.2.3