Connect, collaborate, and grow with a community of TypeScript developers
footer on landing page, resolves #98 (#120)
PickleNikc9b15808f230
diff --git a/src/app/page.tsx b/src/app/page.tsxindex 15cf7d0d..49101c48 100644--- a/src/app/page.tsx+++ b/src/app/page.tsx@@ -1,6 +1,27 @@+'use client';+import Head from 'next/head';+import { useRef, useEffect } from 'react';+import { Footsies } from '~/components/ui/footsies';export default function Index() {+ // cursor blob+ const blobRef = useRef<HTMLDivElement | null>(null);+ useEffect(() => {+ const blob = document.getElementById('cursorthing') as HTMLDivElement;+ blobRef.current = blob;+ window.addEventListener('mousemove', moveBlob);+ function moveBlob(e: MouseEvent) {+ blob.style.translate = `${e.clientX - blob.clientWidth / 2}px ${+ e.clientY - blob.clientHeight / 2+ }px`;+ }++ return () => {+ window.removeEventListener('mousemove', moveBlob);+ };+ }, []);+return (<><Head>@@ -12,23 +33,34 @@ export default function Index() {<link rel="icon" href="/favicon.svg" type="image/svg+xml" /></Head><div- className="relative flex flex-col items-center justify-center gap-4 overflow-hidden px-4"+ className="relative mb-[56px] flex flex-col items-center justify-center gap-4 overflow-x-hidden overflow-y-visible px-4"style={{ minHeight: 'calc(100dvh - 112px)' }}>- <div className="absolute left-1/2 top-1/2 -z-10 h-96 w-96 -translate-x-[30%] -translate-y-[69%] rounded-full bg-black/0 blur-3xl dark:bg-white/20"></div>- <div className="absolute right-1/2 top-1/2 -z-10 h-96 w-96 -translate-y-[69%] translate-x-[30%] rounded-full bg-[#3178c6]/0 blur-3xl dark:bg-[#3178c6]/20"></div>- <h1 className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text text-center text-9xl font-black text-transparent dark:to-white ">+ <div+ id="leftBall"+ className="absolute left-1/2 top-1/2 -z-10 h-64 w-64 -translate-x-[30%] -translate-y-[69%] rounded-full bg-black/0 blur-3xl dark:bg-white/20 lg:h-96 lg:w-96"+ ></div>+ <div+ id="riteBall"+ className="absolute right-1/2 top-1/2 -z-10 h-64 w-64 -translate-y-[69%] translate-x-[30%] rounded-full bg-[#3178c6]/0 blur-3xl dark:bg-[#3178c6]/20 lg:h-96 lg:w-96"+ ></div>+ <div+ id="cursorthing"+ className="pointer-events-none fixed left-0 top-0 z-10 h-20 w-20 rounded-full border border-neutral-400 duration-75 ease-out dark:border-neutral-700"+ />+ <h1 className="bg-gradient-to-r from-[#3178c6] to-black bg-clip-text text-center text-9xl font-black text-transparent dark:to-white">Type<br />Hero</h1>- <p className="font-bold">Challenge. Learn. Excel.</p>+ <p className="font-bold">💪 Challenge 🧠 Learn 📈 Excel</p>- <p className="max-w-[40ch] text-center text-black/50 dark:text-white/50">- Lorem ipsum dolor sit amet consectetur, adipisicing elit. Debitis ullam quia vitae culpa- illum libero dignissimos, voluptas eius molestiae ipsum!+ <p className="max-w-[40ch] text-center text-neutral-400 dark:text-neutral-600">+ Unlock the power of strong typing and seamless JavaScript integration on our immersive+ learning platform designed for developers of all levels</p></div>+ <Footsies /></>);}diff --git a/src/components/ui/footsies.tsx b/src/components/ui/footsies.tsxnew file mode 100644index 00000000..b672941a--- /dev/null+++ b/src/components/ui/footsies.tsx@@ -0,0 +1,28 @@+'use client';++export function Footsies() {+ return (+ <footer className="flex flex-col items-center text-sm font-light text-neutral-400 dark:text-neutral-700">+ {/* squiggly divider line */}+ <svg+ aria-hidden="true"+ width="100%"+ height="8"+ fill="none"+ xmlns="http://www.w3.org/2000/svg"+ >+ <pattern id="a" width="91" height="8" patternUnits="userSpaceOnUse">+ <g clip-path="url(#clip0_2426_11367)">+ <path+ d="M114 4c-5.067 4.667-10.133 4.667-15.2 0S88.667-.667 83.6 4 73.467 8.667 68.4 4 58.267-.667 53.2 4 43.067 8.667 38 4 27.867-.667 22.8 4 12.667 8.667 7.6 4-2.533-.667-7.6 4s-10.133 4.667-15.2 0S-32.933-.667-38 4s-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0-10.133-4.667-15.2 0-10.133 4.667-15.2 0"+ stroke-linecap="square"+ className="stroke-neutral-400 dark:stroke-neutral-700"+ />+ </g>+ </pattern>+ <rect width="100%" height="100%" fill="url(#a)" />+ </svg>+ <div className="my-12">© 2069 Type Hero</div>+ </footer>+ );+}diff --git a/src/styles/globals.css b/src/styles/globals.cssindex 442f5e24..511ab9b5 100644--- a/src/styles/globals.css+++ b/src/styles/globals.css@@ -85,3 +85,26 @@ body,main {height: 100%;}++#leftBall {+ animation: balls 5s linear infinite alternate;+}++#riteBall {+ animation: balls 5s linear infinite alternate;+}++@keyframes balls {+ from {+ opacity: 1;+ }+ to {+ opacity: 0;+ }+}++@media (pointer: coarse) {+ #cursorthing {+ display: none;+ }+}