add new landing page

This commit is contained in:
MarconLP 2023-04-16 17:37:13 +02:00
parent 4c86b29f92
commit 0e7181d6cf
No known key found for this signature in database
GPG key ID: A08A9C8B623F5EA5
3 changed files with 185 additions and 22 deletions

15
package-lock.json generated
View file

@ -12,6 +12,7 @@
"@aws-sdk/client-s3": "^3.310.0",
"@aws-sdk/s3-request-presigner": "^3.310.0",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.17",
"@next-auth/prisma-adapter": "^1.0.5",
"@popperjs/core": "^2.11.7",
"@prisma/client": "^4.11.0",
@ -1845,6 +1846,14 @@
"react-dom": "^16 || ^17 || ^18"
}
},
"node_modules/@heroicons/react": {
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.17.tgz",
"integrity": "sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA==",
"peerDependencies": {
"react": ">= 16"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.8",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",
@ -8378,6 +8387,12 @@
"client-only": "^0.0.1"
}
},
"@heroicons/react": {
"version": "2.0.17",
"resolved": "https://registry.npmjs.org/@heroicons/react/-/react-2.0.17.tgz",
"integrity": "sha512-90GMZktkA53YbNzHp6asVEDevUQCMtxWH+2UK2S8OpnLEu7qckTJPhNxNQG52xIR1WFTwFqtH6bt7a60ZNcLLA==",
"requires": {}
},
"@humanwhocodes/config-array": {
"version": "0.11.8",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz",

View file

@ -18,6 +18,7 @@
"@aws-sdk/client-s3": "^3.310.0",
"@aws-sdk/s3-request-presigner": "^3.310.0",
"@headlessui/react": "^1.7.13",
"@heroicons/react": "^2.0.17",
"@next-auth/prisma-adapter": "^1.0.5",
"@popperjs/core": "^2.11.7",
"@prisma/client": "^4.11.0",

View file

@ -1,42 +1,189 @@
import { type NextPage } from "next";
import Head from "next/head";
import Link from "next/link";
import { signIn, signOut, useSession } from "next-auth/react";
import { Bars3Icon, XMarkIcon } from "@heroicons/react/24/outline";
import { api } from "~/utils/api";
import { Dialog } from "@headlessui/react";
import { useState } from "react";
import Link from "next/link";
const navigation = [
{ name: "Features", href: "#features" },
{ name: "Pricing", href: "/pricing" },
{ name: "Discord", href: "https://discord.com/invite/invalid" },
];
const Home: NextPage = () => {
const hello = api.example.hello.useQuery({ text: "from tRPC" });
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
return (
<>
<Head>
<title>Create T3 App</title>
<title>Screenity | Async video messaging</title>
<meta name="description" content="Generated by create-t3-app" />
<link rel="icon" href="/favicon.ico" />
</Head>
<main className="flex min-h-screen flex-col items-center justify-center bg-gradient-to-b from-[#2e026d] to-[#15162c]">
<div className="container flex flex-col items-center justify-center gap-12 px-4 py-16 ">
<h1 className="text-5xl font-extrabold tracking-tight text-white sm:text-[5rem]">
Create <span className="text-[hsl(280,100%,70%)]">T3</span> App
</h1>
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-8">
<Link
className="flex max-w-xs flex-col gap-4 rounded-xl bg-white/10 p-4 text-white hover:bg-white/20"
href="/videos"
>
<h3 className="text-2xl font-bold">Go to Videos </h3>
<div className="text-lg">The entire videos collection</div>
</Link>
<div className="bg-white">
<header className="absolute inset-x-0 top-0 z-50">
<nav
className="flex items-center justify-between p-6 lg:px-8"
aria-label="Global"
>
<div className="flex lg:flex-1">
<Link href="/" className="-m-1.5 p-1.5">
<span className="sr-only">Your Company</span>
<img
className="h-8 w-auto"
src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600"
alt=""
/>
</Link>
</div>
<div className="flex lg:hidden">
<button
type="button"
className="-m-2.5 inline-flex items-center justify-center rounded-md p-2.5 text-gray-700"
onClick={() => setMobileMenuOpen(true)}
>
<span className="sr-only">Open main menu</span>
<Bars3Icon className="h-6 w-6" aria-hidden="true" />
</button>
</div>
<div className="hidden lg:flex lg:gap-x-12">
{navigation.map((item) => (
<a
key={item.name}
href={item.href}
className="text-sm font-semibold leading-6 text-gray-900"
>
{item.name}
</a>
))}
</div>
<div className="hidden lg:flex lg:flex-1 lg:justify-end">
<Link
href="/videos"
className="text-sm font-semibold leading-6 text-gray-900"
>
Log in <span aria-hidden="true">&rarr;</span>
</Link>
</div>
</nav>
<Dialog
as="div"
className="lg:hidden"
open={mobileMenuOpen}
onClose={setMobileMenuOpen}
>
<div className="fixed inset-0 z-50" />
<Dialog.Panel className="fixed inset-y-0 right-0 z-50 w-full overflow-y-auto bg-white px-6 py-6 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10">
<div className="flex items-center justify-between">
<Link href="/" className="-m-1.5 p-1.5">
<span className="sr-only">Your Company</span>
<img
className="h-8 w-auto"
src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600"
alt=""
/>
</Link>
<button
type="button"
className="-m-2.5 rounded-md p-2.5 text-gray-700"
onClick={() => setMobileMenuOpen(false)}
>
<span className="sr-only">Close menu</span>
<XMarkIcon className="h-6 w-6" aria-hidden="true" />
</button>
</div>
<div className="mt-6 flow-root">
<div className="-my-6 divide-y divide-gray-500/10">
<div className="space-y-2 py-6">
{navigation.map((item) => (
<Link
key={item.name}
href={item.href}
className="-mx-3 block rounded-lg px-3 py-2 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
>
{item.name}
</Link>
))}
</div>
<div className="py-6">
<Link
href="/sign-in"
className="-mx-3 block rounded-lg px-3 py-2.5 text-base font-semibold leading-7 text-gray-900 hover:bg-gray-50"
>
Log in
</Link>
</div>
</div>
</div>
</Dialog.Panel>
</Dialog>
</header>
<div className="relative isolate px-6 pt-14 lg:px-8">
<div
className="absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80"
aria-hidden="true"
>
<div
className="relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-30rem)] sm:w-[72.1875rem]"
style={{
clipPath:
"polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
}}
/>
</div>
<div className="flex flex-col items-center gap-2">
<p className="text-2xl text-white">
{hello.data ? hello.data.greeting : "Loading tRPC query..."}
</p>
<AuthShowcase />
<div className="mx-auto max-w-2xl py-32 sm:py-48 lg:py-56">
{/*<div className="hidden sm:mb-8 sm:flex sm:justify-center">*/}
{/* <div className="relative rounded-full px-3 py-1 text-sm leading-6 text-gray-600 ring-1 ring-gray-900/10 hover:ring-gray-900/20">*/}
{/* Announcing our next round of funding.{" "}*/}
{/* <Link href="/blog" className="font-semibold text-indigo-600">*/}
{/* <span className="absolute inset-0" aria-hidden="true" />*/}
{/* Read more <span aria-hidden="true">&rarr;</span>*/}
{/* </Link>*/}
{/* </div>*/}
{/*</div>*/}
<div className="text-center">
<h1 className="text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">
Async video messaging
</h1>
<p className="mt-6 text-lg leading-8 text-gray-600">
Share high-quality videos asynchronously and collaborate on your
own schedule
</p>
<div className="mt-10 flex items-center justify-center gap-x-6">
<Link
href="/"
className="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
Get started
</Link>
<Link
href="/"
className="text-sm font-semibold leading-6 text-gray-900"
>
Learn more <span aria-hidden="true"></span>
</Link>
</div>
</div>
</div>
<div
className="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)]"
aria-hidden="true"
>
<div
className="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem]"
style={{
clipPath:
"polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)",
}}
/>
</div>
</div>
</main>
</div>
</>
);
};