-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #393 from HoomanDgtl/main
pr 391: review, fix and merge
- Loading branch information
Showing
11 changed files
with
130 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Akash Events (Archive) | ||
description: Here is the list of archived events | ||
|
||
pubDate: "2024-10-14" | ||
disableTableOfContents: true | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(); | ||
}); | ||
--- | ||
|
||
<Layout | ||
title={data?.title} | ||
image="/meta-images/community.png" | ||
image="/meta-images/community.png" | ||
description={data?.description} | ||
> | ||
<TopMargin> | ||
<div class="overflow-hidden"> | ||
<div> | ||
<div class="mx-auto mt-10 text-center md:mt-0"> | ||
<h1 id="overview" class="text-3xl md:text-4xl lg:text-5xl"> | ||
{data?.title} | ||
</h1> | ||
<p class="mt-3 text-base leading-[24px] text-para"> | ||
{data?.description} | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div class="overflow-hidden"> | ||
{ | ||
( | ||
<div class="mt-10 grid grid-cols-1 gap-y-8 sm:grid-cols-2 sm:gap-x-6 lg:grid-cols-3 2xl:grid-cols-4"> | ||
{sortedCards.map((card: any) => ( | ||
<EventCard card={card} /> | ||
))} | ||
</div> | ||
) | ||
} | ||
<div class="mt-10 flex justify-center"> | ||
<ButtonLink variant="secondary" size="xs" link={"../events/"}> | ||
See current and upcoming events | ||
</ButtonLink> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="border-b pb-10"></div> | ||
</TopMargin> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.