The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: update homepage hero layout
Francesco Sansalvadoredb79db7f9336
diff --git a/apps/www/components/Hero.tsx b/apps/www/components/Hero/Hero-old.tsxsimilarity index 97%rename from apps/www/components/Hero.tsxrename to apps/www/components/Hero/Hero-old.tsxindex d2decb0ab08..f8fe9d2ec2c 100644--- a/apps/www/components/Hero.tsx+++ b/apps/www/components/Hero/Hero-old.tsx@@ -1,12 +1,10 @@import { Button, IconBookOpen } from 'ui'import { useRouter } from 'next/router'-import Link from 'next/link'-import SectionContainer from './Layouts/SectionContainer'import Telemetry, { TelemetryEvent } from '~/lib/telemetry'-import gaEvents from '~/lib/gaEvents'import { useTelemetryProps } from 'common/hooks/useTelemetryProps'+import SectionContainer from '../Layouts/SectionContainer'-const Hero = () => {+const HeroOld = () => {const router = useRouter()const { basePath } = routerconst telemetryProps = useTelemetryProps()@@ -130,4 +128,4 @@ const Hero = () => {)}-export default Hero+export default HeroOlddiff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxnew file mode 100644index 00000000000..ead9ef2fc66--- /dev/null+++ b/apps/www/components/Hero/Hero.tsx@@ -0,0 +1,119 @@+import { Button, IconBookOpen } from 'ui'+import Link from 'next/link'+import { useRouter } from 'next/router'+import SectionContainer from '../Layouts/SectionContainer'+import styles from './hero.module.css'++const Hero = () => {+ const { basePath } = useRouter()++ return (+ <div className="relative">+ <SectionContainer className="pb-0 pt-24">+ <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="flex flex-col items-center sm:mx-auto md:w-3/4 lg:mx-0 lg:w-full gap-4 lg:gap-8">+ <div>+ <h1+ className="+ text-scale-1200+ text-4xl sm:text-5xl sm:leading-none lg:text-6xl+ xl:text-7xl+ "+ >+ <span className="block">Build in a weekend.</span>+ <span className="text-transparent bg-clip-text bg-gradient-to-br from-[#3ECF8E] to-[#3E9BCF] block md:ml-0">+ Scale to millions.+ </span>+ </h1>+ <p className="p !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>+ <Button size="small" className="text-white">+ Start your project+ </Button>+ </a>+ </Link>+ <Link href="/docs" as="/docs" passHref>+ <a>+ <Button size="small" type="default" icon={<IconBookOpen />}>+ Documentation+ </Button>+ </a>+ </Link>+ </div>+ {/* <div className="flex flex-col gap-4">+ <small className="small text-xs">backed by</small>+ <div className="w-full sm:max-w-lg lg:ml-0">+ <div className="flex flex-wrap items-center justify-start gap-y-8 sm:flex-nowrap">+ <img+ className="h-8 pr-5 sm:h-8 md:pr-10"+ src={`${basePath}/images/logos/yc--grey.png`}+ alt="Y Combinator"+ />+ <img+ className="relative h-5 pr-5 sm:h-5 md:pr-10"+ src={`${basePath}/images/logos/mozilla--grey.png`}+ alt="Mozilla"+ />+ <img+ className="relative h-5 pr-5 sm:h-5 md:pr-10"+ src={`${basePath}/images/logos/coatue.png`}+ alt="Coatue"+ />+ <img+ className="relative h-6 pr-5 sm:h-6 md:pr-10"+ src={`${basePath}/images/logos/felicis.png`}+ alt="Felicis"+ />+ </div>+ </div>+ </div> */}+ </div>+ </div>+ </div>+ </div>+ </SectionContainer>+ <div+ className={[+ 'absolute top-0 left-0 w-full h-screen overflow-hidden pointer-events-none',+ styles['hero-container'],+ ].join(' ')}+ >+ <div className="absolute bottom-0 z-[-2] w-full h-full bg-gradient-to-t from-scale-100 to-transparent" />+ <div+ className={[+ 'relative -z-10 ![perspective:1200px] sm:![perspective:1200px] md:![perspective:1200px] lg:![perspective:1200px]',+ ].join(' ')}+ >+ <div+ className="z-[100] absolute inset-0 [--gradient-stop-1:0px] [--gradient-stop-2:50%]"+ style={{+ background: 'linear-gradient(to top, rgba(0,0,0,0) 0px, #000000 50%)',+ }}+ ></div>+ <div+ style={{+ transform: 'rotateX(85deg)',+ position: 'absolute',+ top: 0,+ bottom: 0,+ left: 0,+ right: 0,+ }}+ >+ <div className={[styles['hero-grid-lines']].join(' ')}></div>+ </div>+ </div>+ </div>+ </div>+ )+}++export default Herodiff --git a/apps/www/components/Hero/hero.module.css b/apps/www/components/Hero/hero.module.cssnew file mode 100644index 00000000000..0056c4a6b17--- /dev/null+++ b/apps/www/components/Hero/hero.module.css@@ -0,0 +1,51 @@+.hero-container {+ position: absolute;+ z-index: -6;+ overflow: hidden;+ inset: 0;+ transition: perspective 3s ease 0s;+}++.hero-grid-lines {+ position: absolute;+ width: 200vw;+ height: 200vh;+ margin-left: -50%;+ transform: translateY(0);+ background-image: linear-gradient(to right, #07edfc20 45%, #07edfc20 50%, #07edfc20 55%);+ -webkit-mask-image: linear-gradient(90deg, #000 0.3px, transparent 0),+ linear-gradient(180deg, #000 0.3px, transparent 0);+ mask-image: linear-gradient(90deg, #000 0.3px, #000 0),+ linear-gradient(180deg, #000 0.3px, #000 0);+ -webkit-mask-size: 40px 40px;+ mask-size: 40px 40px;+ overflow: hidden;+ -webkit-mask-repeat: repeat;+ mask-repeat: repeat;+ display: flex;+ align-items: center;+ justify-content: center;+ inset: -100% 0;+ background-position-y: 100%;+ -webkit-mask-position: 50% 0;+ mask-position: 50% 0;+ animation: animate-grid 30s linear infinite;+}++@media (min-width: 1024px) {+ .hero-grid-lines {+ animation-duration: 30s;+ -webkit-mask-size: 55px 55px;+ mask-size: 55px 55px;+ }+}++@keyframes animate-grid {+ 0% {+ transform: translateY(200px);+ }++ to {+ transform: translateY(0);+ }+}diff --git a/apps/www/components/Nav/index.tsx b/apps/www/components/Nav/index.tsxindex 60b3a690c04..e2f424482b6 100644--- a/apps/www/components/Nav/index.tsx+++ b/apps/www/components/Nav/index.tsx@@ -119,7 +119,7 @@ const Nav = () => {><buttonclassName={[- 'text-scale-900 focus:ring-brand-900 dark:bg-scale-200 dark:hover:bg-scale-300 inline-flex items-center justify-center rounded-md bg-gray-50 p-2 hover:bg-white focus:outline-none focus:ring-2 focus:ring-inset',+ 'text-scale-900 focus:ring-brand-900 dark:bg-scale-100 dark:hover:bg-scale-300 inline-flex items-center justify-center rounded-md bg-gray-50 p-2 hover:bg-white focus:outline-none focus:ring-2 focus:ring-inset',showLaunchWeekNavMode && '!bg-transparent border border-[#be9eea]',].join(' ')}aria-expanded="false"@@ -202,7 +202,7 @@ const Nav = () => {<div className="sticky top-0 z-40 transform" style={{ transform: 'translate3d(0,0,999px)' }}><divclassName={[- 'absolute inset-0 h-full w-full opacity-80 bg-scale-200',+ 'absolute inset-0 h-full w-full opacity-80 bg-scale-100',!showLaunchWeekNavMode && '!opacity-100 transition-opacity',showLaunchWeekNavMode && '!bg-transparent transition-all',].join(' ')}diff --git a/apps/www/pages/index.tsx b/apps/www/pages/index.tsxindex 91fdb6095af..ad787444df3 100644--- a/apps/www/pages/index.tsx+++ b/apps/www/pages/index.tsx@@ -2,7 +2,7 @@ import { getSortedPosts, getAllCategories } from '~/lib/posts'import PostTypes from '~/types/post'import Container from 'components/Container'import Layout from '~/components/Layouts/Default'-import Hero from 'components/Hero'+import Hero from 'components/Hero/Hero'import Features from 'components/Features/index'import BuiltExamples from 'components/BuiltWithSupabase/index'diff --git a/apps/www/styles/index.css b/apps/www/styles/index.cssindex fe2809a4a07..eac2970979b 100644--- a/apps/www/styles/index.css+++ b/apps/www/styles/index.css@@ -25,7 +25,7 @@ html {}body {- @apply bg-scale-200;+ @apply bg-scale-100;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}