Skip to content

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

chore: add new docs homepage hero

Francesco Sansalvadore1657804c08df
diff --git a/apps/docs/components/HomePageCover.tsx b/apps/docs/components/HomePageCover.tsx
new file mode 100644
index 00000000000..f8231f9994f
--- /dev/null
+++ b/apps/docs/components/HomePageCover.tsx
@@ -0,0 +1,139 @@
+import Image from 'next/image'
+import Link from 'next/link'
+import { IconPanel, IconPlay } from 'ui'
+import { useBreakpoint } from 'common'
+
+const IconBackground: React.FC = (props) => (
+ <div className="shrink-0 bg-green-600 w-8 h-8 flex items-center justify-center rounded">
+ {props.children}
+ </div>
+)
+
+const HomePageCover = (props) => {
+ const isXs = useBreakpoint(639)
+ const iconSize = isXs ? 'sm' : 'lg'
+
+ const GettingStarted = () => (
+ <div
+ className="
+ border border-scale-400 bg-scale-200
+ relative overflow-hidden
+ grid grid-cols-12
+ rounded-lg
+ p-5 md:p-8
+ "
+ >
+ <div className="col-span-full flex flex-col md:flex-row 2xl:flex-col justify-between gap-1 md:gap-6">
+ <div className="md:max-w-xs 2xl:max-w-none">
+ <div className="flex items-center gap-3 mb-3">
+ <IconBackground>
+ <IconPlay className="text-brand-900 w-4" />
+ </IconBackground>
+ <h3 className="text-2xl m-0">Getting Started</h3>
+ </div>
+ <p className="text-scale-1100 text-sm">
+ Discover how to set up a database to an app making queries in just a few minutes.
+ </p>
+ </div>
+ <div className="flex flex-wrap md:grid md:grid-cols-4 gap-3 sm:gap-3">
+ <Link href={`/guides/getting-started/quickstarts/reactjs`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="ReactJS"
+ icon="/docs/img/icons/react-icon"
+ />
+ </a>
+ </Link>
+ <Link href={`/guides/getting-started/quickstarts/nextjs`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="NextJS"
+ icon="/docs/img/icons/nextjs-icon"
+ />
+ </a>
+ </Link>
+ <Link href={`/guides/getting-started/quickstarts/redwoodjs`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="RedwoodJS"
+ icon="/docs/img/icons/redwoodjs-icon"
+ />
+ </a>
+ </Link>
+ <Link href={`/guides/getting-started/quickstarts/flutter`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="Flutter"
+ icon="/docs/img/icons/flutter-icon"
+ />
+ </a>
+ </Link>
+ <Link href={`/guides/getting-started/quickstarts/sveltekit`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="SvelteKit"
+ icon="/docs/img/icons/svelte-icon"
+ />
+ </a>
+ </Link>
+ <Link href={`/guides/getting-started/quickstarts/solidjs`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="SolidJS"
+ icon="/docs/img/icons/solidjs-icon"
+ />
+ </a>
+ </Link>
+ <Link href={`/guides/getting-started/quickstarts/vue`} passHref>
+ <a className="no-underline">
+ <IconPanel
+ iconSize={iconSize}
+ hideArrow
+ tooltip="Vue"
+ icon="/docs/img/icons/vuejs-icon"
+ />
+ </a>
+ </Link>
+ </div>
+ </div>
+ </div>
+ )
+
+ return (
+ <div className="w-full bg-scale-100 border-b prose dark:prose-dar max-w-none mb-16 md:mb-12 2xl:mb-0">
+ <div className="max-w-7xl px-5 mx-auto py-8 sm:py-16 flex flex-col 2xl:flex-row justify-between gap-12">
+ <div className="flex flex-col sm:flex-row gap-2 sm:gap-8 items-start sm:items-center w-full max-w-xl">
+ <Image
+ src="/docs/img/icons/supabase-docs2.svg"
+ width={isXs ? '60' : '200'}
+ height={isXs ? '80' : '300'}
+ />
+ <div className="flex flex-col">
+ <h1 className="m-0 mb-3 text-3xl sm:text-4xl">{props.meta?.title}</h1>
+ <p className="m-0 text-scale-1100 text-lg">
+ Learn how to get up and running with Supabase through tutorials, APIs and platform
+ resources.
+ </p>
+ </div>
+ </div>
+ <div className="w-full 2xl:max-w-sm -mb-40">
+ <GettingStarted />
+ </div>
+ </div>
+ </div>
+ )
+}
+
+export default HomePageCover
diff --git a/apps/docs/components/Navigation/Footer.tsx b/apps/docs/components/Navigation/Footer.tsx
index f0cef649c60..77a7a44ba92 100644
--- a/apps/docs/components/Navigation/Footer.tsx
+++ b/apps/docs/components/Navigation/Footer.tsx
@@ -3,12 +3,13 @@ import Link from 'next/link'
import { Button, IconGitHub, IconTwitter, IconYoutube } from '~/../../packages/ui'
import footerData from '~/data/footer.json'
import { useTheme } from 'common/Providers'
+import { LayoutMainContent } from '../../layouts/DefaultLayout'
const Footer = () => {
const { isDarkMode } = useTheme()
return (
- <div>
- <hr className="border-scale-400 mt-8"></hr>
+ <LayoutMainContent className="pt-0">
+ <hr className="border-scale-400 mt-8"></hr>
<div className="flex gap-4 items-center mt-6 justify-between">
<div className="flex flex-col lg:flex-row gap-3 ">
<Link href="https://supabase.com/">
@@ -61,7 +62,7 @@ const Footer = () => {
</Button>
</div>
</div>
- </div>
+ </LayoutMainContent>
)
}
diff --git a/apps/docs/layouts/DefaultLayout.tsx b/apps/docs/layouts/DefaultLayout.tsx
index b8338b9d451..f1c5de485b0 100644
--- a/apps/docs/layouts/DefaultLayout.tsx
+++ b/apps/docs/layouts/DefaultLayout.tsx
@@ -59,26 +59,32 @@ const Layout: FC<Props> = (props: Props) => {
},
}}
/>
- <div className={['relative transition-all ease-out', 'duration-150 '].join(' ')}>
- {/* <p className="text-brand-900 tracking-wider">Tutorials</p> */}
- <article className="prose dark:prose-dar max-w-none">
- <h1>{props.meta.title}</h1>
- {/* <div className="max-w-xs w-32 h-[1px] bg-gradient-to-r from-brand-800 to-brand-900 my-16"></div> */}
- <MDXProvider components={components} children={props.children} />
- </article>
- </div>
- {hasTableOfContents && !props.meta?.hide_table_of_contents && (
- <div
- className={[
- 'border-scale-400 dark:bg-scale-200 table-of-contents-height border-l',
- 'thin-scrollbar overflow-y-auto sticky hidden md:block md:col-span-3 px-2',
- ].join(' ')}
- >
- <TableOfContents toc={props.toc} video={props.meta.video} />
+ <LayoutMainContent>
+ <div className={['relative transition-all ease-out', 'duration-150 '].join(' ')}>
+ {/* <p className="text-brand-900 tracking-wider">Tutorials</p> */}
+ <article className="prose dark:prose-dar max-w-none">
+ <h1>{props.meta.title}</h1>
+ {/* <div className="max-w-xs w-32 h-[1px] bg-gradient-to-r from-brand-800 to-brand-900 my-16"></div> */}
+ <MDXProvider components={components} children={props.children} />
+ </article>
</div>
- )}
+ {hasTableOfContents && !props.meta?.hide_table_of_contents && (
+ <div
+ className={[
+ 'border-scale-400 dark:bg-scale-200 table-of-contents-height border-l',
+ 'thin-scrollbar overflow-y-auto sticky hidden md:block md:col-span-3 px-2',
+ ].join(' ')}
+ >
+ <TableOfContents toc={props.toc} video={props.meta.video} />
+ </div>
+ )}
+ </LayoutMainContent>
</>
)
}
+export const LayoutMainContent: FC<{ className?: string }> = ({ className, children }) => (
+ <div className={['max-w-7xl px-5 mx-auto py-16', className].join(' ')}>{children}</div>
+)
+
export default Layout
diff --git a/apps/docs/layouts/HomeLayout.tsx b/apps/docs/layouts/HomeLayout.tsx
new file mode 100644
index 00000000000..f62d9f4bed1
--- /dev/null
+++ b/apps/docs/layouts/HomeLayout.tsx
@@ -0,0 +1,87 @@
+import { MDXProvider } from '@mdx-js/react'
+import { NextSeo } from 'next-seo'
+import Head from 'next/head'
+import { useRouter } from 'next/router'
+import { FC } from 'react'
+import components from '~/components'
+import TableOfContents from '~/components/TableOfContents'
+import HomePageCover from '../components/HomePageCover'
+import { LayoutMainContent } from './DefaultLayout'
+
+interface Props {
+ meta: {
+ title: string
+ description?: string
+ hide_table_of_contents?: boolean
+ video?: string
+ canonical?: string
+ }
+ children: any
+ toc?: any
+ menuItems: any
+}
+
+const HomeLayout: FC<Props> = (props: Props) => {
+ const { asPath, basePath } = useRouter()
+
+ const hasTableOfContents =
+ props.toc !== undefined &&
+ props.toc.json.filter((item) => item.lvl !== 1 && item.lvl <= 3).length > 0
+
+ return (
+ <>
+ <Head>
+ <title>{asPath === '/' ? 'Supabase Docs' : `${props.meta?.title} | Supabase Docs`}</title>
+ <meta name="description" content={props.meta?.description} />
+ <meta property="og:image" content={`https://supabase.com/docs/img/supabase-og-image.png`} />
+ <meta
+ name="twitter:image"
+ content={`https://supabase.com/docs/img/supabase-og-image.png`}
+ />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ </Head>
+ <NextSeo
+ canonical={props.meta?.canonical ?? `https://supabase.com/docs${asPath}`}
+ openGraph={{
+ url: `https://supabase.com/docs${asPath}`,
+ type: 'article',
+ videos: props.meta?.video && [
+ {
+ // youtube based video meta
+ url: props.meta?.video,
+ width: 640,
+ height: 385,
+ type: 'application/x-shockwave-flash',
+ },
+ ],
+ article: {
+ publishedTime: new Date().toISOString(),
+ modifiedTime: new Date().toISOString(),
+ authors: ['Supabase'],
+ },
+ }}
+ />
+ <HomePageCover meta={props.meta} />
+ <LayoutMainContent>
+ <div className={['relative transition-all ease-out', 'duration-150 '].join(' ')}>
+ <article className="prose dark:prose-dar max-w-none">
+ {/* <h1>{props.meta.title} 🦸</h1> */}
+ <MDXProvider components={components} children={props.children} />
+ </article>
+ </div>
+ {hasTableOfContents && !props.meta?.hide_table_of_contents && (
+ <div
+ className={[
+ 'border-scale-400 dark:bg-scale-200 table-of-contents-height border-l',
+ 'thin-scrollbar overflow-y-auto sticky hidden md:block md:col-span-3 px-2',
+ ].join(' ')}
+ >
+ <TableOfContents toc={props.toc} video={props.meta.video} />
+ </div>
+ )}
+ </LayoutMainContent>
+ </>
+ )
+}
+
+export default HomeLayout
diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsx
index 0185f4918ae..cce3822a1f0 100644
--- a/apps/docs/layouts/SiteLayout.tsx
+++ b/apps/docs/layouts/SiteLayout.tsx
@@ -4,10 +4,11 @@ import Link from 'next/link'
import NavigationMenu from '~/components/Navigation/NavigationMenu/NavigationMenu'
import TopNavBarRef from '~/components/Navigation/NavigationMenu/TopNavBarRef'
-import { memo, useEffect } from 'react'
+import { memo } from 'react'
import Footer from '~/components/Navigation/Footer'
import { menuState, useMenuLevelId, useMenuMobileOpen } from '~/hooks/useMenuState'
import Head from 'next/head'
+import { useRouter } from 'next/router'
const levelsData = {
home: {
@@ -318,6 +319,9 @@ const NavContainer = memo(function NavContainer() {
})
const SiteLayout = ({ children }) => {
+ const router = useRouter()
+ const isHomepage = router.asPath === '/'
+
return (
<>
<Head>
@@ -341,7 +345,7 @@ const SiteLayout = ({ children }) => {
<MobileHeader />
</div>
</div>
- <div className="grow px-5 max-w-7xl mx-auto py-16">
+ <div className="grow">
{children}
<Footer />
</div>
diff --git a/apps/docs/layouts/guides/index.tsx b/apps/docs/layouts/guides/index.tsx
index e24008fe864..c4ccfad09f3 100644
--- a/apps/docs/layouts/guides/index.tsx
+++ b/apps/docs/layouts/guides/index.tsx
@@ -10,6 +10,7 @@ import { highlightSelectedTocItem } from '~/components/CustomHTMLElements/Custom
import FooterHelpCallout, { FooterHelpCalloutType } from '~/components/FooterHelpCallout'
import GuidesTableOfContents from '~/components/GuidesTableOfContents'
import useHash from '~/hooks/useHash'
+import { LayoutMainContent } from '../DefaultLayout'
interface Props {
meta: {
@@ -103,69 +104,71 @@ const Layout: FC<Props> = (props) => {
},
}}
/>
- <div className={['grid grid-cols-12 relative gap-4'].join(' ')}>
- <div
- className={[
- 'relative',
- !props.hideToc ? 'col-span-12 md:col-span-9' : 'col-span-12',
- 'transition-all ease-out',
- 'duration-100',
- ].join(' ')}
- >
- {props.meta.breadcrumb && (
- <p className="text-brand-900 tracking-wider mb-3">{props.meta.breadcrumb}</p>
- )}
- <article
- ref={articleRef}
- className={`${
- props.meta?.hide_table_of_contents || !hasTableOfContents ? '' : ''
- } prose dark:prose-dark max-w-none`}
- >
- <h1 className="mb-0">{props.meta.title}</h1>
- {props.meta.subtitle && (
- <h2 className="mt-3 text-xl text-scale-1100">{props.meta.subtitle}</h2>
- )}
- <div className="max-w-xs w-32 h-[1px] bg-gradient-to-r from-brand-800 to-brand-900 my-8"></div>
- <MDXProvider components={components}>{props.children}</MDXProvider>
-
- {EDIT_BUTTON_EXCLUDE_LIST.includes(router.route) ? (
- <></>
- ) : (
- <div className="mt-16 not-prose">
- <div>
- <Link
- href={`https://github.com/supabase/supabase/edit/master/apps/docs/pages${router.asPath}.mdx`}
- passHref
- >
- <a className="text-sm transition flex items-center gap-1 text-scale-1000 hover:text-scale-1200">
- Edit this page on GitHub <IconExternalLink size={14} strokeWidth={1.5} />
- </a>
- </Link>
- </div>
- </div>
- )}
- </article>
- </div>
- {!props.hideToc && hasTableOfContents && !props.meta?.hide_table_of_contents && (
+ <LayoutMainContent className="pb-0">
+ <div className={['grid grid-cols-12 relative gap-4'].join(' ')}>
<div
className={[
- 'col-span-3',
- 'border-scale-400 dark:bg-scale-200 table-of-contents-height',
- 'thin-scrollbar overflow-y-auto sticky hidden md:block md:col-span-3 px-2',
+ 'relative',
+ !props.hideToc ? 'col-span-12 md:col-span-9' : 'col-span-12',
'transition-all ease-out',
'duration-100',
].join(' ')}
>
- <div className="border-l">
- <span className="block font-mono text-xs uppercase text-scale-1200 px-5 mb-6">
- On this page
- </span>
- <GuidesTableOfContents list={tocList} />
- </div>
+ {props.meta.breadcrumb && (
+ <p className="text-brand-900 tracking-wider mb-3">{props.meta.breadcrumb}</p>
+ )}
+ <article
+ ref={articleRef}
+ className={`${
+ props.meta?.hide_table_of_contents || !hasTableOfContents ? '' : ''
+ } prose dark:prose-dark max-w-none`}
+ >
+ <h1 className="mb-0">{props.meta.title}</h1>
+ {props.meta.subtitle && (
+ <h2 className="mt-3 text-xl text-scale-1100">{props.meta.subtitle}</h2>
+ )}
+ <div className="max-w-xs w-32 h-[1px] bg-gradient-to-r from-brand-800 to-brand-900 my-8"></div>
+ <MDXProvider components={components}>{props.children}</MDXProvider>
+
+ {EDIT_BUTTON_EXCLUDE_LIST.includes(router.route) ? (
+ <></>
+ ) : (
+ <div className="mt-16 not-prose">
+ <div>
+ <Link
+ href={`https://github.com/supabase/supabase/edit/master/apps/docs/pages${router.asPath}.mdx`}
+ passHref
+ >
+ <a className="text-sm transition flex items-center gap-1 text-scale-1000 hover:text-scale-1200">
+ Edit this page on GitHub <IconExternalLink size={14} strokeWidth={1.5} />
+ </a>
+ </Link>
+ </div>
+ </div>
+ )}
+ </article>
</div>
- )}
- </div>
- <FooterHelpCallout footerHelpType={props.meta?.footerHelpType} title={props.meta?.title} />
+ {!props.hideToc && hasTableOfContents && !props.meta?.hide_table_of_contents && (
+ <div
+ className={[
+ 'col-span-3',
+ 'border-scale-400 dark:bg-scale-200 table-of-contents-height',
+ 'thin-scrollbar overflow-y-auto sticky hidden md:block md:col-span-3 px-2',
+ 'transition-all ease-out',
+ 'duration-100',
+ ].join(' ')}
+ >
+ <div className="border-l">
+ <span className="block font-mono text-xs uppercase text-scale-1200 px-5 mb-6">
+ On this page
+ </span>
+ <GuidesTableOfContents list={tocList} />
+ </div>
+ </div>
+ )}
+ </div>
+ <FooterHelpCallout footerHelpType={props.meta?.footerHelpType} title={props.meta?.title} />
+ </LayoutMainContent>
</>
)
}
diff --git a/apps/docs/layouts/ref/RefSubLayout.tsx b/apps/docs/layouts/ref/RefSubLayout.tsx
index fb3668fc594..a08bee53af2 100644
--- a/apps/docs/layouts/ref/RefSubLayout.tsx
+++ b/apps/docs/layouts/ref/RefSubLayout.tsx
@@ -51,7 +51,11 @@ interface ISectionDetails {}
interface ISectionExamples {}
const RefSubLayout: FC<RefSubLayoutType> & RefSubLayoutSubComponents = (props) => {
- return <div className="flex flex-col w-full divide-y">{props.children}</div>
+ return (
+ <div className="flex flex-col w-full divide-y px-5 max-w-7xl mx-auto py-16">
+ {props.children}
+ </div>
+ )
}
const Section: FC<ISectionContainer> = (props) => {
diff --git a/apps/docs/pages/index.mdx b/apps/docs/pages/index.mdx
index cb079575e9b..12b6f2236ef 100644
--- a/apps/docs/pages/index.mdx
+++ b/apps/docs/pages/index.mdx
@@ -1,145 +1,20 @@
-import Layout from '~/layouts/DefaultLayout'
+import HomeLayout from '~/layouts/HomeLayout'
import Link from 'next/link'
import { GlassPanel, IconPanel, Button, IconChevronRight } from 'ui'
export const meta = {
- title: 'Supabase Docs',
+ title: 'Supabase Documentation',
description:
'Supabase is an open source Firebase alternative providing all the backend features you need to build a product.',
subtitle: 'Supabase Developer Documentation and API Reference',
}
-<h2 className="text-base max-w-xl m-0">
- Supabase is an open source Firebase alternative providing all the backend features you need to
- build a product. [Learn more](/docs/guides/getting-started/architecture) about Supabase, follow a
- quickstart for an overview, or dive straight into the different products and APIs.
-</h2>
-
-{/* start container */}
-
-<div className="flex flex-col gap-12 my-12">
-
-<div className="space-y-8">
- <div className="
- border border-scale-400
- relative overflow-hidden
- grid grid-cols-12
- rounded-lg
- px-8 md:px-12 py-5 md:py-12
- ">
- <div className="col-span-12 lg:col-span-7 flex flex-col gap-6">
- <img className="hidden lg:visible absolute right-0 top-0 w-[500px]" src="/docs/img/cards/dark.png" />
- <div className="">
- <h3 className="text-2xl m-0 mb-3">Getting Started</h3>
-
- Discover how to set up a database to an app making queries in just a few minutes.
-
- <div className="font-mono uppercase text-xs mb-2">What you will learn</div>
-
- <div className="flex flex-col">
- <div className="flex flex-row items-center gap-3">
- <div className="text-brand-900">
- <IconChevronRight size={14} strokeWidth={1.5} />
- </div>
- <span className="text-scale-1200">Setting up a Supabase project and app</span>
- </div>
- <div className="flex flex-row items-center gap-3">
- <div className="text-brand-900">
- <IconChevronRight size={14} strokeWidth={1.5} />
- </div>
- <span className="text-scale-1200">Adding some sample data to your project</span>
- </div>
- <div className="flex flex-row items-center gap-3">
- <div className="text-brand-900">
- <IconChevronRight size={14} strokeWidth={1.5} />
- </div>
- <span className="text-scale-1200">Select() from your new database table</span>
- </div>
- </div>
-
- <div className="mt-6">
- <div className="hidden">
- <Button size="small">Get started</Button>
- </div>
- <div className="grid grid-cols-1 md:grid-cols-3 gap-3 md:gap-6">
- <Link href={`/guides/getting-started/quickstarts/reactjs`} passHref>
- <a className="no-underline">
- <IconPanel title="ReactJS" icon="/docs/img/icons/react-icon" />
- </a>
- </Link>
- <Link href={`/guides/getting-started/quickstarts/nextjs`} passHref>
- <a className="no-underline">
- <IconPanel title="NextJS" icon="/docs/img/icons/nextjs-icon" />
- </a>
- </Link>
- <Link href={`/guides/getting-started/quickstarts/redwoodjs`} passHref>
- <a className="no-underline">
- <IconPanel title="RedwoodJS" icon="/docs/img/icons/redwoodjs-icon" />
- </a>
- </Link>
- <Link href={`/guides/getting-started/quickstarts/flutter`} passHref>
- <a className="no-underline">
- <IconPanel title="Flutter" icon="/docs/img/icons/flutter-icon" />
- </a>
- </Link>
- <Link href={`/guides/getting-started/quickstarts/sveltekit`} passHref>
- <a className="no-underline">
- <IconPanel title="SvelteKit" icon="/docs/img/icons/svelte-icon" />
- </a>
- </Link>
- <Link href={`/guides/getting-started/quickstarts/solidjs`} passHref>
- <a className="no-underline">
- <IconPanel title="SolidJS" icon="/docs/img/icons/solidjs-icon" />
- </a>
- </Link>
- <Link href={`/guides/getting-started/quickstarts/vue`} passHref>
- <a className="no-underline">
- <IconPanel title="Vue" icon="/docs/img/icons/vuejs-icon" />
- </a>
- </Link>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- <div
- className="
- border
- relative
- px-8 md:px-12 h-20
- border-scale-400
- overflow-hidden
- min-w-full
- rounded-lg
- flex flex-row gap-6 items-center
- "
- >
-
- <img
- className="w-[48px] lg:w-[64px]"
- src="/docs/img/cards/tutorials-small.svg"
- />
- <img
- className="z-0 absolute -left-32 -bottom-48 w-[320px]"
- src="/docs/img/purple-glow-dark.png"
- />
- <div className="
- flex flex-col md:flex-row not-prose
- h-full justify-center
- md:items-center md:gap-3
- ">
- <h2 className="text-sm lg:text-base text-scale-1200 m-0">Ready to make a fully working app?</h2>
- <p className="text-sm lg:text-base text-scale-1100 m-0">Follow the step-by-step <Link href="/guides/getting-started#web-app-tutorials"><a className="m-0 text-scale-1200 underline">tutorials</a></Link>.</p>
- </div>
-
- </div>
-</div>
+<div className="flex flex-col gap-12 mb-12">
<div>
<div className="max-w-xl">
- ### Product Documentation
+ ### Products
</div>
@@ -359,6 +234,6 @@ export const platform = [
},
]
-export const Page = ({ children }) => <Layout meta={meta} children={children} />
+export const Page = ({ children }) => <HomeLayout meta={meta} children={children} />
export default Page
diff --git a/apps/docs/pages/reference/cli/config.tsx b/apps/docs/pages/reference/cli/config.tsx
index a40295b3802..237476c60eb 100644
--- a/apps/docs/pages/reference/cli/config.tsx
+++ b/apps/docs/pages/reference/cli/config.tsx
@@ -26,7 +26,7 @@ export default function Config() {
<Head>
<title>Supabase CLI config</title>
</Head>
- <div className="grid grid-cols-12 relative gap-4">
+ <div className="grid grid-cols-12 relative gap-4 px-5 max-w-7xl mx-auto py-16">
<div className="relative col-span-12 md:col-span-9 transition-all ease-out duration-100">
<div className="w-full prose">
<h1 className="">CLI configuration</h1>
diff --git a/apps/docs/public/img/icons/supabase-docs.svg b/apps/docs/public/img/icons/supabase-docs.svg
new file mode 100644
index 00000000000..f9980586742
--- /dev/null
+++ b/apps/docs/public/img/icons/supabase-docs.svg
@@ -0,0 +1,48 @@
+<svg width="126" height="184" viewBox="0 0 126 184" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M22.2559 34.7394H104.043C115.676 34.7394 125.106 44.1698 125.106 55.8028V128.504C125.106 140.137 115.676 149.567 104.043 149.567H22.2559C10.6229 149.567 1.19249 140.137 1.19249 128.504V55.8028C1.19249 44.1698 10.6229 34.7394 22.2559 34.7394ZM0.644531 55.8028C0.644531 43.8672 10.3203 34.1914 22.2559 34.1914H104.043C115.979 34.1914 125.654 43.8671 125.654 55.8028V128.504C125.654 140.44 115.979 150.115 104.043 150.115H22.2559C10.3203 150.115 0.644531 140.44 0.644531 128.504V55.8028ZM75.8132 37.6389H104.899L104.94 37.6389C99.389 39.2596 95.2937 44.2945 95.0809 50.3176H95.0078V63.9378H90.596C83.621 57.256 74.158 53.1505 63.7362 53.1505L63.7337 53.1505L75.8418 37.6612L75.8132 37.6389ZM91.1567 64.4858H95.0078V68.9554C93.8376 67.369 92.5496 65.8748 91.1567 64.4858ZM63.7362 53.6985C73.8036 53.6985 82.9634 57.5843 89.7977 63.9378L63.7067 63.9378V53.6985L63.7362 53.6985ZM90.375 64.4858L63.7067 64.4858V81.9098H95.0078V69.891C93.6324 67.9477 92.0803 66.1381 90.375 64.4858ZM63.1588 53.886V63.9378H55.3012L63.1588 53.886ZM63.1588 64.4858H54.8728L41.2524 81.9098H63.1588L63.1588 64.4858ZM62.5969 53.7151L54.6057 63.9378L37.6746 63.9378C44.2502 57.8248 52.9786 53.9962 62.5969 53.7151ZM54.1773 64.4858L37.0973 64.4858C34.85 66.6633 32.8689 69.1137 31.2073 71.7838V81.9098H40.5569L54.1773 64.4858ZM63.0333 53.1567C52.8892 53.3368 43.6942 57.4065 36.8763 63.9378H31.2073V51.4967C31.2185 51.2695 31.2242 51.0408 31.2242 50.8108C31.2242 44.5707 27.0583 39.3036 21.356 37.639L21.4067 37.6389H63.1588V52.9962L63.0333 53.1567ZM36.3156 64.4858H31.2073V70.7648C32.6903 68.496 34.4042 66.3919 36.3156 64.4858ZM30.6594 54.7194V63.9378L21.506 63.9378C25.8961 62.6012 29.353 59.1227 30.6594 54.7194ZM30.6594 64.4858L18.6211 64.4858C18.2528 64.5155 17.8803 64.5306 17.5043 64.5306C11.2643 64.5306 5.99721 60.3647 4.33253 54.6624L4.33246 54.7132V81.9098H26.2223C27.2054 78.2396 28.7128 74.7838 30.6594 71.6276V64.4858ZM18.0106 63.9378H18.5985C25.1405 63.3999 30.3278 58.0812 30.6594 51.4828V50.3176H30.6671C30.4304 43.8848 25.5806 38.6302 19.3282 37.7641C11.56 38.7069 5.40049 44.8664 4.4577 52.6346C5.34576 59.046 10.8485 63.9826 17.5043 63.9826C17.6739 63.9826 17.8426 63.9794 18.0106 63.9731V63.9378ZM107.675 64.4858L95.5558 64.4858V69.7174C98.0087 73.2162 99.8992 77.1381 101.096 81.3519L115.985 62.496C113.894 63.7862 111.43 64.5306 108.792 64.5306C108.416 64.5306 108.044 64.5155 107.675 64.4858ZM95.5558 63.9378L104.79 63.9378C100.306 62.5725 96.7952 58.9721 95.5558 54.4341V63.9378ZM108.293 63.9378V63.9733C108.458 63.9795 108.625 63.9826 108.792 63.9826C111.996 63.9826 114.933 62.8387 117.216 60.937L117.302 60.8279L117.325 60.8456C119.735 58.794 121.397 55.8893 121.844 52.5985C120.886 44.8456 114.731 38.7028 106.973 37.7635C100.559 38.6497 95.6202 44.1535 95.6202 50.8108C95.6202 57.717 100.935 63.3818 107.698 63.9378H108.293ZM75.1637 37.6389H63.7067V52.2953L75.1637 37.6389ZM40.1285 82.4577H31.2073V93.8702L40.1285 82.4577ZM31.2073 94.7599L40.824 82.4577L63.1588 82.4577V100.26H31.2073V94.7599ZM30.6594 94.5712V82.4577H26.6453C25.8655 85.5033 25.4508 88.6951 25.4508 91.9838C25.4508 94.7774 25.75 97.5012 26.3181 100.125L30.6594 94.5712ZM26.9075 100.26L30.6594 95.4609V100.26H26.9075ZM26.4743 100.815L26.4792 100.808H30.6594V111.276C28.7788 108.058 27.3542 104.542 26.4743 100.815ZM25.7837 100.808H4.33246V129.576L4.33255 129.633C4.99897 127.351 6.2427 125.314 7.89504 123.692L25.7837 100.808ZM9.82367 122.115L26.0437 101.365C27.0183 105.294 28.5909 108.986 30.6594 112.34V119.805H18.5541C18.2076 119.779 17.8575 119.765 17.5043 119.765C14.6586 119.765 12.0153 120.632 9.82367 122.115ZM18.0106 120.323V120.353H18.5329C25.1058 120.86 30.3266 126.193 30.6594 132.813V134.067H30.6636C30.3859 140.45 25.5657 145.654 19.3554 146.528C11.5756 145.596 5.4036 139.433 4.45816 131.658C4.79522 129.229 5.79462 127.012 7.26807 125.195L7.35999 125.267L8.30432 124.059C10.6784 121.741 13.9246 120.313 17.5043 120.313C17.6739 120.313 17.8426 120.316 18.0106 120.323ZM21.4888 120.353H30.6594V129.576C29.3513 125.167 25.8871 121.686 21.4888 120.353ZM31.2073 120.353V132.799C31.2185 133.026 31.2242 133.255 31.2242 133.485C31.2242 139.716 27.07 144.977 21.38 146.65L21.4067 146.65H49.5349L62.0648 130.782C52.4718 130.376 43.7794 126.489 37.2175 120.353H31.2073ZM38.0264 120.353C44.5343 126.254 53.0816 129.947 62.4854 130.249L63.1588 129.396V120.353L38.0264 120.353ZM63.1588 119.805L37.4347 119.805C35.048 117.548 32.9516 114.987 31.2073 112.184V100.808H63.1588L63.1588 119.805ZM63.7067 120.353V128.702L70.2998 120.353H63.7067ZM70.7325 119.805H63.7067V100.808H85.7326L70.7325 119.805ZM70.998 120.353L63.7067 129.587V130.269L63.7362 130.269C73.6318 130.269 82.6506 126.515 89.4459 120.353H70.998ZM90.0376 119.805H71.4307L86.4308 100.808H95.0078V114.077C93.5422 116.147 91.876 118.066 90.0376 119.805ZM90.2548 120.353C83.3138 126.844 73.989 130.817 63.7362 130.817L63.7067 130.817V146.65H104.899L104.916 146.65C99.4046 145.03 95.3339 140.042 95.0844 134.067H95.0078V120.353H90.2548ZM95.0078 119.805H90.8289C92.348 118.325 93.7464 116.722 95.0078 115.012V119.805ZM95.5558 120.353V129.862C96.7967 125.318 100.315 121.714 104.808 120.353H95.5558ZM107.742 119.805H95.5558V114.25C98.3561 110.256 100.423 105.71 101.562 100.808H121.973V129.576L121.973 129.665C120.319 123.947 115.044 119.765 108.792 119.765C108.439 119.765 108.089 119.779 107.742 119.805ZM107.763 120.353H108.293V120.323C108.458 120.316 108.625 120.313 108.792 120.313C115.459 120.313 120.969 125.267 121.843 131.694C120.883 139.454 114.715 145.6 106.945 146.529C100.545 145.631 95.6202 140.133 95.6202 133.485C95.6202 126.557 100.97 120.878 107.763 120.353ZM36.6434 119.805H31.2073V113.203C32.7745 115.601 34.5997 117.814 36.6434 119.805ZM63.1588 37.0909H21.4067C20.7051 37.0909 20.013 37.1319 19.3327 37.2117C18.7346 37.1321 18.1243 37.0909 17.5043 37.0909C9.92708 37.0909 3.7845 43.2335 3.7845 50.8108C3.7845 51.4307 3.82562 52.041 3.90527 52.6391C3.82551 53.3194 3.7845 54.0115 3.7845 54.7132V129.576C3.7845 130.279 3.82566 130.972 3.90571 131.653C3.82577 132.253 3.7845 132.864 3.7845 133.485C3.7845 141.062 9.92708 147.205 17.5043 147.205C18.134 147.205 18.7538 147.162 19.3609 147.08C20.0321 147.158 20.7148 147.198 21.4067 147.198H104.899C105.589 147.198 106.27 147.158 106.94 147.081C107.546 147.163 108.164 147.205 108.792 147.205C116.369 147.205 122.512 141.062 122.512 133.485C122.512 132.877 122.472 132.278 122.396 131.691C122.479 130.997 122.521 130.291 122.521 129.576V54.7132C122.521 53.9986 122.479 53.294 122.396 52.6016C122.472 52.0155 122.512 51.4177 122.512 50.8108C122.512 43.2335 116.369 37.0909 108.792 37.0909C108.174 37.0909 107.565 37.1319 106.968 37.2111C106.289 37.1317 105.599 37.0909 104.899 37.0909H63.7067V37.035H63.1588V37.0909ZM63.7067 100.26L63.7067 82.4577H95.0078V89.0621L86.1653 100.26H63.7067ZM86.8635 100.26L95.0078 89.9463V100.26H86.8635ZM62.7449 130.805L50.2331 146.65H63.1588V130.813C63.0206 130.811 62.8827 130.808 62.7449 130.805ZM100.85 82.5478L95.5558 89.2524V100.26H101.125C101.712 97.5952 102.021 94.8256 102.021 91.9838C102.021 88.7275 101.615 85.5662 100.85 82.5478ZM95.5558 88.3682L100.223 82.4577H95.5558V88.3682ZM100.656 81.9098L100.675 81.8846C99.5741 77.8469 97.8284 74.075 95.5558 70.6863V81.9098H100.656ZM121.967 81.9098H101.354L117.611 61.321C119.666 59.595 121.207 57.2775 121.973 54.6306L121.973 54.7132V100.26H101.686C102.265 97.5934 102.569 94.8242 102.569 91.9838C102.569 88.6971 102.161 85.5058 101.392 82.4577H121.967V81.9098ZM30.6594 81.9098V72.6921C28.9892 75.5495 27.6787 78.6428 26.79 81.9098H30.6594ZM121.953 134.033C120.343 140.207 115.469 145.064 109.284 146.648C116.149 146.396 121.672 140.89 121.953 134.033ZM4.34196 133.99C4.60129 140.871 10.1391 146.401 17.0233 146.648C10.8233 145.061 5.94006 140.186 4.34196 133.99ZM95.5558 113.281V100.808H101C99.9332 105.328 98.066 109.538 95.5558 113.281ZM24.9028 91.9838C24.9028 94.8242 25.2078 97.5934 25.7868 100.26H4.33246V82.4577H26.0798C25.3112 85.5058 24.9028 88.6971 24.9028 91.9838ZM121.952 50.2548C121.668 43.4118 116.163 37.9171 109.316 37.6491C115.486 39.2416 120.346 44.0913 121.952 50.2548ZM4.34227 50.2976C5.93793 44.1132 10.8068 39.2444 16.9911 37.6487C10.1246 37.9118 4.60534 43.4311 4.34227 50.2976Z" fill="url(#paint0_radial_1182_99510)"/>
+<g filter="url(#filter0_bd_1182_99510)">
+<path d="M63.4277 37.0359L63.4277 146.828" stroke="white" stroke-opacity="0.2" stroke-width="0.547955" shape-rendering="crispEdges"/>
+</g>
+<g filter="url(#filter1_d_1182_99510)">
+<path d="M63.0245 121.699C63.0655 124.429 67.1949 125.601 68.8946 123.463L94.5445 91.1876C97.5719 87.3782 94.8566 81.7601 89.988 81.7601H63.6308L63.672 60.962C63.631 58.2314 59.6624 57.0595 57.9627 59.1983L32.9366 91.4731C29.9091 95.2826 32.6245 100.901 37.4932 100.901H62.7292L63.0245 121.699Z" fill="url(#paint1_linear_1182_99510)" fill-opacity="0.79" shape-rendering="crispEdges"/>
+<path d="M63.0829 81.759L63.6308 82.308H89.988C94.3989 82.308 96.857 87.3971 94.1155 90.8467L68.4656 123.122C67.7931 123.968 66.5944 124.204 65.4919 123.881C64.3905 123.558 63.5882 122.74 63.5724 121.691L63.2771 100.893L62.7292 100.353H37.4932C33.0821 100.353 30.6241 95.2637 33.3656 91.814L33.3656 91.8141L33.3696 91.8089L58.3916 59.5392C58.3923 59.5384 58.3929 59.5376 58.3935 59.5368C59.07 58.6879 60.2294 58.4597 61.2803 58.7785C62.3287 59.0965 63.106 59.9053 63.124 60.9658L63.0829 81.759Z" stroke="url(#paint2_linear_1182_99510)" stroke-width="1.09591" stroke-miterlimit="10" stroke-linejoin="bevel" shape-rendering="crispEdges"/>
+</g>
+<defs>
+<filter id="filter0_bd_1182_99510" x="26.6328" y="0.513611" width="73.59" height="182.836" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feGaussianBlur in="BackgroundImageFix" stdDeviation="3.26771"/>
+<feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1182_99510"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset/>
+<feGaussianBlur stdDeviation="18.2608"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.0625833 0 0 0 0 0.0135417 0 0 0 0 0.125 0 0 0 0.75 0"/>
+<feBlend mode="normal" in2="effect1_backgroundBlur_1182_99510" result="effect2_dropShadow_1182_99510"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_1182_99510" result="shape"/>
+</filter>
+<filter id="filter1_d_1182_99510" x="27.2804" y="58.0938" width="72.9196" height="75.2399" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="4.38364"/>
+<feGaussianBlur stdDeviation="2.19182"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1182_99510"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1182_99510" result="shape"/>
+</filter>
+<radialGradient id="paint0_radial_1182_99510" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(65.661 92.1522) rotate(-180) scale(127.529 57.9608)">
+<stop stop-color="#EBEBEB" stop-opacity="0.5"/>
+<stop offset="0.9999" stop-color="#C699FF" stop-opacity="0"/>
+<stop offset="1" stop-color="#989898" stop-opacity="0"/>
+</radialGradient>
+<linearGradient id="paint1_linear_1182_99510" x1="77.7052" y1="58.0937" x2="63.6386" y2="137.723" gradientUnits="userSpaceOnUse">
+<stop stop-color="#212121"/>
+<stop offset="1" stop-color="white" stop-opacity="0.12"/>
+</linearGradient>
+<linearGradient id="paint2_linear_1182_99510" x1="95.8154" y1="76.078" x2="51.6684" y2="122.642" gradientUnits="userSpaceOnUse">
+<stop stop-color="#868585"/>
+<stop offset="0.208333" stop-color="#838383"/>
+<stop offset="1" stop-color="#5A5A5A"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/apps/docs/public/img/icons/supabase-docs2.svg b/apps/docs/public/img/icons/supabase-docs2.svg
new file mode 100644
index 00000000000..f9980586742
--- /dev/null
+++ b/apps/docs/public/img/icons/supabase-docs2.svg
@@ -0,0 +1,48 @@
+<svg width="126" height="184" viewBox="0 0 126 184" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M22.2559 34.7394H104.043C115.676 34.7394 125.106 44.1698 125.106 55.8028V128.504C125.106 140.137 115.676 149.567 104.043 149.567H22.2559C10.6229 149.567 1.19249 140.137 1.19249 128.504V55.8028C1.19249 44.1698 10.6229 34.7394 22.2559 34.7394ZM0.644531 55.8028C0.644531 43.8672 10.3203 34.1914 22.2559 34.1914H104.043C115.979 34.1914 125.654 43.8671 125.654 55.8028V128.504C125.654 140.44 115.979 150.115 104.043 150.115H22.2559C10.3203 150.115 0.644531 140.44 0.644531 128.504V55.8028ZM75.8132 37.6389H104.899L104.94 37.6389C99.389 39.2596 95.2937 44.2945 95.0809 50.3176H95.0078V63.9378H90.596C83.621 57.256 74.158 53.1505 63.7362 53.1505L63.7337 53.1505L75.8418 37.6612L75.8132 37.6389ZM91.1567 64.4858H95.0078V68.9554C93.8376 67.369 92.5496 65.8748 91.1567 64.4858ZM63.7362 53.6985C73.8036 53.6985 82.9634 57.5843 89.7977 63.9378L63.7067 63.9378V53.6985L63.7362 53.6985ZM90.375 64.4858L63.7067 64.4858V81.9098H95.0078V69.891C93.6324 67.9477 92.0803 66.1381 90.375 64.4858ZM63.1588 53.886V63.9378H55.3012L63.1588 53.886ZM63.1588 64.4858H54.8728L41.2524 81.9098H63.1588L63.1588 64.4858ZM62.5969 53.7151L54.6057 63.9378L37.6746 63.9378C44.2502 57.8248 52.9786 53.9962 62.5969 53.7151ZM54.1773 64.4858L37.0973 64.4858C34.85 66.6633 32.8689 69.1137 31.2073 71.7838V81.9098H40.5569L54.1773 64.4858ZM63.0333 53.1567C52.8892 53.3368 43.6942 57.4065 36.8763 63.9378H31.2073V51.4967C31.2185 51.2695 31.2242 51.0408 31.2242 50.8108C31.2242 44.5707 27.0583 39.3036 21.356 37.639L21.4067 37.6389H63.1588V52.9962L63.0333 53.1567ZM36.3156 64.4858H31.2073V70.7648C32.6903 68.496 34.4042 66.3919 36.3156 64.4858ZM30.6594 54.7194V63.9378L21.506 63.9378C25.8961 62.6012 29.353 59.1227 30.6594 54.7194ZM30.6594 64.4858L18.6211 64.4858C18.2528 64.5155 17.8803 64.5306 17.5043 64.5306C11.2643 64.5306 5.99721 60.3647 4.33253 54.6624L4.33246 54.7132V81.9098H26.2223C27.2054 78.2396 28.7128 74.7838 30.6594 71.6276V64.4858ZM18.0106 63.9378H18.5985C25.1405 63.3999 30.3278 58.0812 30.6594 51.4828V50.3176H30.6671C30.4304 43.8848 25.5806 38.6302 19.3282 37.7641C11.56 38.7069 5.40049 44.8664 4.4577 52.6346C5.34576 59.046 10.8485 63.9826 17.5043 63.9826C17.6739 63.9826 17.8426 63.9794 18.0106 63.9731V63.9378ZM107.675 64.4858L95.5558 64.4858V69.7174C98.0087 73.2162 99.8992 77.1381 101.096 81.3519L115.985 62.496C113.894 63.7862 111.43 64.5306 108.792 64.5306C108.416 64.5306 108.044 64.5155 107.675 64.4858ZM95.5558 63.9378L104.79 63.9378C100.306 62.5725 96.7952 58.9721 95.5558 54.4341V63.9378ZM108.293 63.9378V63.9733C108.458 63.9795 108.625 63.9826 108.792 63.9826C111.996 63.9826 114.933 62.8387 117.216 60.937L117.302 60.8279L117.325 60.8456C119.735 58.794 121.397 55.8893 121.844 52.5985C120.886 44.8456 114.731 38.7028 106.973 37.7635C100.559 38.6497 95.6202 44.1535 95.6202 50.8108C95.6202 57.717 100.935 63.3818 107.698 63.9378H108.293ZM75.1637 37.6389H63.7067V52.2953L75.1637 37.6389ZM40.1285 82.4577H31.2073V93.8702L40.1285 82.4577ZM31.2073 94.7599L40.824 82.4577L63.1588 82.4577V100.26H31.2073V94.7599ZM30.6594 94.5712V82.4577H26.6453C25.8655 85.5033 25.4508 88.6951 25.4508 91.9838C25.4508 94.7774 25.75 97.5012 26.3181 100.125L30.6594 94.5712ZM26.9075 100.26L30.6594 95.4609V100.26H26.9075ZM26.4743 100.815L26.4792 100.808H30.6594V111.276C28.7788 108.058 27.3542 104.542 26.4743 100.815ZM25.7837 100.808H4.33246V129.576L4.33255 129.633C4.99897 127.351 6.2427 125.314 7.89504 123.692L25.7837 100.808ZM9.82367 122.115L26.0437 101.365C27.0183 105.294 28.5909 108.986 30.6594 112.34V119.805H18.5541C18.2076 119.779 17.8575 119.765 17.5043 119.765C14.6586 119.765 12.0153 120.632 9.82367 122.115ZM18.0106 120.323V120.353H18.5329C25.1058 120.86 30.3266 126.193 30.6594 132.813V134.067H30.6636C30.3859 140.45 25.5657 145.654 19.3554 146.528C11.5756 145.596 5.4036 139.433 4.45816 131.658C4.79522 129.229 5.79462 127.012 7.26807 125.195L7.35999 125.267L8.30432 124.059C10.6784 121.741 13.9246 120.313 17.5043 120.313C17.6739 120.313 17.8426 120.316 18.0106 120.323ZM21.4888 120.353H30.6594V129.576C29.3513 125.167 25.8871 121.686 21.4888 120.353ZM31.2073 120.353V132.799C31.2185 133.026 31.2242 133.255 31.2242 133.485C31.2242 139.716 27.07 144.977 21.38 146.65L21.4067 146.65H49.5349L62.0648 130.782C52.4718 130.376 43.7794 126.489 37.2175 120.353H31.2073ZM38.0264 120.353C44.5343 126.254 53.0816 129.947 62.4854 130.249L63.1588 129.396V120.353L38.0264 120.353ZM63.1588 119.805L37.4347 119.805C35.048 117.548 32.9516 114.987 31.2073 112.184V100.808H63.1588L63.1588 119.805ZM63.7067 120.353V128.702L70.2998 120.353H63.7067ZM70.7325 119.805H63.7067V100.808H85.7326L70.7325 119.805ZM70.998 120.353L63.7067 129.587V130.269L63.7362 130.269C73.6318 130.269 82.6506 126.515 89.4459 120.353H70.998ZM90.0376 119.805H71.4307L86.4308 100.808H95.0078V114.077C93.5422 116.147 91.876 118.066 90.0376 119.805ZM90.2548 120.353C83.3138 126.844 73.989 130.817 63.7362 130.817L63.7067 130.817V146.65H104.899L104.916 146.65C99.4046 145.03 95.3339 140.042 95.0844 134.067H95.0078V120.353H90.2548ZM95.0078 119.805H90.8289C92.348 118.325 93.7464 116.722 95.0078 115.012V119.805ZM95.5558 120.353V129.862C96.7967 125.318 100.315 121.714 104.808 120.353H95.5558ZM107.742 119.805H95.5558V114.25C98.3561 110.256 100.423 105.71 101.562 100.808H121.973V129.576L121.973 129.665C120.319 123.947 115.044 119.765 108.792 119.765C108.439 119.765 108.089 119.779 107.742 119.805ZM107.763 120.353H108.293V120.323C108.458 120.316 108.625 120.313 108.792 120.313C115.459 120.313 120.969 125.267 121.843 131.694C120.883 139.454 114.715 145.6 106.945 146.529C100.545 145.631 95.6202 140.133 95.6202 133.485C95.6202 126.557 100.97 120.878 107.763 120.353ZM36.6434 119.805H31.2073V113.203C32.7745 115.601 34.5997 117.814 36.6434 119.805ZM63.1588 37.0909H21.4067C20.7051 37.0909 20.013 37.1319 19.3327 37.2117C18.7346 37.1321 18.1243 37.0909 17.5043 37.0909C9.92708 37.0909 3.7845 43.2335 3.7845 50.8108C3.7845 51.4307 3.82562 52.041 3.90527 52.6391C3.82551 53.3194 3.7845 54.0115 3.7845 54.7132V129.576C3.7845 130.279 3.82566 130.972 3.90571 131.653C3.82577 132.253 3.7845 132.864 3.7845 133.485C3.7845 141.062 9.92708 147.205 17.5043 147.205C18.134 147.205 18.7538 147.162 19.3609 147.08C20.0321 147.158 20.7148 147.198 21.4067 147.198H104.899C105.589 147.198 106.27 147.158 106.94 147.081C107.546 147.163 108.164 147.205 108.792 147.205C116.369 147.205 122.512 141.062 122.512 133.485C122.512 132.877 122.472 132.278 122.396 131.691C122.479 130.997 122.521 130.291 122.521 129.576V54.7132C122.521 53.9986 122.479 53.294 122.396 52.6016C122.472 52.0155 122.512 51.4177 122.512 50.8108C122.512 43.2335 116.369 37.0909 108.792 37.0909C108.174 37.0909 107.565 37.1319 106.968 37.2111C106.289 37.1317 105.599 37.0909 104.899 37.0909H63.7067V37.035H63.1588V37.0909ZM63.7067 100.26L63.7067 82.4577H95.0078V89.0621L86.1653 100.26H63.7067ZM86.8635 100.26L95.0078 89.9463V100.26H86.8635ZM62.7449 130.805L50.2331 146.65H63.1588V130.813C63.0206 130.811 62.8827 130.808 62.7449 130.805ZM100.85 82.5478L95.5558 89.2524V100.26H101.125C101.712 97.5952 102.021 94.8256 102.021 91.9838C102.021 88.7275 101.615 85.5662 100.85 82.5478ZM95.5558 88.3682L100.223 82.4577H95.5558V88.3682ZM100.656 81.9098L100.675 81.8846C99.5741 77.8469 97.8284 74.075 95.5558 70.6863V81.9098H100.656ZM121.967 81.9098H101.354L117.611 61.321C119.666 59.595 121.207 57.2775 121.973 54.6306L121.973 54.7132V100.26H101.686C102.265 97.5934 102.569 94.8242 102.569 91.9838C102.569 88.6971 102.161 85.5058 101.392 82.4577H121.967V81.9098ZM30.6594 81.9098V72.6921C28.9892 75.5495 27.6787 78.6428 26.79 81.9098H30.6594ZM121.953 134.033C120.343 140.207 115.469 145.064 109.284 146.648C116.149 146.396 121.672 140.89 121.953 134.033ZM4.34196 133.99C4.60129 140.871 10.1391 146.401 17.0233 146.648C10.8233 145.061 5.94006 140.186 4.34196 133.99ZM95.5558 113.281V100.808H101C99.9332 105.328 98.066 109.538 95.5558 113.281ZM24.9028 91.9838C24.9028 94.8242 25.2078 97.5934 25.7868 100.26H4.33246V82.4577H26.0798C25.3112 85.5058 24.9028 88.6971 24.9028 91.9838ZM121.952 50.2548C121.668 43.4118 116.163 37.9171 109.316 37.6491C115.486 39.2416 120.346 44.0913 121.952 50.2548ZM4.34227 50.2976C5.93793 44.1132 10.8068 39.2444 16.9911 37.6487C10.1246 37.9118 4.60534 43.4311 4.34227 50.2976Z" fill="url(#paint0_radial_1182_99510)"/>
+<g filter="url(#filter0_bd_1182_99510)">
+<path d="M63.4277 37.0359L63.4277 146.828" stroke="white" stroke-opacity="0.2" stroke-width="0.547955" shape-rendering="crispEdges"/>
+</g>
+<g filter="url(#filter1_d_1182_99510)">
+<path d="M63.0245 121.699C63.0655 124.429 67.1949 125.601 68.8946 123.463L94.5445 91.1876C97.5719 87.3782 94.8566 81.7601 89.988 81.7601H63.6308L63.672 60.962C63.631 58.2314 59.6624 57.0595 57.9627 59.1983L32.9366 91.4731C29.9091 95.2826 32.6245 100.901 37.4932 100.901H62.7292L63.0245 121.699Z" fill="url(#paint1_linear_1182_99510)" fill-opacity="0.79" shape-rendering="crispEdges"/>
+<path d="M63.0829 81.759L63.6308 82.308H89.988C94.3989 82.308 96.857 87.3971 94.1155 90.8467L68.4656 123.122C67.7931 123.968 66.5944 124.204 65.4919 123.881C64.3905 123.558 63.5882 122.74 63.5724 121.691L63.2771 100.893L62.7292 100.353H37.4932C33.0821 100.353 30.6241 95.2637 33.3656 91.814L33.3656 91.8141L33.3696 91.8089L58.3916 59.5392C58.3923 59.5384 58.3929 59.5376 58.3935 59.5368C59.07 58.6879 60.2294 58.4597 61.2803 58.7785C62.3287 59.0965 63.106 59.9053 63.124 60.9658L63.0829 81.759Z" stroke="url(#paint2_linear_1182_99510)" stroke-width="1.09591" stroke-miterlimit="10" stroke-linejoin="bevel" shape-rendering="crispEdges"/>
+</g>
+<defs>
+<filter id="filter0_bd_1182_99510" x="26.6328" y="0.513611" width="73.59" height="182.836" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feGaussianBlur in="BackgroundImageFix" stdDeviation="3.26771"/>
+<feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_1182_99510"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset/>
+<feGaussianBlur stdDeviation="18.2608"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0.0625833 0 0 0 0 0.0135417 0 0 0 0 0.125 0 0 0 0.75 0"/>
+<feBlend mode="normal" in2="effect1_backgroundBlur_1182_99510" result="effect2_dropShadow_1182_99510"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_1182_99510" result="shape"/>
+</filter>
+<filter id="filter1_d_1182_99510" x="27.2804" y="58.0938" width="72.9196" height="75.2399" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
+<feFlood flood-opacity="0" result="BackgroundImageFix"/>
+<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
+<feOffset dy="4.38364"/>
+<feGaussianBlur stdDeviation="2.19182"/>
+<feComposite in2="hardAlpha" operator="out"/>
+<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
+<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1182_99510"/>
+<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1182_99510" result="shape"/>
+</filter>
+<radialGradient id="paint0_radial_1182_99510" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(65.661 92.1522) rotate(-180) scale(127.529 57.9608)">
+<stop stop-color="#EBEBEB" stop-opacity="0.5"/>
+<stop offset="0.9999" stop-color="#C699FF" stop-opacity="0"/>
+<stop offset="1" stop-color="#989898" stop-opacity="0"/>
+</radialGradient>
+<linearGradient id="paint1_linear_1182_99510" x1="77.7052" y1="58.0937" x2="63.6386" y2="137.723" gradientUnits="userSpaceOnUse">
+<stop stop-color="#212121"/>
+<stop offset="1" stop-color="white" stop-opacity="0.12"/>
+</linearGradient>
+<linearGradient id="paint2_linear_1182_99510" x1="95.8154" y1="76.078" x2="51.6684" y2="122.642" gradientUnits="userSpaceOnUse">
+<stop stop-color="#868585"/>
+<stop offset="0.208333" stop-color="#838383"/>
+<stop offset="1" stop-color="#5A5A5A"/>
+</linearGradient>
+</defs>
+</svg>
diff --git a/packages/ui/src/components/IconPanel/IconPanel.tsx b/packages/ui/src/components/IconPanel/IconPanel.tsx
index 6bf869052ff..15815e443b3 100644
--- a/packages/ui/src/components/IconPanel/IconPanel.tsx
+++ b/packages/ui/src/components/IconPanel/IconPanel.tsx
@@ -1,11 +1,14 @@
import { useTheme } from 'common/Providers'
import * as React from 'react'
import { ChevronRight } from 'react-feather'
+import ReactTooltip from 'react-tooltip'
interface Props {
- title: string
+ title?: string
+ tooltip?: string
icon?: string | React.ReactNode
+ iconSize?: 'sm' | 'lg'
children?: React.ReactNode
background?: boolean
@@ -13,15 +16,19 @@ interface Props {
hasLightIcon?: boolean
showLink?: boolean
+ hideArrow?: boolean
}
const IconPanel = ({
title,
+ tooltip,
icon,
+ iconSize = 'sm',
children,
background = true,
hasLightIcon,
showLink = false,
+ hideArrow = false,
}: Props) => {
const { isDarkMode } = useTheme()
@@ -31,7 +38,7 @@ const IconPanel = ({
className={[
'relative',
'flex items-center justify-center shrink-0',
- 'h-10 w-10 rounded-lg',
+ iconSize === 'lg' ? 'h-16 w-16 rounded-lg' : 'h-10 w-10 rounded-lg',
'group',
'cursor-pointer',
'overflow-hidden',
@@ -48,44 +55,49 @@ const IconPanel = ({
}
return (
- <div className={['relative', 'group'].join(' ')}>
- <div className={['peer relative', 'flex flex-col', icon ? 'gap-6' : 'gap-2'].join(' ')}>
- <div className={['flex gap-3', children ? 'items-start' : 'items-center'].join(' ')}>
- {typeof icon === 'string' ? (
- <IconContainer>
- <img
- className="w-5"
- src={`${icon}${hasLightIcon && !isDarkMode ? '-light' : ''}.svg`}
- />
- </IconContainer>
- ) : (
- <IconContainer>{icon}</IconContainer>
- )}
- <div className="flex flex-col gap-1">
- <div className="flex items-center gap-3">
- <h5 className="text-base text-scale-1200 m-0">{title}</h5>
- <div
- className="
+ <>
+ <div className={['relative', 'group'].join(' ')} data-tip={tooltip}>
+ <div className={['peer relative', 'flex flex-col', icon ? 'gap-6' : 'gap-2'].join(' ')}>
+ <div className={['flex', children ? 'items-start gap-3' : 'items-center'].join(' ')}>
+ {typeof icon === 'string' ? (
+ <IconContainer>
+ <img
+ className={iconSize === 'lg' ? 'w-8' : 'w-5'}
+ src={`${icon}${hasLightIcon && !isDarkMode ? '-light' : ''}.svg`}
+ />
+ </IconContainer>
+ ) : (
+ <IconContainer>{icon}</IconContainer>
+ )}
+ <div className="flex flex-col gap-1">
+ <div className="flex items-center gap-3">
+ {title && <h5 className="text-base text-scale-1200 m-0">{title}</h5>}
+ {!hideArrow && (
+ <div
+ className="
transition-all ease-out -ml-1 opacity-0
text-scale-800
group-hover:opacity-100
group-hover:ml-0"
- >
- <ChevronRight strokeWidth={2} size={14} />
+ >
+ <ChevronRight strokeWidth={2} size={14} />
+ </div>
+ )}
</div>
+ {children && <span className="text-sm text-scale-1100 not-prose">{children}</span>}
+ {showLink && <span className="text-brand-900 justify-end text-sm">Learn more</span>}
</div>
- {children && <span className="text-sm text-scale-1100 not-prose">{children}</span>}
- {showLink && <span className="text-brand-900 justify-end text-sm">Learn more</span>}
</div>
</div>
- </div>
- <div
- className="
+ <div
+ className="
absolute transition-all ease-in
-z-10 -inset-3 rounded-2xl
bg-scale-200 dark:bg-whiteA-300 opacity-0 peer-hover:opacity-100"
- ></div>
- </div>
+ ></div>
+ </div>
+ {tooltip && <ReactTooltip effect={'solid'} place="top" className="!py-2 !px-4" />}
+ </>
)
}