-
Notifications
You must be signed in to change notification settings - Fork 920
feat(site): oss friends page #7715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,85 @@ | ||
| import type { Metadata } from "next"; | ||
| import { Card } from "@prisma/eclipse"; | ||
|
|
||
| export const metadata: Metadata = { | ||
| title: "OSS Friends | Prisma", | ||
| description: | ||
| "Discover open-source projects and communities that we love and support.", | ||
| alternates: { | ||
| canonical: "https://www.prisma.io/oss-friends", | ||
| }, | ||
| }; | ||
|
|
||
| type OSSFriend = { | ||
| href: string; | ||
| name: string; | ||
| description: string; | ||
| }; | ||
|
|
||
| async function getOSSFriends(): Promise<OSSFriend[]> { | ||
| try { | ||
| const res = await fetch("https://formbricks.com/api/oss-friends", { | ||
| next: { revalidate: 3600 }, | ||
| }); | ||
| const raw = await res.json(); | ||
| const list = Array.isArray(raw) ? raw : (raw.data ?? raw.friends ?? []); | ||
| return list as OSSFriend[]; | ||
| } catch { | ||
| return []; | ||
| } | ||
| } | ||
|
aidankmcalister marked this conversation as resolved.
|
||
|
|
||
| export default async function OSSFriendsPage() { | ||
| const friends = await getOSSFriends(); | ||
|
|
||
| return ( | ||
| <main className="flex-1 w-full -mt-24 bg-background-default text-foreground-neutral"> | ||
| <section className="px-4 pt-36 pb-12 md:pb-16"> | ||
| <div className="mx-auto flex w-full max-w-[720px] flex-col items-center gap-6 text-center"> | ||
| <p className="m-0 flex items-center justify-center gap-2 text-base font-semibold uppercase tracking-[1.6px] text-foreground-ppg font-sans"> | ||
| <i className="fa-regular fa-heart" aria-hidden /> | ||
| Community | ||
| </p> | ||
| <h1 className="m-0 text-foreground-neutral text-5xl font-sans-display [font-variation-settings:'wght'_900]"> | ||
| OSS Friends | ||
| </h1> | ||
| <p className="m-0 text-lg text-foreground-neutral-weak max-w-[560px]"> | ||
| Open-source projects and communities that we love and support. | ||
| </p> | ||
| </div> | ||
| </section> | ||
|
|
||
| <section className="px-4 pb-16 md:pb-20"> | ||
| <div className="mx-auto max-w-[1024px] grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3"> | ||
| {friends.map((friend, idx) => ( | ||
| <a | ||
| key={idx} | ||
| href={friend.href} | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="group" | ||
| > | ||
| <Card className="flex h-full flex-col justify-between gap-5 p-6 transition-colors hover:border-stroke-neutral-strong hover:bg-surface-elevated"> | ||
| <div className="flex flex-col gap-2"> | ||
| <h3 className="m-0 text-base font-semibold text-foreground-neutral"> | ||
| {friend.name} | ||
| </h3> | ||
| <p className="m-0 text-sm leading-relaxed text-foreground-neutral-weak line-clamp-3"> | ||
| {friend.description} | ||
| </p> | ||
| </div> | ||
| <span className="flex items-center gap-1 text-sm font-medium text-foreground-ppg"> | ||
| Learn more | ||
| <i | ||
| className="fa-regular fa-arrow-right text-xs ml-1 transition-transform duration-200 group-hover:translate-x-1" | ||
| aria-hidden | ||
| /> | ||
| </span> | ||
| </Card> | ||
| </a> | ||
| ))} | ||
| </div> | ||
| </section> | ||
| </main> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.