Connect, collaborate, and grow with a community of TypeScript developers
eye candy (#322)
PickleNik227886f0394f
diff --git a/src/assets/images/waitlist-bg-blurbed.png b/src/assets/images/waitlist-bg-blurbed.pngnew file mode 100644index 00000000..15ad572eBinary files /dev/null and b/src/assets/images/waitlist-bg-blurbed.png differdiff --git a/src/assets/images/waitlist-bg.png b/src/assets/images/waitlist-bg.pngnew file mode 100644index 00000000..c6c9b0efBinary files /dev/null and b/src/assets/images/waitlist-bg.png differdiff --git a/src/components/challenge/challenge-layout.tsx b/src/components/challenge/challenge-layout.tsxindex adb836ad..65231b22 100644--- a/src/components/challenge/challenge-layout.tsx+++ b/src/components/challenge/challenge-layout.tsx@@ -50,10 +50,10 @@ export function ChallengeLayout({ left, right, skeleton = false }: ChallengeLayoconst parentRef = parent.current as HTMLDivElement;if (skeleton) {- parentRef.classList.remove('opacity-0');window.innerWidth > 1025? (leftRef.style.width = settings.width): (leftRef.style.height = settings.height);+ parentRef.classList.remove('opacity-0');return;}diff --git a/src/components/landing/community/community.tsx b/src/components/landing/community/community.tsxindex 46b85899..d412f22b 100644--- a/src/components/landing/community/community.tsx+++ b/src/components/landing/community/community.tsx@@ -1,3 +1,4 @@+'use client';// eslint-disable-next-line no-restricted-importsimport { contributors } from '../../../../public/contributors';@@ -5,21 +6,56 @@ import { GitBranch } from 'lucide-react';import styles from '~/components/landing/community/community.module.css';import { clsx } from 'clsx';-import { type CSSProperties } from 'react';+import { useRef, type CSSProperties, useState, useEffect } from 'react';-const Community = async function () {+const Community = function () {type WrapperStyle = CSSProperties & {'--bottom': string;};+ const lamp = useRef<HTMLDivElement>(null);+ const [isVisible, setIsVisible] = useState(false);++ useEffect(() => {+ const observer = new IntersectionObserver(+ (entries) => {+ entries.forEach((entry) => {+ // If the element is intersecting (in view)+ if (entry.isIntersecting) {+ setIsVisible(true);+ // observer.unobserve(entry.target);+ } else {+ setIsVisible(false);+ }+ });+ },+ {+ root: null,+ rootMargin: '0px',+ threshold: 0.1, // Adjust the threshold as per your requirement+ },+ );++ if (lamp.current) {+ observer.observe(lamp.current);+ }++ // Cleanup observer when the component unmounts+ return () => observer.disconnect();+ }, []);+return (<><div className="containerthing -z-10 flex rotate-180 opacity-50 dark:opacity-100"><div- className="thething translate-z-0 translate-y-[-200px] rotate-180 scale-[2] duration-1000"+ ref={lamp}+ className={clsx(+ { 'scale-[3] md:scale-[2] 2xl:scale-[1.75]': isVisible },+ 'thething translate-z-0 translate-y-[-180px] rotate-180 scale-50 animate-none duration-1000',+ )}style={{- '--bottom': 'hsl(211,60%,48%)',+ '--bottom': '#4188e6',} as WrapperStyle}></div>@@ -27,7 +63,7 @@ const Community = async function () {{/* backdrop styles don't apply for the last pixel row of the elment for some reason no there's p and m offsets*/}<section className={clsx(styles.backdrop, 'relative -mb-[1px] pb-[1px]')}><div className="backdrop-blur-md">- <div className="container flex flex-col justify-center pt-[128px] md:pb-[128px] lg:flex-row lg:items-center">+ <div className="container flex flex-col justify-center pt-[128px] lg:flex-row lg:items-center lg:pb-[148px]"><div className="flex flex-1 flex-col items-center gap-6 pb-36 lg:items-start lg:pb-0"><div className="rounded-full bg-gradient-to-r from-[#31bdc6] to-[#3178c6] p-[1px] brightness-90 contrast-150 dark:brightness-125 dark:contrast-100"><div className="rounded-full bg-white/80 px-3 py-1 dark:bg-black/80">diff --git a/src/components/landing/hero.tsx b/src/components/landing/hero.tsxindex 9962e796..8f4d716c 100644--- a/src/components/landing/hero.tsx+++ b/src/components/landing/hero.tsx@@ -66,7 +66,7 @@ const Hero = () => (asChild><Link href="/waitlist">- <span className="inline-flex h-full w-fit items-center gap-1 rounded-xl bg-neutral-100 px-4 py-2 text-[#3178c6] transition-all duration-300 group-hover:bg-white">+ <span className="inline-flex h-full w-fit items-center gap-1 rounded-xl bg-white px-4 py-2 text-[#3178c6] transition-all duration-300"><Mail className="mr-1 h-4 w-4 stroke-[3]" />Join the Waitlist</span>diff --git a/src/components/landing/waitlist/banner.tsx b/src/components/landing/waitlist/banner.tsxindex 35386779..d2027c85 100644--- a/src/components/landing/waitlist/banner.tsx+++ b/src/components/landing/waitlist/banner.tsx@@ -11,8 +11,8 @@ const Waitlist = () => {return (<section className={clsx(styles.backdrop, 'relative overflow-hidden')}><div className="container relative grid grid-cols-1 items-center justify-center py-[64px] md:grid-cols-2">- <div className="flex flex-col gap-8 pb-4 pt-48 sm:px-16 sm:pt-24 md:px-0 md:pt-16">- <h1 className="text-4xl font-bold">+ <div className="flex flex-col gap-8 pb-8 pt-48 sm:px-16 sm:pt-20 md:px-0 md:pb-0 md:pt-16">+ <h1 className="max-w-[13ch] text-4xl font-bold md:max-w-none"><Balancer>Early birds get the perks</Balancer></h1><p className="leading-8 text-black/50 dark:text-white/50">diff --git a/src/components/landing/waitlist/index.tsx b/src/components/landing/waitlist/index.tsxindex 9d9d0d1b..503fe8e9 100644--- a/src/components/landing/waitlist/index.tsx+++ b/src/components/landing/waitlist/index.tsx@@ -1,4 +1,3 @@-import { clsx } from 'clsx';import { Balancer } from 'react-wrap-balancer';import WaitlistForm from '~/components/landing/waitlist/waitlist-form';@@ -6,22 +5,24 @@ import styles from '~/components/landing/waitlist/waitlist.module.css';export default function WaitlistPage() {return (- <main>- <div className="absolute left-0 top-0 -z-10 h-full w-full">- <div className={clsx(styles.waitlistBackground)} />- </div>- <div className="container h-full pt-16">- <div className="mx-auto flex max-w-[700px] flex-col items-center justify-center gap-6 text-center">+ <main className="relative min-h-[calc(100vh-56px)] sm:px-16 md:px-0">+ <div className={`${styles.waitlistBackground} fixed left-0 top-0 -z-10 h-full w-full`} />+ {/* NOTE: pls dont chang percentages, it's cursed */}+ <div+ className={`${styles.mybg} fixed -bottom-[64px] left-1/2 -z-10 h-[69%] w-[150%] -translate-x-1/2 opacity-20 sm:opacity-30`}+ />+ <div className="container grid h-full place-items-center">+ <div className="mx-auto flex max-w-[700px] flex-col items-center justify-center gap-8 text-center"><h1 className="text-3xl font-bold text-neutral-950 dark:text-neutral-50 md:text-5xl"><Balancer>- Join the waitlist and be part of the{' '}- <span className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text font-black text-transparent dark:to-white">+ Join the waitlist to be part of the{' '}+ <span className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text font-black text-transparent dark:from-blue-400 dark:to-emerald-400">TypeHero</span>{' '}community</Balancer></h1>- <p className="leading-loose text-zinc-600 dark:text-zinc-300">+ <p className="leading-8 text-black/50 dark:text-white/50"><Balancer>By signing up to the waitlist you will be among the first to know when we launch andgetting early accessdiff --git a/src/components/landing/waitlist/waitlist-form.tsx b/src/components/landing/waitlist/waitlist-form.tsxindex 5e7c19db..786c08e1 100644--- a/src/components/landing/waitlist/waitlist-form.tsx+++ b/src/components/landing/waitlist/waitlist-form.tsx@@ -52,7 +52,7 @@ export default function WaitlistForm() {}return (- <div className="w-full py-4 md:w-[350px]">+ <div className="w-full md:w-[350px]"><Form {...form}><form onSubmit={form.handleSubmit(onSubmit)} className="flex flex-col gap-4"><FormField@@ -63,8 +63,9 @@ export default function WaitlistForm() {<FormControl><InputclassName={clsx({- 'border border-red-600 dark:border-red-400': form.formState.errors.name,- 'border-zinc-300 bg-neutral-50 dark:border-zinc-700 dark:bg-neutral-950':+ 'rounded-xl border border-red-600 bg-white/50 backdrop-blur-md dark:border-red-400 dark:bg-neutral-950/50':+ form.formState.errors.name,+ 'rounded-xl border-black/30 bg-white/20 backdrop-blur-md dark:border-white/30 dark:bg-neutral-950/20':!form.formState.errors.name,})}{...field}@@ -85,8 +86,9 @@ export default function WaitlistForm() {<FormControl><InputclassName={clsx({- 'border border-red-600 dark:border-red-400': form.formState.errors.email,- 'border-zinc-300 bg-neutral-50 dark:border-zinc-700 dark:bg-neutral-950':+ 'rounded-xl border border-red-600 bg-white/50 backdrop-blur-md dark:border-red-400 dark:bg-neutral-950/50':+ form.formState.errors.email,+ 'rounded-xl border-black/30 bg-white/20 backdrop-blur-md dark:border-white/30 dark:bg-neutral-950/20':!form.formState.errors.email,})}{...field}@@ -108,19 +110,28 @@ export default function WaitlistForm() {<FormControl><SelectTriggerclassName={clsx({- 'border border-red-600 dark:border-red-400':+ 'rounded-xl border border-red-600 bg-white/50 backdrop-blur-md dark:border-red-400 dark:bg-neutral-950/50':form.formState.errors.intention,- 'border-zinc-300 bg-neutral-50 dark:border-zinc-700 dark:bg-neutral-950':+ 'rounded-xl border-black/30 bg-white/20 backdrop-blur-md dark:border-white/30 dark:bg-neutral-950/20':!form.formState.errors.intention,})}><SelectValue placeholder="Why are you interested in TypeHero?" /></SelectTrigger></FormControl>- <SelectContent>- <SelectItem value="user">I want to solve type challenges</SelectItem>- <SelectItem value="builder">I want to build type challenges</SelectItem>- <SelectItem value="both">Both</SelectItem>+ <SelectContent className="rounded-xl bg-white/50 backdrop-blur-md dark:bg-black/50">+ <SelectItem className="cursor-pointer rounded-lg brightness-200" value="user">+ I want to solve type challenges+ </SelectItem>+ <SelectItem+ className="cursor-pointer rounded-lg brightness-200"+ value="builder"+ >+ I want to build type challenges+ </SelectItem>+ <SelectItem className="cursor-pointer rounded-lg brightness-200" value="both">+ Both+ </SelectItem></SelectContent></Select></FormItem>@@ -130,9 +141,9 @@ export default function WaitlistForm() {<Buttontype="submit"disabled={isSubmitting}- className="font-boldtransition-shadow group relative w-full overflow-hidden rounded-xl bg-gradient-to-bl from-blue-400 to-emerald-400 px-[2px] py-[2px] duration-200"+ className="wl-form-button group relative w-full overflow-hidden rounded-xl px-[2px] py-[2px] font-bold transition-shadow duration-300 hover:shadow-[0_0.5rem_2rem_-0.75rem_#3178c6] dark:hover:shadow-[0_0.5rem_2rem_-0.75rem_#5198f6]">- <span className="h-full w-full rounded-[10px] bg-white px-4 py-2 text-center font-bold text-black transition-colors duration-200 group-hover:bg-neutral-100 dark:bg-black dark:text-white group-hover:dark:bg-neutral-900">+ <span className="h-full w-full rounded-[10px] bg-white px-4 py-2 text-center font-bold text-black transition-colors duration-300 group-hover:bg-blue-100 dark:bg-black dark:text-white group-hover:dark:bg-cyan-950">{isSubmitting ? 'Submitting...' : 'Join the waitlist'}</span></Button>diff --git a/src/components/landing/waitlist/waitlist.module.css b/src/components/landing/waitlist/waitlist.module.cssindex 86e1a4dc..6f208741 100644--- a/src/components/landing/waitlist/waitlist.module.css+++ b/src/components/landing/waitlist/waitlist.module.css@@ -1,8 +1,6 @@/* The module for the Waitlist page background */.waitlistBackground {- position: relative;top: -56px;- min-height: calc(100vh - 56px);background: linear-gradient(0deg, hsl(var(--background)) 0%, rgba(9, 9, 11, 0) 100%),linear-gradient(270deg,@@ -18,6 +16,14 @@);}+.mybg {+ background: url('../../../assets/images/waitlist-bg.png');+ background-position-y: 33%;+ background-position-x: center;+ background-repeat: no-repeat;+ background-size: 100% 200%;+}+/* The module for the background of the banner on the landing page */.backdrop {background: linear-gradient(diff --git a/src/components/ui/footsies.tsx b/src/components/ui/footsies.tsxindex a71e56df..c807a2ff 100644--- a/src/components/ui/footsies.tsx+++ b/src/components/ui/footsies.tsx@@ -3,7 +3,7 @@ import { Binary } from 'lucide-react';export function Footsies() {return (- <footer className="flex flex-col items-center text-sm font-light">+ <footer className="flex flex-col items-center text-sm font-light sm:px-16 md:px-0"><div className="container my-4 flex flex-col justify-between gap-6 px-10 pb-2 md:my-12 lg:flex-row"><div className="space-x-2">Built with <Binary className="inline-block h-5 w-5 text-[#31bdc6]" /> by the Trash Devsdiff --git a/src/components/ui/navigation-menu.tsx b/src/components/ui/navigation-menu.tsxindex 502c42eb..b6433ab0 100644--- a/src/components/ui/navigation-menu.tsx+++ b/src/components/ui/navigation-menu.tsx@@ -36,7 +36,7 @@ NavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName;const NavigationMenuItem = NavigationMenuPrimitive.Item;const navigationMenuTriggerStyle = cva(- 'inline-flex items-center justify-center rounded-xl text-sm font-medium transition-colors focus:outline-none focus:bg-accent focus:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none bg-background hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 h-10 py-2 px-4 group w-max',+ 'inline-flex items-center justify-center rounded-xl text-sm font-medium transition-colors focus:outline-none focus:bg-accent focus:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none bg-transparent hover:bg-accent hover:text-accent-foreground data-[state=open]:bg-accent/50 data-[active]:bg-accent/50 h-10 py-2 px-4 group w-max',);const NavigationMenuTrigger = React.forwardRef<diff --git a/src/styles/globals.css b/src/styles/globals.cssindex b2f221e9..8eaf6679 100644--- a/src/styles/globals.css+++ b/src/styles/globals.css@@ -225,10 +225,10 @@ main {.hero-join-button {background: linear-gradient(var(--gradient-angle),- hsla(211, 60%, 48%, 0.5),- hsla(211, 60%, 48%, 0.1),+ hsla(211, 60%, 48%, 0.7),+ hsla(211, 60%, 48%, 0.3),#3178c6,- hsla(211, 60%, 48%, 0.3)+ hsla(211, 60%, 48%, 0.5));animation: gradient-rotate 5s linear infinite reverse;}@@ -244,6 +244,11 @@ main {animation: gradient-rotate 5s linear infinite reverse;}+.wl-form-button {+ background: linear-gradient(var(--gradient-angle), #34d399, #60a5fa, #ff88ff, #ff8844);+ animation: gradient-rotate 5s linear infinite reverse;+}+@keyframes gradient-rotate {0% {--gradient-angle: 360deg;@@ -292,41 +297,26 @@ main {opacity: 1;transform-origin: center center;background-repeat: no-repeat;- /* animation: glitchy-blink 5s linear infinite; */+ animation: plink 15s ease infinite;}-@keyframes glitchy-blink {+@keyframes plink {0% {opacity: 1;}- 49% {- opacity: 1;- }- 60% {+ 69% {opacity: 1;}- 62% {- opacity: 0.7;- }- 63% {- opacity: 0.9;- }- 64% {- opacity: 0.3;- }70% {- opacity: 1;+ opacity: 0.7;}71% {- opacity: 0;- }- 73% {- opacity: 0.5;+ opacity: 1;}- 74% {- opacity: 0;+ 72% {+ opacity: 0.3;}- 75% {+ 80% {opacity: 1;}100% {