diff --git a/src/components/CTA.astro b/src/components/CTA.astro index c43574a7..b5a75f53 100644 --- a/src/components/CTA.astro +++ b/src/components/CTA.astro @@ -41,7 +41,7 @@ if (pathname.startsWith("/ecosystem/providers")) { mt-10 flex flex-col items-center justify-around bg-white border-y px-[30px] py-[80px] text-center dark:bg-background2 md:mt-16 lg:py-[160px]`} >
{title}
diff --git a/src/components/community-pages/nav-config.ts b/src/components/community-pages/nav-config.ts index 52e6f75f..0c5273e9 100644 --- a/src/components/community-pages/nav-config.ts +++ b/src/components/community-pages/nav-config.ts @@ -6,7 +6,7 @@ export const nav: any = [ }, { label: "Events", - link: "/community/events/upcoming", + link: "/community/events/", enabled: true, }, diff --git a/src/components/footer/footer.astro b/src/components/footer/footer.astro index 27ec4db5..2675771b 100644 --- a/src/components/footer/footer.astro +++ b/src/components/footer/footer.astro @@ -118,7 +118,7 @@ const links = [ { title: "Events", - link: "/community/events/upcoming", + link: "/community/events", }, ], }, diff --git a/src/components/header/popovers/links.tsx b/src/components/header/popovers/links.tsx index 8ab23cae..483224b5 100644 --- a/src/components/header/popovers/links.tsx +++ b/src/components/header/popovers/links.tsx @@ -13,7 +13,7 @@ export const communityItems = [ icon: CalendarHeart, title: "Events", - link: "/community/events/upcoming/", + link: "/community/events/", }, { icon: BadgeCheck, diff --git a/src/content/Community_Page/events/archived.mdx b/src/content/Community_Page/events/archived.mdx new file mode 100644 index 00000000..565b6095 --- /dev/null +++ b/src/content/Community_Page/events/archived.mdx @@ -0,0 +1,9 @@ +--- +title: Akash Events (Archive) +description: Here is the list of archived events + +pubDate: "2024-10-14" +disableTableOfContents: true +--- + + diff --git a/src/content/Community_Page/events/index.mdx b/src/content/Community_Page/events/index.mdx index f7bb1e0b..b27601e4 100644 --- a/src/content/Community_Page/events/index.mdx +++ b/src/content/Community_Page/events/index.mdx @@ -1,6 +1,6 @@ --- title: Akash Events -description: Akash is coming to town! Check out all the upcoming events where you can connect with members of the Akash community IRL. +description: Explore the list of upcoming events pubDate: "2020-01-19" disableTableOfContents: true diff --git a/src/pages/community/events/archived.astro b/src/pages/community/events/archived.astro new file mode 100644 index 00000000..8be9895b --- /dev/null +++ b/src/pages/community/events/archived.astro @@ -0,0 +1,79 @@ +--- +import Layout from "@/layouts/layout.astro"; +import { getCollection, getEntry } from "astro:content"; +import ButtonLink from "../../../components/ui/button-link.astro"; + +import EventCard from "@/components/community-pages/event-card.astro"; +import TopMargin from "@/components/ui/top-margin.astro"; + +const cards = await getCollection("Community_Akash_Events_Page"); +const { data } = await getEntry("Community_Page", "events/archived"); + +const allCards = cards.map((card) => card.data); + +const eventDurationInMilliSeconds = 864000000; +const archivePeriodInMilliSeconds = 31449600000; +const currentOffsetDateTime = new Date( + new Date()?.getTime() - eventDurationInMilliSeconds, +).getTime(); +const cutoffOffsetDateTime = new Date( + new Date()?.getTime() - archivePeriodInMilliSeconds, +).getTime(); + +const archivedCards = allCards.filter((curr: any) => { + if (curr.tbd) { + return false; + } + const eventDate = new Date(curr.eventDate).getTime(); + + if (eventDate < cutoffOffsetDateTime) { + return false; + } + + return eventDate < currentOffsetDateTime; +}); + +const sortedCards = archivedCards.sort((a, b) => { + return new Date(a.eventDate).getTime() - new Date(b.eventDate).getTime(); +}); +--- + ++ {data?.description} +
+{data?.description}
- - -- Here is the list of upcoming events -
- - -