Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

landing page stuff (#256)

PickleNik98abe1f5fd8a
diff --git a/src/app/page.tsx b/src/app/page.tsx
index b36a979a..77400865 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,4 +1,7 @@
import Head from 'next/head';
+import Community from '~/components/landing/community';
+import Features from '~/components/landing/features';
+import Hero from '~/components/landing/hero';
import { Footsies } from '~/components/ui/footsies';
export default async function Index() {
@@ -12,21 +15,9 @@ export default async function Index() {
/>
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
</Head>
- <div className="mb-[56px] flex min-h-[calc(100dvh-112px)] flex-col items-center justify-center gap-24 overflow-x-hidden overflow-y-visible px-8 py-24">
- <h1 className="relative bg-gradient-to-r from-[#3178c6] to-black bg-clip-text text-center text-8xl font-black text-transparent dark:to-white md:text-9xl">
- <div className="absolute left-1/2 top-1/2 -z-10 hidden h-56 w-56 -translate-x-[30%] -translate-y-1/2 rounded-full bg-white/20 blur-2xl dark:block lg:h-96 lg:w-96 lg:blur-3xl"></div>
- <div className="absolute right-1/2 top-1/2 -z-10 hidden h-56 w-56 -translate-y-1/2 translate-x-[30%] rounded-full bg-[#3178c6]/20 blur-2xl dark:block lg:h-96 lg:w-96 lg:blur-3xl"></div>
- Type
- <br />
- Hero
- </h1>
- <p className="mx-auto max-w-[67ch] bg-transparent text-lg leading-9 text-neutral-600 dark:text-neutral-500">
- &emsp;Connect and collaborate with a community of TypeScript developers on Type Hero.
- Engage in discussions, create challenges, and share insights with fellow typescript
- enthusiasts. Type Hero has collaborative coding challenges that foster a supportive and
- inspiring environment, where you can learn from others and showcase your expertise.
- </p>
- </div>
+ <Hero />
+ <Features />
+ <Community />
<Footsies />
</>
);
diff --git a/src/components/landing/community.tsx b/src/components/landing/community.tsx
new file mode 100644
index 00000000..cc80dff5
--- /dev/null
+++ b/src/components/landing/community.tsx
@@ -0,0 +1,5 @@
+const Community = () => (
+ <>
+ </>
+)
+export default Community
\ No newline at end of file
diff --git a/src/components/landing/fake-challeng-card.tsx b/src/components/landing/fake-challeng-card.tsx
new file mode 100644
index 00000000..61f02012
--- /dev/null
+++ b/src/components/landing/fake-challeng-card.tsx
@@ -0,0 +1,17 @@
+const FakeChallengeCard = () => (
+ <>
+ <div className="flex flex-col rounded-3xl absolute top-0 right-0 bg-zinc-900 p-8 border dark:border-zinc-600 h-3/4 w-4/5 shadow-[0_0_1rem_#4448]"
+ style={{ boxShadow: 'inset 1rem 1rem 3rem -0.5rem #fff1'}}
+ >
+ <h2 className="text-xl font-bold">Implement a JSON parser type</h2>
+ <div className="rounded-xl -mx-2 bg-zinc-800 flex-grow mt-20"></div>
+ </div>
+ <div className="flex flex-col rounded-3xl absolute bottom-0 left-0 bg-zinc-900 p-8 border dark:border-zinc-600 h-4/5 w-4/5 shadow-[0_0_1rem_#4448]"
+ style={{ boxShadow: 'inset 1rem 1rem 3rem -0.5rem #fff1, 1rem -1rem 3rem #0008'}}
+ >
+ <h2 className="text-xl font-bold">Implement a generic type</h2>
+ <div className="rounded-xl -mx-2 bg-zinc-800 flex-grow mt-20"></div>
+ </div>
+ </>
+)
+export default FakeChallengeCard
\ No newline at end of file
diff --git a/src/components/landing/features.tsx b/src/components/landing/features.tsx
new file mode 100644
index 00000000..010c8a4a
--- /dev/null
+++ b/src/components/landing/features.tsx
@@ -0,0 +1,5 @@
+const Features = () => (
+ <>
+ </>
+)
+export default Features
\ No newline at end of file
diff --git a/src/components/landing/hero.tsx b/src/components/landing/hero.tsx
new file mode 100644
index 00000000..b895806d
--- /dev/null
+++ b/src/components/landing/hero.tsx
@@ -0,0 +1,83 @@
+import { Github } from "lucide-react"
+import FakeChallengeCard from "./fake-challeng-card"
+
+const Hero = () => (
+ <div className="mb-[56px] container items-center grid grid-cols-2 min-h-[calc(100lvh_-_112px)]">
+ {/* background film grain noise effect */}
+ {/* <svg className="pointer-events-none mix-blend-soft-light opacity-50 z-10 fixed left-0 top-0 h-full w-full" id="grain">
+ <filter id="noise">
+ <feTurbulence type="fractalNoise" baseFrequency="1" numOctaves="5" stitchTiles="stitch"></feTurbulence>
+ </filter>
+ <rect width="100%" height="100%" filter="url(#noise)"></rect>
+ </svg> */}
+ <div className="flex h-full flex-col justify-center gap-10 overflow-visible">
+ <div className="relative mr-auto flex items-center gap-5">
+ <div className="absolute left-1/2 top-1/2 -z-10 hidden h-56 w-56 -translate-x-[15%] -translate-y-1/2 rounded-full bg-white/10 blur-2xl dark:block lg:h-96 lg:w-96 lg:blur-3xl"></div>
+ <div className="absolute right-1/2 top-1/2 -z-10 hidden h-56 w-56 -translate-y-1/2 translate-x-[15%] rounded-full bg-[#3178c6]/20 blur-2xl dark:block lg:h-96 lg:w-96 lg:blur-3xl"></div>
+ <svg
+ className="h-44 w-44 rounded-[2rem] dark:bg-[#3178C6] bg-[#3178C6] p-[2px]"
+ viewBox="0 0 512 512"
+ xmlns="http://www.w3.org/2000/svg"
+ >
+ <g clipPath="url(#clip0_1_2)">
+ <path
+ d="M462 0H50C22.3858 0 0 22.3858 0 50V462C0 489.614 22.3858 512 50 512H462C489.614 512 512 489.614 512 462V50C512 22.3858 489.614 0 462 0Z"
+ className="fill-[#3178C6] dark:fill-[#3178C6]"
+ />
+ <path
+ fillRule="evenodd"
+ clipRule="evenodd"
+ d="M239.78 284.082H304V243H125V284.082H188.906V467H239.78V284.082Z"
+ fill="white"
+ />
+ <path
+ d="M303.13 466.986V242.986H349.72V335.818H418.427V242.986H465.13V466.986H418.427V373.827H349.72V466.986H303.13Z"
+ fill="white"
+ />
+ </g>
+ <defs>
+ <clipPath id="clip0_1_2">
+ <rect width="512" height="512" fill="white" />
+ </clipPath>
+ </defs>
+ </svg>
+ <h1 className="bg-gradient-to-r from-[#3178c6] dark:from-[#3178c6] from-30% to-black bg-clip-text text-7xl font-black text-transparent dark:to-white md:text-8xl">
+ type
+ <br />
+ hero
+ </h1>
+ </div>
+ <p className="max-w-[50ch] bg-transparent leading-9 text-black/50 dark:text-white/50">
+ Connect, collaborate, and grow with a community of TypeScript developers. Elevate your skills trough interactive coding challenges, discussions, and knowledge sharing
+ {/* Connect and collaborate with a community of TypeScript developers on Type Hero.
+ Engage in discussions, create challenges, and share insights with fellow typescript
+ enthusiasts. Type Hero has collaborative coding challenges that foster a supportive and
+ inspiring environment, where you can learn from others and showcase your expertise. */}
+ </p>
+ <div className="flex gap-5">
+ <button className="dark:bg-white bg-black text-background py-2 px-4 rounded-xl">Explore Challenges</button>
+ <button className="border-2 py-2 px-4 rounded-xl flex items-center gap-2">
+ <Github className="h-4 w-4" />
+ Github
+ </button>
+ </div>
+ </div>
+
+
+ <div className="relative md:block hidden rounded-full w-full h-3/4">
+ <div
+ className="movingbackground absolute -z-30 -inset-40 top-1/2 -translate-y-1/2 rounded-full aspect-square shadow-[inset_0_0_5rem_5rem] shadow-background"
+ style={{
+ backgroundSize: '3.5rem 3.5rem',
+ backgroundImage: 'linear-gradient(to right, #8888 1px, transparent 1px), linear-gradient(to bottom, #8888 1px, transparent 1px)',
+ }}
+ >
+
+ </div>
+ <div className="relative mx-auto w-4/5 h-full">
+ <FakeChallengeCard />
+ </div>
+ </div>
+ </div>
+)
+export default Hero
\ No newline at end of file
diff --git a/src/styles/globals.css b/src/styles/globals.css
index 45442a7e..a2bbd857 100644
--- a/src/styles/globals.css
+++ b/src/styles/globals.css
@@ -146,3 +146,16 @@ main {
.custom-scrollable-element::-webkit-scrollbar {
width: 0;
}
+
+.movingbackground {
+ animation: movingbackground 60s linear infinite !important;
+}
+
+@keyframes movingbackground {
+ 0% {
+ background-position: 0 0;
+ }
+ 100% {
+ background-position: 100% 0;
+ }
+}
\ No newline at end of file
diff --git a/tailwind.config.ts b/tailwind.config.ts
index c183f94f..e1d2d6d7 100644
--- a/tailwind.config.ts
+++ b/tailwind.config.ts
@@ -10,7 +10,8 @@ module.exports = {
center: true,
padding: '1rem',
screens: {
- '2xl': '1400px',
+ '2xl': '1200px',
+ // was 1400
},
},
extend: {