-
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 #416 from HoomanDgtl/ecosystem-updates
update: ecosystem showcase ui/ux
- Loading branch information
Showing
25 changed files
with
342 additions
and
1,575 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
import ProjectCard from "@/components/ecosystem-pages/project-card.astro"; | ||
import Layout from "@/layouts/layout.astro"; | ||
import { type CollectionEntry } from "astro:content"; | ||
import Categories from "@/components/ecosystem-pages/categories.astro"; | ||
import TopHeader from "@/components/ecosystem-pages/top-header.astro"; | ||
import TopMargin from "@/components/ui/top-margin.astro"; | ||
import SearchDialog from "./search-dialog"; | ||
type Project = CollectionEntry<"Ecosystem_Page">; | ||
const { projects, tags, title } = Astro.props; | ||
const astroUrl = Astro.url; | ||
--- | ||
|
||
<Layout | ||
title={`${title ? `${title} | ` : ""} Deployed On Akash`} | ||
image="/meta-images/ecosystem.png" | ||
> | ||
<TopMargin> | ||
<TopHeader tags={tags} /> | ||
</TopMargin> | ||
|
||
<div | ||
class="container mt-4 flex justify-between md:mt-10 lg:gap-x-[20px] xl:gap-x-[48px]" | ||
> | ||
<Categories tags={tags} /> | ||
|
||
<div> | ||
<div class="flex items-center justify-between"> | ||
<h2 | ||
class="text-[20px] font-semibold leading-[28px] md:text-2lg md:leading-[48px]" | ||
> | ||
{title || "Deployed On Akash"} | ||
</h2> | ||
<div class="hidden md:block"> | ||
<SearchDialog client:load currentPath={astroUrl.pathname} /> | ||
</div> | ||
</div> | ||
|
||
<div | ||
class="mt-4 grid flex-shrink-0 grid-cols-1 gap-y-[24px] sm:grid-cols-2 sm:gap-x-8 md:gap-y-8 lg:grid-cols-3 lg:gap-x-[36px] lg:gap-y-[32px]" | ||
> | ||
{ | ||
projects?.map((project: Project, i: number) => { | ||
return ( | ||
<ProjectCard | ||
title={project.data.projectTitle} | ||
description={project.data.description} | ||
image={project.data.projectImage} | ||
button={project.data.ctaButton} | ||
githubLink={project.data.githubLink} | ||
twitterLink={project.data.twitterLink} | ||
websiteLink={project.data.websiteLink} | ||
discordLink={project.data.discordLink} | ||
/> | ||
); | ||
}) | ||
} | ||
</div> | ||
</div> | ||
</div> | ||
</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 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,47 @@ | ||
--- | ||
import { getCollection } from "astro:content"; | ||
import EcosystemPage from "@/components/ecosystem-pages/ecosystem-page.astro"; | ||
export async function getStaticPaths() { | ||
const projects = (await getCollection("Ecosystem_Page")) | ||
.filter((project) => project.data.category === "tool") | ||
.sort((a, b) => { | ||
const dateA = new Date(a.data.pubDate); | ||
const dateB = new Date(b.data.pubDate); | ||
return dateB.getTime() - dateA.getTime(); | ||
}); | ||
const tags: string[] = []; | ||
projects.forEach((project) => { | ||
project.data.tags.forEach((tag: string) => { | ||
const lowerCasedTag = tag.toLowerCase(); | ||
if (!tags.includes(lowerCasedTag)) { | ||
tags.push(lowerCasedTag); | ||
} | ||
}); | ||
}); | ||
return tags.flatMap((tag) => { | ||
const lowercasedTag = tag.toLowerCase(); | ||
const filteredPosts = projects.filter((post) => | ||
post.data.tags.some((tag: string) => tag.toLowerCase() === lowercasedTag), | ||
); | ||
return { | ||
params: { tag }, | ||
props: { currentTag: tag, tags: tags, page: filteredPosts }, | ||
}; | ||
}); | ||
} | ||
const { page, currentTag, tags } = Astro.props; | ||
const formattedTag = currentTag.charAt(0).toUpperCase() + currentTag.slice(1); | ||
--- | ||
|
||
<EcosystemPage title={formattedTag} tags={tags} projects={page} /> |
Oops, something went wrong.