The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
chore: improve hero mobile layout
Francesco Sansalvadore38acf83b0566
diff --git a/apps/www/components/BackedBy.tsx b/apps/www/components/BackedBy.tsxindex d233fa86dba..37f014667f3 100644--- a/apps/www/components/BackedBy.tsx+++ b/apps/www/components/BackedBy.tsx@@ -1,11 +1,25 @@import React from 'react'import { useRouter } from 'next/router'-const BackedBy = ({ className }: { className: string }) => {+const BackedBy = ({+ className,+ layout = 'vertical',+}: {+ className?: string+ layout?: 'horizontal' | 'vertical'+}) => {const { basePath } = useRouter()return (- <div className={['flex flex-col items-center text-center', className].join(' ')}>+ <div+ className={[+ 'flex text-center',+ layout === 'horizontal'+ ? 'flex-col lg:flex-row items-center justify-center'+ : 'flex-col items-center',+ className,+ ].join(' ')}+ ><small className="small text-xs">backed by</small><div className="w-full sm:max-w-lg mt-4 md:mt-3 lg:ml-0"><div className="flex flex-wrap items-center justify-center gap-y-8 sm:flex-nowrap">diff --git a/apps/www/components/Features/index.tsx b/apps/www/components/Features/index.tsxindex 36ec624ce83..11bfa256479 100644--- a/apps/www/components/Features/index.tsx+++ b/apps/www/components/Features/index.tsx@@ -40,9 +40,9 @@ const Card = ({animate="default"whileHover="hover">- <div className="relative z-10 flex flex-col items-center mx-auto max-w-xs text-center gap-2 text-scale-1200">- <h3 className="xs:text-2xl text-xl">{title}</h3>- <p className="text-sm lg:text-base text-scale-1100">{subtitle}</p>+ <div className="relative z-10 flex flex-col items-center mx-auto max-w-sm text-center gap-2 text-scale-1200">+ <h3 className="text-xl">{title}</h3>+ <p className="text-sm text-scale-1100">{subtitle}</p></div>{image}</motion.div>@@ -99,7 +99,7 @@ const Features = () => {const isSm = useBreakpoint(640)return (- <SectionContainer className="space-y-8 max-w-7xl pt-8 md:!pt-0">+ <SectionContainer className="space-y-8 max-w-7xl mt-24 !pt-0"><dl className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-6 lg:grid-cols-6"><Cardurl={Solutions['database'].url}@@ -215,7 +215,7 @@ const Features = () => {}/></dl>- <BackedBy className="block md:hidden" />+ <BackedBy className="pt-8" layout="horizontal" /></SectionContainer>)}diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsxindex 87e7799f169..9db4d261bd1 100644--- a/apps/www/components/Hero/Hero.tsx+++ b/apps/www/components/Hero/Hero.tsx@@ -1,7 +1,6 @@import Link from 'next/link'import { Button, IconBookOpen } from 'ui'import SectionContainer from '../Layouts/SectionContainer'-import BackedBy from '../BackedBy'import { motion } from 'framer-motion'import HeroBackground from './HeroBackground'@@ -49,7 +48,6 @@ const Hero = () => (</a></Link></div>- <BackedBy className="hidden md:block" /></div></div></div>diff --git a/apps/www/components/Hero/HeroBackground.tsx b/apps/www/components/Hero/HeroBackground.tsxindex d2661f70362..b6f710dc23c 100644--- a/apps/www/components/Hero/HeroBackground.tsx+++ b/apps/www/components/Hero/HeroBackground.tsx@@ -1,24 +1,26 @@import React, { useEffect, useRef } from 'react'import styles from './hero.module.css'import { useWindowSize } from 'react-use'+import { useBreakpoint } from 'common'const HeroBackground = () => {- const divRef = useRef(null)+ const spacerRef = useRef(null)const { width } = useWindowSize()+ const isSm = useBreakpoint(640)useEffect(() => {const divHeight =width < 768 ? 50000 / width : width > 1800 ? 30000 / width : (70000 / width) * 2- if (divRef?.current) {- ;(divRef.current as HTMLDivElement).style.height = `${Math.round(divHeight)}px`+ if (spacerRef?.current) {+ ;(spacerRef.current as HTMLDivElement).style.height = `${Math.round(divHeight)}px`}}, [width])const svgTraceWidth = 1680const svgTraceHeight = 915const svgPath =- 'M2.16005e-05 -0.000998163L1680 0.129286V234L834.197 1068.2L-0.000248139 234.001L2.16005e-05 -0.000998163Z'+ 'M2.16005e-05 -0.000998163L1680 0.129286V234L890.763 1012.41C859.46 1043.28 809.108 1043.11 778.018 1012.02L-0.000248139 234.001L2.16005e-05 -0.000998163Z'return (<>@@ -29,7 +31,8 @@ const HeroBackground = () => {><div className="absolute w-screen h-screen"><div className={['w-full top-0 relative z-0', styles['shape-gradient']].join(' ')} />- <div ref={divRef} className="relative w-full bg-scale-100" />+ <div className="absolute bottom-0 z-[1] w-full h-1/3 bg-gradient-to-t from-scale-100 to-transparent" />+ <div ref={spacerRef} className="relative w-full bg-scale-100" /><div className={['2xl:-mt-52'].join(' ')}><svgclassName={['-mt-1 relative z-[-2]', styles['triangle-svg']].join(' ')}@@ -44,7 +47,7 @@ const HeroBackground = () => {d={svgPath}stroke="url(#electric-trace)"strokeLinecap="round"- strokeWidth="2"+ strokeWidth={isSm ? '4' : '2'}/><pathd={svgPath}@@ -55,7 +58,7 @@ const HeroBackground = () => {<path d={svgPath} fill="var(--colors-scale1)" /><defs><linearGradient- x1={svgTraceWidth / 2 - 100}+ x1={isSm ? svgTraceWidth : svgTraceWidth / 2 - 100}y1={svgTraceHeight / 2}x2={0}y2={svgTraceHeight / 2}@@ -63,21 +66,23 @@ const HeroBackground = () => {gradientUnits="userSpaceOnUse"><stop stopColor="#3ecf8e" stopOpacity="0" />- <stop stopColor="#3ecf8e" stopOpacity="0.8" />- <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />- </linearGradient>- <linearGradient- x1={svgTraceWidth + 100}- y1={svgTraceHeight / 2}- x2={svgTraceWidth / 2}- y2={svgTraceHeight / 2}- id="electric-trace-right"- gradientUnits="userSpaceOnUse"- >- <stop stopColor="#3ecf8e" stopOpacity="0" />- <stop stopColor="#3ecf8e" stopOpacity="0.8" />+ <stop offset="0.5" stopColor="#3ecf8e" stopOpacity="0.8" /><stop offset="1" stopColor="#3E9BCF" stopOpacity="0" /></linearGradient>+ {!isSm && (+ <linearGradient+ x1={svgTraceWidth + 100}+ y1={svgTraceHeight / 2}+ x2={svgTraceWidth / 2}+ y2={svgTraceHeight / 2}+ id="electric-trace-right"+ gradientUnits="userSpaceOnUse"+ >+ <stop stopColor="#3ecf8e" stopOpacity="0" />+ <stop stopColor="#3ecf8e" stopOpacity="0.8" />+ <stop offset="1" stopColor="#3E9BCF" stopOpacity="0" />+ </linearGradient>+ )}</defs></svg></div>@@ -97,11 +102,11 @@ const HeroBackground = () => {].join(' ')}><div- className="z-[100] absolute inset-0 [--gradient-stop-1:0px] [--gradient-stop-2:50%]"+ className="z-[100] absolute inset-0"style={{background: 'linear-gradient(to top, rgba(0,0,0,0) 0px, #000000 50%)',}}- ></div>+ /><divstyle={{transform: 'rotateX(85deg)',@@ -112,7 +117,7 @@ const HeroBackground = () => {right: 0,}}>- <div className={[styles['hero-grid-lines']].join(' ')}></div>+ <div className={[styles['hero-grid-lines']].join(' ')} /></div></div></div>diff --git a/apps/www/components/Hero/hero.module.css b/apps/www/components/Hero/hero.module.cssindex f62f042c77b..82801910187 100644--- a/apps/www/components/Hero/hero.module.css+++ b/apps/www/components/Hero/hero.module.css@@ -13,12 +13,11 @@margin-left: -50%;transform: translateY(0);background-image: linear-gradient(to right, #026269 45%, transparent 50%, #026269 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: 30px 30px;- mask-size: 30px 30px;+ -webkit-mask-image: linear-gradient(90deg, #000 1px, transparent 0),+ linear-gradient(180deg, #000 1px, transparent 0);+ mask-image: linear-gradient(90deg, #000 1px, #000 0), linear-gradient(180deg, #000 1px, #000 0);+ -webkit-mask-size: 25px 25px;+ mask-size: 25px 25px;overflow: hidden;-webkit-mask-repeat: repeat;mask-repeat: repeat;@@ -59,8 +58,8 @@@media (min-width: 1024px) {.hero-grid-lines {animation-duration: 30s;- -webkit-mask-size: 55px 55px;- mask-size: 55px 55px;+ -webkit-mask-size: 40px 40px;+ mask-size: 40px 40px;}}diff --git a/apps/www/public/images/index/database-dark.jpg b/apps/www/public/images/index/database-dark.jpgindex e7df961f1c6..3098560cd0c 100644Binary files a/apps/www/public/images/index/database-dark.jpg and b/apps/www/public/images/index/database-dark.jpg differ