The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: add links and finish product cards
Francesco Sansalvadoreb5b87cc7c2b6
diff --git a/apps/www/components/Features/index.tsx b/apps/www/components/Features/index.tsxindex 099c919d0e5..a4a4f5fcccb 100644--- a/apps/www/components/Features/index.tsx+++ b/apps/www/components/Features/index.tsx@@ -1,10 +1,12 @@import Solutions from 'data/Solutions.json'import Telemetry from '~/lib/telemetry'import gaEvents from '~/lib/gaEvents'-import SectionContainer from '../Layouts/SectionContainer'import { useTelemetryProps } from 'common/hooks/useTelemetryProps'import { useRouter } from 'next/router'+import Link from 'next/link'import Image from 'next/image'+import SectionContainer from '../Layouts/SectionContainer'+import { motion } from 'framer-motion'const Card = ({classname,@@ -12,33 +14,48 @@ const Card = ({subtitle,image,onClick,+ url,}: {title: stringsubtitle: string+ url: stringimage: anyonClick: anyclassname?: string}) => (- <div- className={[- 'col-span-1 lg:col-span-4 h-[460px] flex flex-col gap-5 lg:flex-row',- classname,- ].join(' ')}- onClick={onClick}- >- <div- className={`relative overflow-hidden group/2 flex-1 flex flex-col items-center gap-5 lg:items-start justify-between bg-scale-100- w-full border border-[#232323] rounded-xl h-full px-2 sm:px-6 py-12 shadow-lg`}+ <Link href={url}>+ <a+ className={[+ 'relative col-span-1 lg:col-span-4 h-[460px] flex flex-col gap-5 lg:flex-row',+ classname,+ ].join(' ')}+ onClick={onClick}>- <div className="relative z-10 flex flex-col items-center mx-auto max-w-xs text-center gap-2 text-white">- <h3 className="xs:text-2xl text-xl">{title}</h3>- <p className="text-sm sm:text-base text-scale-1100">{subtitle}</p>- </div>- {image}- </div>- </div>+ <motion.div+ className={`relative overflow-hidden group/2 flex-1 flex flex-col items-center gap-5 lg:items-start justify-between bg-scale-100+ w-full border border-[#232323] rounded-xl h-full px-2 sm:px-6 py-12 shadow-lg`}+ initial="default"+ animate="default"+ whileHover="hover"+ >+ <div className="relative z-10 flex flex-col items-center mx-auto max-w-xs text-center gap-2 text-white">+ <h3 className="xs:text-2xl text-xl">{title}</h3>+ <p className="text-sm lg:text-base text-scale-1100">{subtitle}</p>+ </div>+ {image}+ </motion.div>+ </a>+ </Link>)+const opacityVariant = {+ default: { opacity: 0 },+ hover: {+ opacity: 1,+ transition: { duration: 0.2 },+ },+}+const Features = () => {const router = useRouter()const telemetryProps = useTelemetryProps()@@ -82,13 +99,25 @@ const Features = () => {<SectionContainer className="space-y-8 max-w-7xl pb-0 pt-16 md:!pt-0"><dl className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-6 lg:grid-cols-6"><Card+ url={Solutions['database'].url}title={'PostgreSQL Database'}subtitle="Every project is a full Postgres database, the world's most trusted relational database."onClick={() => sendTelemetryEvent(name)}image={<div className="absolute inset-0 z-0">+ <motion.div className="absolute inset-0 z-10" variants={opacityVariant}>+ <Image+ src="/images/index/database-dark-hover.jpg"+ alt="Supabase Postgres Database, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ quality={100}+ />+ </motion.div><Imagesrc="/images/index/database-dark.jpg"+ alt="Supabase Postgres Database"layout="fill"objectPosition="50% 50%"objectFit="cover"@@ -98,10 +127,21 @@ const Features = () => {}/><Card+ url={Solutions['authentication'].url}title={Solutions['authentication'].name}subtitle={Solutions['authentication'].description}image={<div className="absolute inset-0 z-0">+ <motion.div className="absolute inset-0 z-10" variants={opacityVariant}>+ <Image+ src="/images/index/auth-dark-hover.jpg"+ alt="Supabase Authentication feature, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ quality={100}+ />+ </motion.div><Imagesrc="/images/index/auth-dark.jpg"layout="fill"@@ -115,12 +155,24 @@ const Features = () => {onClick={() => sendTelemetryEvent(name)}/><Card+ url={Solutions['storage'].url}title={Solutions['storage'].name}subtitle={Solutions['storage'].description}image={<div className="absolute inset-0 z-0">+ <motion.div className="absolute inset-0 z-10" variants={opacityVariant}>+ <Image+ src="/images/index/storage-dark-hover.jpg"+ alt="Supabase Storage feature, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ quality={100}+ />+ </motion.div><Imagesrc="/images/index/storage-dark.jpg"+ alt="Supabase Storage feature"layout="fill"objectPosition="50% 50%"objectFit="cover"@@ -132,13 +184,25 @@ const Features = () => {onClick={() => sendTelemetryEvent(name)}/><Card+ url={Solutions['edge-functions'].url}title={Solutions['edge-functions'].name}subtitle={Solutions['edge-functions'].description}onClick={() => sendTelemetryEvent(name)}image={<div className="absolute inset-0 z-0">+ <motion.div className="absolute inset-0 z-10" variants={opacityVariant}>+ <Image+ src="/images/index/edge-dark-hover.svg"+ alt="Supabase Edge Functions feature, hover image with glow"+ layout="fill"+ objectPosition="50% 50%"+ objectFit="cover"+ quality={100}+ />+ </motion.div><Imagesrc="/images/index/edge-dark.svg"+ alt="Supabase Edge Functions feature"layout="fill"objectPosition="50% 50%"objectFit="cover"diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex 70ea1003757..1c52621b80b 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -1,15 +1,25 @@-import { Button, IconBookOpen } from 'ui'+import { useEffect, useRef } from 'react'import Link from 'next/link'-import { useRouter } from 'next/router'+import { Button, IconBookOpen } from 'ui'import SectionContainer from '../Layouts/SectionContainer'import styles from './hero.module.css'+import { useWindowSize } from 'react-use'const Hero = () => {- const { basePath } = useRouter()+ const divRef = useRef(null)+ const { width } = useWindowSize()++ useEffect(() => {+ const newHeight =+ width < 800 ? 100000 / width + 50 : width > 1800 ? 30000 / width : (70000 / width) * 2+ if (divRef?.current) {+ ;(divRef.current as HTMLDivElement).style.height = `${Math.round(newHeight)}px`+ }+ }, [width])return (<div className="relative">- <SectionContainer className="">+ <SectionContainer><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">@@ -86,8 +96,13 @@ const Hero = () => {].join(' ')}><div className="absolute w-screen h-screen">- <div className="w-full h-[200px] md:h-[250px] lg:h-[150px] xl:h-[50px] 2xl:h-0 bg-[#171717]" />- <div className={['2xl:-mt-48'].join(' ')}>+ <div className={['w-full top-0', styles['shape-gradient']].join(' ')} />+ <div+ ref={divRef}+ // className="w-full h-[200px] md:h-[250px] lg:h-[150px] xl:h-[50px] 2xl:h-0 bg-[#171717]"+ className="w-full bg-[#171717]"+ />+ <div className={['2xl:-mt-52'].join(' ')}><svgclassName={['', styles['triangle-svg']].join(' ')}preserveAspectRatio="none"@@ -107,7 +122,7 @@ const Hero = () => {</div><divclassName={[- 'absolute top-0 left-0 w-full h-[600px] md:h-[800px] overflow-hidden pointer-events-none',+ 'absolute top-0 left-0 w-full h-[600px] lg:h-[800px] overflow-hidden pointer-events-none',styles['hero-container'],].join(' ')}>diff --git a/apps/www/components/Hero/hero.module.css b/apps/www/components/Hero/hero.module.cssindex 31a4288e6eb..5cca428db0d 100644--- a/apps/www/components/Hero/hero.module.css+++ b/apps/www/components/Hero/hero.module.css@@ -45,6 +45,17 @@radial-gradient(ellipse 70% 80% at 50% 50%, #3ecf8e, transparent);}+.shape-gradient {+ position: absolute;+ user-select: none;+ pointer-events: none;+ z-index: 1;+ opacity: 0.3;+ height: 700px;+ filter: blur(40px);+ background: radial-gradient(ellipse 50% 50% at 50% 50%, #3ecf8e50, transparent);+}+.triangle-shape {width: 200vw;height: 200vw;diff --git a/apps/www/public/images/index/auth-dark.jpg b/apps/www/public/images/index/auth-dark.jpgindex 582ec69426b..5ab666df5bd 100644Binary files a/apps/www/public/images/index/auth-dark.jpg and b/apps/www/public/images/index/auth-dark.jpg differdiff --git a/apps/www/public/images/index/database-dark-hover.jpg b/apps/www/public/images/index/database-dark-hover.jpgindex ed12867a418..ac160f201da 100644Binary files a/apps/www/public/images/index/database-dark-hover.jpg and b/apps/www/public/images/index/database-dark-hover.jpg differdiff --git a/apps/www/public/images/index/edge-dark-hover.jpg b/apps/www/public/images/index/edge-dark-hover.jpgindex 41deddc293a..e08704e257d 100644Binary files a/apps/www/public/images/index/edge-dark-hover.jpg and b/apps/www/public/images/index/edge-dark-hover.jpg differdiff --git a/apps/www/public/images/index/feature cards.jpg b/apps/www/public/images/index/feature cards.jpgdeleted file mode 100644index 62bba856149..00000000000Binary files a/apps/www/public/images/index/feature cards.jpg and /dev/null differdiff --git a/apps/www/public/images/index/storage-dark-hover.jpg b/apps/www/public/images/index/storage-dark-hover.jpgindex f7f6fb1c650..a65a76ed0f2 100644Binary files a/apps/www/public/images/index/storage-dark-hover.jpg and b/apps/www/public/images/index/storage-dark-hover.jpg differdiff --git a/packages/common/hooks/useBreakpoint.tsx b/packages/common/hooks/useBreakpoint.tsxindex 27e29f666d3..8e967f9e0e6 100644--- a/packages/common/hooks/useBreakpoint.tsx+++ b/packages/common/hooks/useBreakpoint.tsx@@ -1,7 +1,7 @@import { useEffect, useState } from 'react'import { useWindowSize } from 'react-use'-const isBrowser = typeof window !== 'undefined'+export const isBrowser = typeof window !== 'undefined'export function useBreakpoint(breakpoint = 768) {if (!isBrowser) return