Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: update hero removing triangle shape

Francesco Sansalvadore1f7d953190e6
diff --git a/apps/www/components/Features/index.tsx b/apps/www/components/Features/index.tsx
index 1e1c725c04b..17ad4e33cf0 100644
--- a/apps/www/components/Features/index.tsx
+++ b/apps/www/components/Features/index.tsx
@@ -61,7 +61,7 @@ const Features = () => {
const { isDarkMode } = useTheme()
return (
- <SectionContainer className="space-y-8 max-w-7xl mt-24 lg:mt-0 !pt-0">
+ <SectionContainer className="space-y-8 max-w-7xl mt-0 lg:mt-0 !pt-0">
<dl className="grid grid-cols-1 gap-4 sm:grid-cols-2 md:gap-4 lg:gap-6 md:grid-cols-6">
<FeatureCard
url={Solutions['database'].url}
diff --git a/apps/www/components/Hero/Hero.tsx b/apps/www/components/Hero/Hero.tsx
index eeadcd4bc3d..8e2f016efba 100644
--- a/apps/www/components/Hero/Hero.tsx
+++ b/apps/www/components/Hero/Hero.tsx
@@ -18,7 +18,7 @@ const Hero = () => {
return (
<div className="relative">
- <SectionContainer className="pt-12 md:py-16 lg:py-20">
+ <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">
@@ -31,9 +31,9 @@ const Hero = () => {
xl:text-7xl
"
>
- <span className="block">Build in a weekend.</span>
+ <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.
+ 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">
diff --git a/apps/www/components/Hero/HeroBackground.tsx b/apps/www/components/Hero/HeroBackground.tsx
index 39c06dbbc99..22a2a113a64 100644
--- a/apps/www/components/Hero/HeroBackground.tsx
+++ b/apps/www/components/Hero/HeroBackground.tsx
@@ -1,116 +1,30 @@
-import React, { useEffect, useRef } from 'react'
+import React from 'react'
import dynamic from 'next/dynamic'
-import { useWindowSize } from 'react-use'
-import { useBreakpoint } from 'common'
-
import styles from './hero.module.css'
const HeroGrid = dynamic(() => import('./HeroGrid'))
-const HeroBackground = () => {
- const spacerRef = useRef(null)
- const { width } = useWindowSize()
- const isSm = useBreakpoint(640)
-
- useEffect(() => {
- const divHeight =
- width < 768
- ? 50000 / width
- : width > 2100
- ? 0
- : width > 1800
- ? 30000 / width
- : (70000 / width) * 2
-
- if (spacerRef?.current) {
- ;(spacerRef.current as HTMLDivElement).style.height = `${Math.round(divHeight)}px`
- }
- }, [width])
-
- const svgTraceWidth = 1680
- const svgTraceHeight = 915
- const svgPath =
- '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 (
- <>
- <div
- className={[
- 'absolute z-[-4] flex flex-col top-0 left-0 w-screen h-screen overflow-hidden pointer-events-none',
- ].join(' ')}
- >
- <div className="absolute w-screen h-screen">
- <div className={['w-full top-0 relative z-0', styles['shape-gradient']].join(' ')} />
- <div className="absolute bottom-0 z-[1] w-full h-1/3 bg-gradient-to-t from-scale-100 to-transparent" />
- <div className="absolute hidden 4xl:block top-0 z-[1] w-full h-[100px] bg-gradient-to-b from-scale-100 to-transparent" />
- <div ref={spacerRef} className="relative w-full bg-scale-100" />
- <div className={['2xl:-mt-[10vw] 4xl:-mt-[16vw]'].join(' ')}>
- <svg
- className={['-mt-1 relative z-[-2]', styles['triangle-svg']].join(' ')}
- preserveAspectRatio="none"
- width="100%"
- height="100%"
- viewBox="0 0 1680 1069"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path
- d={svgPath}
- stroke="url(#electric-trace)"
- strokeLinecap="round"
- strokeWidth={isSm ? '4' : '2'}
- />
- <path
- d={svgPath}
- stroke="url(#electric-trace-right)"
- strokeLinecap="round"
- strokeWidth="2"
- />
- <path d={svgPath} fill="var(--colors-scale1)" />
- <defs>
- <linearGradient
- x1={isSm ? svgTraceWidth : svgTraceWidth / 2 - 100}
- y1={svgTraceHeight / 2}
- x2={0}
- y2={svgTraceHeight / 2}
- id="electric-trace"
- gradientUnits="userSpaceOnUse"
- >
- <stop stopColor="#3ecf8e" stopOpacity="0" />
- <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>
- </div>
- </div>
- <div
- className={[
- 'absolute inset-0 w-full h-[600px] lg:h-[800px] overflow-hidden pointer-events-none',
- styles['hero-container'],
- ].join(' ')}
- >
- <div className={['w-full h-full', styles['gradient']].join(' ')} />
- <div className="absolute bottom-0 z-[-2] w-full h-full bg-gradient-to-t from-scale-100 to-transparent" />
- <HeroGrid />
- </div>
- </>
- )
-}
+const HeroBackground = () => (
+ <>
+ <div
+ className={[
+ 'absolute z-[-4] flex flex-col top-0 left-0 w-screen h-screen overflow-hidden pointer-events-none',
+ ].join(' ')}
+ >
+ <div className="absolute bottom-0 z-[1] w-full h-1/3 bg-gradient-to-t from-scale-100 to-transparent" />
+ <div className="absolute top-0 z-[1] w-full h-3/5 bg-gradient-to-b from-scale-100 to-transparent" />
+ </div>
+ <div
+ className={[
+ 'absolute inset-0 w-full h-[600px] lg:h-[800px] overflow-hidden pointer-events-none',
+ styles['hero-container'],
+ ].join(' ')}
+ >
+ <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" />
+ <HeroGrid />
+ </div>
+ </>
+)
export default HeroBackground
diff --git a/apps/www/components/Hero/HeroGrid.tsx b/apps/www/components/Hero/HeroGrid.tsx
index 32e79fd477d..f6006903f16 100644
--- a/apps/www/components/Hero/HeroGrid.tsx
+++ b/apps/www/components/Hero/HeroGrid.tsx
@@ -11,7 +11,7 @@ const HeroGrid = () => {
const isSm = useBreakpoint(640)
const svgGridOptions = {
- color: isDarkMode ? '#00c6d4' : '#005359',
+ color: isDarkMode ? '#00c6d4' : '#01876c',
boxWidth: width ? width * 7 : 7500,
boxHeight: width ? width * 5 : 6000,
xLines: isSm ? 20 : 50,
@@ -154,12 +154,6 @@ const HeroGrid = () => {
'relative -z-10 ![perspective:1200px] sm:![perspective:1200px] md:![perspective:1200px] lg:![perspective:1200px]',
].join(' ')}
>
- <div
- className="z-[100] absolute inset-0"
- style={{
- background: 'linear-gradient(to top, rgba(0,0,0,0) 0px, #000000 50%)',
- }}
- />
<div
style={{
transform: 'rotateX(85deg)',
diff --git a/apps/www/components/Hero/hero.module.css b/apps/www/components/Hero/hero.module.css
index 5017c5e9136..30ccd7b197e 100644
--- a/apps/www/components/Hero/hero.module.css
+++ b/apps/www/components/Hero/hero.module.css
@@ -25,24 +25,12 @@
pointer-events: none;
inset: 0px;
z-index: -3;
- opacity: 0.6;
filter: blur(140px);
transform: translateZ(0px);
background: radial-gradient(ellipse 50% 60% at 50% 70%, #3ecf8e, transparent),
radial-gradient(ellipse 70% 80% at 50% 50%, #1d7a50, 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%, #3ecf8e20, transparent);
-}
-
@media (min-width: 1024px) {
.hero-grid-lines {
animation-duration: 30s;