The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Product pages improvements (#21322)
Francesco Sansalvadore9cf0708aa515
diff --git a/apps/www/components/AuthWidget/AuthWidgetSection.tsx b/apps/www/components/AuthWidget/AuthWidgetSection.tsxindex a73e6450ea9..301bb685d5e 100644--- a/apps/www/components/AuthWidget/AuthWidgetSection.tsx+++ b/apps/www/components/AuthWidget/AuthWidgetSection.tsx@@ -52,16 +52,12 @@ function AuthWidgetSection() {return props.children}- // rounded-xl rounded-3xl rounded-full // for purging-return (<div className="sbui-tabs--alt overflow-hidden"><div className="bg-background relative border py-2 pb-16"><div className="sm:py-18 gap container relative mx-auto grid grid-cols-12 px-6 py-16 md:gap-16 md:py-24 lg:gap-16 lg:px-16 lg:py-24 xl:px-20"><div className="relative z-10 col-span-12 mb-16 md:col-span-7 md:mb-0 lg:col-span-6"><div className="relative lg:mx-auto lg:max-w-md">- <div className="glow-area transition-all"></div>-<div className="border-overlay bg-surface-100 pointer-events-none relative rounded-xl border px-8 py-12 drop-shadow-sm"><div className="mb-6 flex flex-col gap-6"><div className="flex items-center gap-3">diff --git a/apps/www/components/Carousels/ImageCarousel.tsx b/apps/www/components/Carousels/ImageCarousel.tsxindex 6258420c06b..41a07ddceb8 100644--- a/apps/www/components/Carousels/ImageCarousel.tsx+++ b/apps/www/components/Carousels/ImageCarousel.tsx@@ -172,10 +172,12 @@ function ImageCarousel(props: ImageCarouselProps) {<SwiperSlide key={i} className="py-4"><h4 className="text-foreground mb-4 text-xl">{content.title}</h4><p className="p text-base">{content.text}</p>- <TextLink- label={content.cta ? content.cta : 'View documentation'}- url={content.url}- />+ {!!content.url && (+ <TextLink+ label={content.cta ? content.cta : 'View documentation'}+ url={content.url}+ />+ )}</SwiperSlide>)})}diff --git a/apps/www/components/Sections/GithubExamples.tsx b/apps/www/components/Sections/GithubExamples.tsxindex 43a5a319e0f..41b5fe8732e 100644--- a/apps/www/components/Sections/GithubExamples.tsx+++ b/apps/www/components/Sections/GithubExamples.tsx@@ -1,7 +1,5 @@import { useRef } from 'react'-import { useRouter } from 'next/router'-import { Swiper, SwiperSlide } from 'swiper/react'// import Swiper core and required modulesimport SwiperCore, { Navigation, Pagination } from 'swiper'@@ -16,9 +14,6 @@ import ExampleCard from '../ExampleCard'SwiperCore.use([Navigation, Pagination])function GithubExamples() {- // base path for images- const { basePath } = useRouter()-const prevRef = useRef(null)const nextRef = useRef(null)@@ -32,7 +27,7 @@ function GithubExamples() {</p><div className="flex items-center justify-center gap-2 py-4"><Button asChild size="small" type="default" icon={<IconBookOpen size={12} />}>- <Link href="/docs/guides/auth/overview">View guides</Link>+ <Link href="/docs/guides/resources/examples">View guides</Link></Button><Button asChild size="small" type="default" icon={<IconGitHub size={12} />}><Linkdiff --git a/apps/www/data/products/database/table-view-carousel.json b/apps/www/data/products/database/table-view-carousel.jsonindex ab6ab6072c1..90a88b5aa72 100644--- a/apps/www/data/products/database/table-view-carousel.json+++ b/apps/www/data/products/database/table-view-carousel.json@@ -4,21 +4,21 @@"label": "Spreadsheet like editing","img_url": "/images/product/database/table-view/spreadsheet-interface.png","text": "Add, edit, and update your data with the simplicity of a no-code tool.",- "url": ""+ "url": "/docs/guides/database/tables"},{"title": "Create tables","label": "Create tables","img_url": "/images/product/database/table-view/create-table.png","text": "Add tables, columns and rows right in the dashboard. Without a single line SQL.",- "url": ""+ "url": "/docs/guides/database/tables#creating-tables"},{"title": "Set up foreign keys","label": "Set up foreign keys","img_url": "/images/product/database/table-view/foreign-keys.png","text": "Build connections throughout your data with the full power of a Relational Database.",- "url": ""+ "url": "/docs/guides/database/tables#joining-tables-with-foreign-keys"},{"title": "Select and Export",diff --git a/apps/www/pages/auth/Auth.tsx b/apps/www/pages/auth/Auth.tsxindex 72bae46dc98..00b33e11092 100644--- a/apps/www/pages/auth/Auth.tsx+++ b/apps/www/pages/auth/Auth.tsx@@ -1,4 +1,3 @@-import { createClient } from '@supabase/supabase-js'import { Button, IconArrowUpRight, IconBriefcase, IconEye, IconLink, IconShield } from 'ui'import ApiExamples from 'data/products/auth/auth-api-examples'import AuthSqlRulesExamples from 'data/products/auth/auth-sql-rules-examples'@@ -11,7 +10,6 @@ import AuthWidgetSection from '~/components/AuthWidget/AuthWidgetSection'import SplitCodeBlockCarousel from '~/components/Carousels/SplitCodeBlockCarousel'import CTABanner from '~/components/CTABanner'import FeatureColumn from '~/components/FeatureColumn'-import FloatingIcons from '~/components/FloatingIcons'import DefaultLayout from '~/components/Layouts/Default'import SectionContainer from '~/components/Layouts/SectionContainer'import APISection from '~/components/Sections/APISection'@@ -24,12 +22,6 @@ function AuthPage() {// base path for imagesconst { basePath } = useRouter()- // supabase auth widget project details- const supabase = createClient(- 'https://rsnibhkhsbfnncjmwnkj.supabase.co',- 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYxNTIxNDE1MywiZXhwIjoxOTMwNzkwMTUzfQ.OQEbAaTfgDdLCCht251P2JRD3QDnui6nsU8N-tZA_Mc'- )-const meta_title = 'Auth | Built-in user management'const meta_description ='Authentication that you can afford that is built in to your supabase project.'@@ -189,7 +181,6 @@ function AuthPage() {<div className="section--bg border-t border-b border-control"></div></div><div className="section-container pt-12 pb-0">- <FloatingIcons /><div className="overflow-x-hidden"><SectionContainer className="mb-0 pb-8"><GithubExamples />diff --git a/apps/www/pages/database/Database.tsx b/apps/www/pages/database/Database.tsxindex 48dd5cf57e4..3b47c48bea3 100644--- a/apps/www/pages/database/Database.tsx+++ b/apps/www/pages/database/Database.tsx@@ -1,3 +1,11 @@+// Import Swiper styles+import 'swiper/swiper.min.css'++import { NextSeo } from 'next-seo'+import Image from 'next/image'+import Link from 'next/link'+import { useRouter } from 'next/router'+import { useState } from 'react'import { Badge, Button, IconArrowUpRight, IconX, Tabs } from 'ui'// dataimport ApiExamplesData from 'data/products/database/api-examples'@@ -5,18 +13,10 @@ import ExtensionsExamplesData from 'data/products/database/extensions-examples'import SqlViewCarouselData from 'data/products/database/sql-view-carousel.json'import TableViewCarouselData from 'data/products/database/table-view-carousel.json'import Solutions from 'data/Solutions'-import { NextSeo } from 'next-seo'-import Image from 'next/image'-import Link from 'next/link'-import { useRouter } from 'next/router'-import { useState } from 'react'import { Swiper, SwiperSlide } from 'swiper/react'-// Import Swiper styles-import 'swiper/swiper.min.css'import ImageCarousel from '~/components/Carousels/ImageCarousel'import SplitCodeBlockCarousel from '~/components/Carousels/SplitCodeBlockCarousel'import FeatureColumn from '~/components/FeatureColumn'-import FloatingIcons from '~/components/FloatingIcons'import DefaultLayout from '~/components/Layouts/Default'import SectionContainer from '~/components/Layouts/SectionContainer'import ProductIcon from '~/components/ProductIcon'@@ -26,9 +26,6 @@ import ProductHeader from '~/components/Sections/ProductHeader'import { ThemeImage } from 'ui-patterns/ThemeImage'import { TweetCard } from 'ui-patterns/TweetCard'-// install Swiper's Controller component-// SwiperCore.use([Controller])-function Database() {// base path for imagesconst { basePath } = useRouter()@@ -234,24 +231,29 @@ function Database() {]}footer={[<div className="grid grid-cols-12" key={0}>- <div className="col-span-12 mt-0 flex lg:col-span-6 xl:col-span-12 xl:mb-8">- <p className="text-foreground-light m-0">Libraries coming soon:</p>- <div className="ml-1 space-x-1">- <Badge dot={false}>Python</Badge>- <Badge dot={false}>Dart</Badge>- <Badge dot={false}>C#</Badge>- <Badge dot={false}>Kotlin</Badge>+ <div className="col-span-12 mt-0 flex flex-col 2xl:flex-row lg:col-span-6 xl:col-span-12 xl:mb-8 gap-1">+ <p className="text-foreground-light m-0">Available libraries:</p>+ <div className="flex gap-1">+ <Link href="/docs/reference/javascript/introduction" target="_blank">+ <Badge dot={false}>Javascript</Badge>+ </Link>+ <Link href="/docs/reference/dart/introduction" target="_blank">+ <Badge dot={false}>Flutter</Badge>+ </Link>+ <Link href="/docs/reference/python/introduction" target="_blank">+ <Badge dot={false}>Python</Badge>+ </Link>+ <Link href="/docs/reference/csharp/introduction" target="_blank">+ <Badge dot={false}>C#</Badge>+ </Link>+ <Link href="/docs/reference/kotlin/introduction" target="_blank">+ <Badge dot={false}>Kotlin</Badge>+ </Link>+ <Link href="/docs/reference/swift/introduction" target="_blank">+ <Badge dot={false}>Swift</Badge>+ </Link></div></div>- <div className="col-span-12 hidden lg:col-span-6 xl:col-span-10 xl:block" key={1}>- {/* <TweetCard- handle="@eunjae_lee"- img_url="https://pbs.twimg.com/profile_images/1188191474401320965/eGjSYbQd_400x400.jpg"- quote="So they just help me use @PostgreSQL better. They don't try to invent a wheel and trap me- in it. Whereas they provide a good abstraction overall, they also provide a raw access to- the database."- /> */}- </div></div>,]}documentation_link={'/docs/guides/database'}@@ -264,7 +266,6 @@ function Database() {<div className="section--bg border-t border-b border-control"></div></div><div className="section-container pt-12 pb-0">- <FloatingIcons /><div className="overflow-x-hidden"><SectionContainer className="mb-0 pb-8 lg:pt-32"><GithubExamples />@@ -274,7 +275,7 @@ function Database() {</div></div>- <SectionContainer className="lg:py-48">+ <SectionContainer><div className="grid grid-cols-12 lg:gap-16"><div className="col-span-12 mb-8 lg:col-span-6 xl:col-span-5"><h2 className="h3">Extend your database</h2>diff --git a/apps/www/pages/storage/Storage.tsx b/apps/www/pages/storage/Storage.tsxindex c824d751fd0..a574d6853b0 100644--- a/apps/www/pages/storage/Storage.tsx+++ b/apps/www/pages/storage/Storage.tsx@@ -159,7 +159,7 @@ function StoragePage() {/></SectionContainer>- <SectionContainer className="-mb-48 pt-0">+ <SectionContainer className="pt-0"><APISectiontitle="Simple and convenient APIs"// @ts-ignore@@ -215,12 +215,7 @@ function StoragePage() {<div className="section--bg border-t border-control"></div></div><div className="section-container pt-12 pb-0">- {/* <FloatingIcons /> */}<div className="overflow-x-hidden">- {/* <SectionContainer className="mb-0 pb-8">- <GithubExamples />- </SectionContainer> */}-<SectionContainer><div className="grid grid-cols-12 lg:gap-16"><div className="col-span-12 mb-8 lg:col-span-5">diff --git a/apps/www/styles/index.css b/apps/www/styles/index.cssindex 4a4aba6efb5..d93f8cb31dd 100644--- a/apps/www/styles/index.css+++ b/apps/www/styles/index.css@@ -183,7 +183,6 @@ h6:not(.overwrite) {top: 0;left: 0;transform-origin: 100% 0;- transform: skewY(-2deg);overflow: hidden;}diff --git a/packages/ui-patterns/ThemeImage/index.tsx b/packages/ui-patterns/ThemeImage/index.tsxindex 1600635a5ba..bce80dff03e 100644--- a/packages/ui-patterns/ThemeImage/index.tsx+++ b/packages/ui-patterns/ThemeImage/index.tsx@@ -20,7 +20,7 @@ export const ThemeImage = ({ src, ...props }: any) => {<Imagesizes="(max-width: 768px) 120vw, (max-width: 1200px) 100vw, 2000px"{...props}- className={cn('border border-muted rounded-md', props.className)}+ className={props.className}src={typeof src === 'string'? src