The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: remove grid and keep pulses
Francesco Sansalvadore55c80886fb35
diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex dc60ac2bee6..17ecd6a2192 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -7,72 +7,63 @@ import { Button, IconBookOpen } from 'ui'import SectionContainer from '~/components/Layouts/SectionContainer'import HeroBackground from './HeroBackground'import FrontendFrameworks from './FrontendFrameworks'-import { useState } from 'react'const Hero = () => {const router = useRouter()const telemetryProps = useTelemetryProps()- const [showGrid, setShowGrid] = useState(true)const sendTelemetryEvent = async (event: TelemetryEvent) => {await Telemetry.sendEvent(event, telemetryProps, router)}return (- <>- <div className="absolute top-20 right-4 z-10">- <button onClick={() => setShowGrid((prev) => !prev)} className="text-scale-8 text-sm">- Toggle grid- </button>- </div>- <div className="relative">- <SectionContainer className="py-12 md:py-16 lg:py-20">- <div className="relative">- <div className="mx-auto">- <div className="mx-auto max-w-2xl lg:col-span-6 lg:flex lg:items-center justify-center text-center">- <div className="lg:h-[50vh] lg:min-h-[300px] lg:max-h-[450px] flex flex-col items-center justify-center sm:mx-auto md:w-3/4 lg:mx-0 lg:w-full gap-4 lg:gap-8">- <div>- <h1- className="+ <div className="relative">+ <SectionContainer className="py-12 md:py-16 lg:py-20">+ <div className="relative">+ <div className="mx-auto">+ <div className="mx-auto max-w-2xl lg:col-span-6 lg:flex lg:items-center justify-center text-center">+ <div className="lg:h-[50vh] lg:min-h-[300px] lg:max-h-[450px] flex flex-col items-center justify-center sm:mx-auto md:w-3/4 lg:mx-0 lg:w-full gap-4 lg:gap-8">+ <div>+ <h1+ className="text-scale-1200text-3xl sm:text-5xl sm:leading-none lg:text-6xlxl:text-7xl"- >- <span className="block">Build in a weekend</span>- <span className="text-transparent bg-clip-text bg-gradient-to-br from-[#3ECF8E] via-[#3ECF8E] to-[#3E9BCF] block md:ml-0">- Scale to millions- </span>- </h1>- <p className="pt-2 text-scale-1200 !mb-0 mt-1.5 text-sm sm:mt-5 sm:text-base lg:text-lg">- Supabase is an open source Firebase alternative for building secure and- performant Postgres backends with minimal configuration.- </p>- </div>- <div className="flex items-center gap-2">- <Link href="https://app.supabase.com" as="https://app.supabase.com" passHref>- <a onClick={() => sendTelemetryEvent(gaEvents['www_hp_hero_startProject'])}>- <Button size="small" className="text-white">- Start your project- </Button>- </a>- </Link>- <Link href="/docs" as="/docs" passHref>- <a onClick={() => sendTelemetryEvent(gaEvents['www_hp_hero_documentation'])}>- <Button size="small" type="default" icon={<IconBookOpen />}>- Documentation- </Button>- </a>- </Link>- </div>- <FrontendFrameworks className="mt-4 lg:mt-6" />+ >+ <span className="block">Build in a weekend</span>+ <span className="text-transparent bg-clip-text bg-gradient-to-br from-[#3ECF8E] via-[#3ECF8E] to-[#3E9BCF] block md:ml-0">+ Scale to millions+ </span>+ </h1>+ <p className="pt-2 text-scale-1200 !mb-0 mt-1.5 text-sm sm:mt-5 sm:text-base lg:text-lg">+ Supabase is an open source Firebase alternative for building secure and+ performant Postgres backends with minimal configuration.+ </p></div>+ <div className="flex items-center gap-2">+ <Link href="https://app.supabase.com" as="https://app.supabase.com" passHref>+ <a onClick={() => sendTelemetryEvent(gaEvents['www_hp_hero_startProject'])}>+ <Button size="small" className="text-white">+ Start your project+ </Button>+ </a>+ </Link>+ <Link href="/docs" as="/docs" passHref>+ <a onClick={() => sendTelemetryEvent(gaEvents['www_hp_hero_documentation'])}>+ <Button size="small" type="default" icon={<IconBookOpen />}>+ Documentation+ </Button>+ </a>+ </Link>+ </div>+ <FrontendFrameworks className="mt-4 lg:mt-6" /></div></div></div>- </SectionContainer>- <HeroBackground showGrid={showGrid} />- </div>- </>+ </div>+ </SectionContainer>+ <HeroBackground />+ </div>)}diff --git a/apps/www/components/Hero/HeroBackground.tsx b/apps/www/components/Hero/HeroBackground.tsxindex dfa0d6be91a..22a2a113a64 100644--- a/apps/www/components/Hero/HeroBackground.tsx+++ b/apps/www/components/Hero/HeroBackground.tsx@@ -4,7 +4,7 @@ import styles from './hero.module.css'const HeroGrid = dynamic(() => import('./HeroGrid'))-const HeroBackground = ({ showGrid }: any) => (+const HeroBackground = () => (<><divclassName={[@@ -22,7 +22,7 @@ const HeroBackground = ({ showGrid }: any) => (><div className={['w-full h-full opacity-30 dark:opacity-60', styles['gradient']].join(' ')} /><div className="absolute bottom-0 z-[-2] w-full h-full bg-gradient-to-t from-scale-100 to-transparent" />- {showGrid && <HeroGrid />}+ <HeroGrid /></div></>)diff --git a/apps/www/components/Hero/HeroGrid.tsx b/apps/www/components/Hero/HeroGrid.tsxindex b83bd438a1a..23ef03c8fdd 100644--- a/apps/www/components/Hero/HeroGrid.tsx+++ b/apps/www/components/Hero/HeroGrid.tsx@@ -19,6 +19,13 @@ const HeroGrid = () => {strokeWidth: 1,}+ const pulseAnimation = {+ x2: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],+ x1: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],+ y1: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 3, 0],+ y2: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 2, 0],+ }+const GridSVG = () => (<svgpreserveAspectRatio="none"@@ -28,132 +35,83 @@ const HeroGrid = () => {fill="none"xmlns="http://www.w3.org/2000/svg">- {[...new Array(svgGridOptions.yLines)].map((_: any, i: number) => {- const y = (svgGridOptions.boxWidth * i) / svgGridOptions.yLines- return (+ {[...new Array(svgGridOptions.xLines)].map((_: any, i: number) => {+ const x = (svgGridOptions.boxHeight * i) / svgGridOptions.xLines++ const AnimatedLine = ({ name }: { name: string }) => (<line- key={`y-${i}`}- x1={svgGridOptions.boxHeight}- y1={y}- x2="0"- y2={y}- stroke={svgGridOptions.color}- strokeWidth={svgGridOptions.strokeWidth}+ x1={x}+ y1={svgGridOptions.boxWidth}+ x2={x}+ y2="0"+ stroke={`url(#${name})`}+ strokeLinecap="round"+ strokeWidth={isSm ? 3 : 6}shapeRendering="crispEdges"/>)- })}- {[...new Array(svgGridOptions.xLines)].map((_: any, i: number) => {- const x = (svgGridOptions.boxHeight * i) / svgGridOptions.xLines- return (- <>- <line- key={`x-${i}`}- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke={svgGridOptions.color}- strokeWidth={svgGridOptions.strokeWidth}- shapeRendering="crispEdges"- />- {isSm- ? i === 9 && (- <line- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke="url(#electric-pulse)"- strokeLinecap="round"- strokeWidth={4}- shapeRendering="crispEdges"- />- )- : i === 25 && (- <line- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke="url(#electric-pulse)"- strokeLinecap="round"- strokeWidth={4}- shapeRendering="crispEdges"- />- )}- {isSm- ? i === 14 && (- <line- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke="url(#electric-pulse-2)"- strokeLinecap="round"- strokeWidth={4}- shapeRendering="crispEdges"- />- )- : i === 33 && (- <line- x1={x}- y1={svgGridOptions.boxWidth}- x2={x}- y2="0"- stroke="url(#electric-pulse-2)"- strokeLinecap="round"- strokeWidth={4}- shapeRendering="crispEdges"- />- )}- </>- )++ const getMobileLines: () => string = () => {+ switch (i) {+ case 9:+ return 'electric-pulse'+ case 14:+ return 'electric-pulse-2'+ case 17:+ return 'electric-pulse-3'+ case 12:+ return 'electric-pulse-4'+ default:+ return ''+ }+ }+ const getDesktopLines: () => string = () => {+ switch (i) {+ case 25:+ return 'electric-pulse'+ case 33:+ return 'electric-pulse-2'+ case 22:+ return 'electric-pulse-3'+ case 30:+ return 'electric-pulse-4'+ case 36:+ return 'electric-pulse-5'+ default:+ return ''+ }+ }++ return <AnimatedLine name={isSm ? getMobileLines() : getDesktopLines()} />})}<defs>- <motion.linearGradient- animate={{- x2: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- x1: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- y1: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 3, 0],- y2: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 2, 0],- }}- transition={{- duration: isSm ? 4 : 5,- repeat: Infinity,- ease: 'linear',- }}- id="electric-pulse"- gradientUnits="userSpaceOnUse"- >- <stop stopColor={svgGridOptions.color} stopOpacity="0" />- <stop stopColor={svgGridOptions.color} stopOpacity="0.8" />- <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />- </motion.linearGradient>- <motion.linearGradient- animate={{- x2: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- x1: [svgGridOptions.boxWidth / 2, 0, svgGridOptions.boxWidth / 2],- y1: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 3, 0],- y2: [svgGridOptions.boxHeight, svgGridOptions.boxHeight / 2, 0],- }}- transition={{- duration: isSm ? 4 : 5,- repeat: Infinity,- ease: 'linear',- delay: 2,- }}- id="electric-pulse-2"- gradientUnits="userSpaceOnUse"- >- <stop stopColor={svgGridOptions.color} stopOpacity="0" />- <stop stopColor={svgGridOptions.color} stopOpacity="0.8" />- <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />- </motion.linearGradient>+ <MotionLinearGradient name="electric-pulse" delay={0} />+ <MotionLinearGradient name="electric-pulse-2" delay={2} />+ <MotionLinearGradient name="electric-pulse-3" delay={4} />+ <MotionLinearGradient name="electric-pulse-4" delay={5} />+ <MotionLinearGradient name="electric-pulse-5" delay={6} /></defs></svg>)+ const MotionLinearGradient = ({ name, delay }: { name: string; delay: number }) => (+ <motion.linearGradient+ animate={pulseAnimation}+ transition={{+ duration: isSm ? 4 : 5,+ repeat: Infinity,+ ease: 'linear',+ delay: delay,+ }}+ id={name}+ gradientUnits="userSpaceOnUse"+ >+ <stop stopColor={svgGridOptions.color} stopOpacity="0" />+ <stop stopColor={svgGridOptions.color} stopOpacity="1" />+ <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />+ </motion.linearGradient>+ )+return (<divclassName={[@@ -162,7 +120,7 @@ const HeroGrid = () => {><divstyle={{- transform: 'rotateX(85deg)',+ transform: 'rotateX(86deg)',position: 'absolute',top: 0,bottom: 0,