-
Notifications
You must be signed in to change notification settings - Fork 0
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 #3 from ningowood/v0.2
Merge V0.2 to main #2: Introducing the future, beyond Spreadsheet Database Community
- Loading branch information
Showing
106 changed files
with
7,009 additions
and
4,718 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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import localFont from "next/font/local"; | ||
import { Inter } from "next/font/google"; | ||
import localFont from "next/font/local" | ||
import { Inter } from "next/font/google" | ||
|
||
export const sfPro = localFont({ | ||
src: "./SF-Pro-Display-Medium.otf", | ||
variable: "--font-sf", | ||
}); | ||
}) | ||
|
||
export const inter = Inter({ | ||
variable: "--font-inter", | ||
subsets: ["latin"], | ||
}); | ||
}) |
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 |
---|---|---|
@@ -1,45 +1,46 @@ | ||
import "./globals.css"; | ||
import { Analytics } from "@vercel/analytics/react"; | ||
import cx from "classnames"; | ||
import { sfPro, inter } from "./fonts"; | ||
import Nav from "@/components/layout/nav"; | ||
import Footer from "@/components/layout/footer"; | ||
import { Suspense } from "react"; | ||
import "./globals.css" | ||
import { Analytics } from "@vercel/analytics/react" | ||
import cx from "classnames" | ||
import { sfPro, inter } from "./fonts" | ||
import Nav from "@/components/layout/nav" | ||
import Footer from "@/components/layout/footer" | ||
import { Suspense } from "react" | ||
|
||
export const metadata = { | ||
title: "Precedent - Building blocks for your Next.js project", | ||
title: | ||
"Ningowood - Add the missing all-in-one community to the spreadsheet database ecology", | ||
description: | ||
"Precedent is the all-in-one solution for your Next.js project. It includes a design system, authentication, analytics, and more.", | ||
"Ningowood v0.2 is focus on adding the missing community to the spreadsheet database ecology.", | ||
twitter: { | ||
card: "summary_large_image", | ||
title: "Precedent - Building blocks for your Next.js project", | ||
title: | ||
"Ningowood - Add the missing all-in-one community to the spreadsheet database ecology", | ||
description: | ||
"Precedent is the all-in-one solution for your Next.js project. It includes a design system, authentication, analytics, and more.", | ||
creator: "@steventey", | ||
"Ningowood v0.2 is focus on adding the missing community to the spreadsheet database ecology.", | ||
creator: "@hylerrix", | ||
}, | ||
metadataBase: new URL("https://precedent.dev"), | ||
metadataBase: new URL("http://ningowood.com"), | ||
themeColor: "#FFF", | ||
}; | ||
} | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body className={cx(sfPro.variable, inter.variable)}> | ||
<div className="fixed h-screen w-full bg-gradient-to-br from-indigo-50 via-white to-cyan-100" /> | ||
<Suspense fallback="..."> | ||
{/* @ts-expect-error Server Component */} | ||
<Nav /> | ||
</Suspense> | ||
<main className="flex min-h-screen w-full flex-col items-center justify-center py-32"> | ||
<main className="flex min-h-screen w-full flex-col items-center justify-center pt-16 py-12"> | ||
{children} | ||
</main> | ||
<Footer /> | ||
<Analytics /> | ||
</body> | ||
</html> | ||
); | ||
) | ||
} |
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 |
---|---|---|
@@ -1,172 +1,18 @@ | ||
import Card from "@/components/home/card"; | ||
import Balancer from "react-wrap-balancer"; | ||
import { DEPLOY_URL } from "@/lib/constants"; | ||
import { Github, Twitter } from "@/components/shared/icons"; | ||
import WebVitals from "@/components/home/web-vitals"; | ||
import ComponentGrid from "@/components/home/component-grid"; | ||
import Image from "next/image"; | ||
import { nFormatter } from "@/lib/utils"; | ||
import HomeIntroHeader from "@/components/home/home-Intro-header" | ||
import DashboardPage from "@/components/home/dashboard/page" | ||
import Balancer from "react-wrap-balancer" | ||
import FutureAppPreview from "@/components/home/future-app-preview" | ||
|
||
export default async function Home() { | ||
const { stargazers_count: stars } = await fetch( | ||
"https://api.github.com/repos/steven-tey/precedent", | ||
{ | ||
...(process.env.GITHUB_OAUTH_TOKEN && { | ||
headers: { | ||
Authorization: `Bearer ${process.env.GITHUB_OAUTH_TOKEN}`, | ||
"Content-Type": "application/json", | ||
}, | ||
}), | ||
// data will revalidate every 60 seconds | ||
next: { revalidate: 60 }, | ||
}, | ||
) | ||
.then((res) => res.json()) | ||
.catch((e) => console.log(e)); | ||
|
||
return ( | ||
<> | ||
<div className="z-10 w-full max-w-xl px-5 xl:px-0"> | ||
<a | ||
href="https://twitter.com/steventey/status/1613928948915920896" | ||
target="_blank" | ||
rel="noreferrer" | ||
className="mx-auto mb-5 flex max-w-fit animate-fade-up items-center justify-center space-x-2 overflow-hidden rounded-full bg-blue-100 px-7 py-2 transition-colors hover:bg-blue-200" | ||
> | ||
<Twitter className="h-5 w-5 text-[#1d9bf0]" /> | ||
<p className="text-sm font-semibold text-[#1d9bf0]"> | ||
Introducing Precedent | ||
</p> | ||
</a> | ||
<h1 | ||
className="animate-fade-up bg-gradient-to-br from-black to-stone-500 bg-clip-text text-center font-display text-4xl font-bold tracking-[-0.02em] text-transparent opacity-0 drop-shadow-sm md:text-7xl md:leading-[5rem]" | ||
style={{ animationDelay: "0.15s", animationFillMode: "forwards" }} | ||
> | ||
<Balancer>Building blocks for your Next project</Balancer> | ||
</h1> | ||
<p | ||
className="mt-6 animate-fade-up text-center text-gray-500 opacity-0 md:text-xl" | ||
style={{ animationDelay: "0.25s", animationFillMode: "forwards" }} | ||
> | ||
<Balancer> | ||
An opinionated collection of components, hooks, and utilities for | ||
your Next.js project. | ||
</Balancer> | ||
</p> | ||
<div | ||
className="mx-auto mt-6 flex animate-fade-up items-center justify-center space-x-5 opacity-0" | ||
style={{ animationDelay: "0.3s", animationFillMode: "forwards" }} | ||
> | ||
<a | ||
className="group flex max-w-fit items-center justify-center space-x-2 rounded-full border border-black bg-black px-5 py-2 text-sm text-white transition-colors hover:bg-white hover:text-black" | ||
href={DEPLOY_URL} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<svg | ||
className="h-4 w-4 group-hover:text-black" | ||
viewBox="0 0 24 24" | ||
fill="currentColor" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<path | ||
d="M12 4L20 20H4L12 4Z" | ||
stroke="currentColor" | ||
strokeWidth="2" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
/> | ||
</svg> | ||
<p>Deploy to Vercel</p> | ||
</a> | ||
<a | ||
className="flex max-w-fit items-center justify-center space-x-2 rounded-full border border-gray-300 bg-white px-5 py-2 text-sm text-gray-600 shadow-md transition-colors hover:border-gray-800" | ||
href="https://github.com/steven-tey/precedent" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
<Github /> | ||
<p> | ||
<span className="hidden sm:inline-block">Star on</span> GitHub{" "} | ||
<span className="font-semibold">{nFormatter(stars)}</span> | ||
</p> | ||
</a> | ||
</div> | ||
</div> | ||
<div className="my-10 grid w-full max-w-screen-xl animate-fade-up grid-cols-1 gap-5 px-5 md:grid-cols-3 xl:px-0"> | ||
{features.map(({ title, description, demo, large }) => ( | ||
<Card | ||
key={title} | ||
title={title} | ||
description={description} | ||
demo={ | ||
title === "Beautiful, reusable components" ? ( | ||
<ComponentGrid /> | ||
) : ( | ||
demo | ||
) | ||
} | ||
large={large} | ||
/> | ||
))} | ||
</div> | ||
{/** | ||
* TODO: How to use server side components? | ||
* In '../components' folder we connot use fetch? | ||
*/} | ||
<HomeIntroHeader /> | ||
<DashboardPage /> | ||
<FutureAppPreview /> | ||
</> | ||
); | ||
) | ||
} | ||
|
||
const features = [ | ||
{ | ||
title: "Beautiful, reusable components", | ||
description: | ||
"Pre-built beautiful, a11y-first components, powered by [Tailwind CSS](https://tailwindcss.com/), [Radix UI](https://www.radix-ui.com/), and [Framer Motion](https://framer.com/motion)", | ||
large: true, | ||
}, | ||
{ | ||
title: "Performance first", | ||
description: | ||
"Built on [Next.js](https://nextjs.org/) primitives like `@next/font` and `next/image` for stellar performance.", | ||
demo: <WebVitals />, | ||
}, | ||
{ | ||
title: "One-click Deploy", | ||
description: | ||
"Jumpstart your next project by deploying Precedent to [Vercel](https://vercel.com/) in one click.", | ||
demo: ( | ||
<a href={DEPLOY_URL}> | ||
<Image | ||
src="https://vercel.com/button" | ||
alt="Deploy with Vercel" | ||
width={120} | ||
height={30} | ||
unoptimized | ||
/> | ||
</a> | ||
), | ||
}, | ||
{ | ||
title: "Built-in Auth + Database", | ||
description: | ||
"Precedent comes with authentication and database via [Auth.js](https://authjs.dev/) + [Prisma](https://prisma.io/)", | ||
demo: ( | ||
<div className="flex items-center justify-center space-x-20"> | ||
<Image alt="Auth.js logo" src="/authjs.webp" width={50} height={50} /> | ||
<Image alt="Prisma logo" src="/prisma.svg" width={50} height={50} /> | ||
</div> | ||
), | ||
}, | ||
{ | ||
title: "Hooks, utilities, and more", | ||
description: | ||
"Precedent offers a collection of hooks, utilities, and `@vercel/og`", | ||
demo: ( | ||
<div className="grid grid-flow-col grid-rows-3 gap-10 p-10"> | ||
<span className="font-mono font-semibold">useIntersectionObserver</span> | ||
<span className="font-mono font-semibold">useLocalStorage</span> | ||
<span className="font-mono font-semibold">useScroll</span> | ||
<span className="font-mono font-semibold">nFormatter</span> | ||
<span className="font-mono font-semibold">capitalize</span> | ||
<span className="font-mono font-semibold">truncate</span> | ||
</div> | ||
), | ||
}, | ||
]; |
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import { MetadataRoute } from "next"; | ||
import prisma from "@/lib/prisma"; | ||
import { MetadataRoute } from "next" | ||
import prisma from "@/lib/prisma" | ||
|
||
export default async function sitemap(): Promise<MetadataRoute.Sitemap> { | ||
const users = await prisma.user.findMany({ | ||
select: { | ||
id: true, | ||
}, | ||
take: 1, | ||
}); | ||
}) | ||
|
||
return [ | ||
{ | ||
url: "https://precedent.dev", | ||
url: "http://ningowood.com", | ||
lastModified: new Date(), | ||
}, | ||
...users.map((user) => ({ | ||
url: `https://precedent.dev/${user.id}`, | ||
url: `http://ningowood.com/${user.id}`, | ||
lastModified: new Date(), | ||
})), | ||
]; | ||
] | ||
} |
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
Oops, something went wrong.
fc855eb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ningowood – ./
ningowood-git-main-ningowood.vercel.app
ningowood-ningowood.vercel.app