Skip to content

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

updated nav bar

Jonathan Summers-Muir2d67782e7b18
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 0b1fa69bb03..5dbb79fa862 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -59,49 +59,41 @@ export const tutorials = {
name: 'Next.js',
url: '/guides/with-nextjs',
items: [],
- icon: '/img/icons/Next-icon.svg',
},
{
name: 'Angular',
url: '/guides/with-angular',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
{
name: 'Nuxt 3',
url: '/guides/with-nuxt-3',
items: [],
- icon: '/img/icons/Nuxt-icon.svg',
},
{
name: 'RedwoodJS',
url: '/guides/with-redwoodjs',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
{
name: 'SolidJS',
url: '/guides/with-solidjs',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
{
name: 'Svelte',
url: '/guides/with-svelte',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
{
name: 'SvelteKit',
url: '/guides/with-sveltekit',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
{
name: 'Vue 3',
url: '/guides/with-vue-3',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
],
},
@@ -112,13 +104,11 @@ export const tutorials = {
name: 'Flutter',
url: '/guides/with-flutter',
items: [],
- icon: '/img/icons/flutter-icon.svg',
},
{
name: 'Expo',
url: '/guides/with-expo',
items: [],
- icon: '/img/icons/menu/functions.svg',
},
],
},
@@ -129,19 +119,16 @@ export const tutorials = {
name: 'Ionic Angular',
url: '/guides/with-ionic-angular',
items: [],
- icon: '/img/icons/angular-icon.svg',
},
{
name: 'Ionic React',
url: '/guides/with-ionic-react',
items: [],
- icon: '/img/icons/react-icon.svg',
},
{
name: 'Ionic Vue',
url: '/guides/with-ionic-vue',
items: [],
- icon: '/img/icons/Ionic-icon.svg',
},
],
},
@@ -160,8 +147,18 @@ export const auth = {
icon: '/img/icons/menu/auth.svg',
label: 'Auth',
extras: [
- { name: 'API Reference', level: 'integrations', items: [] },
- { name: 'Integrations', level: 'reference', items: [] },
+ {
+ name: 'API Reference',
+ level: 'integrations',
+ items: [],
+ icon: '/img/icons/menu/reference.svg',
+ },
+ {
+ name: 'Integrations',
+ level: 'reference',
+ items: [],
+ icon: '/img/icons/menu/integrations.svg',
+ },
],
items: [
{
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
index e72d8997f92..24c1cc58564 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
@@ -93,20 +93,28 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, tempBasePath, id }) =
</div>
)
})}
- {menu.extras && <div className="h-px w-full bg-green-500 my-3"></div>}
+ {menu.extras && (
+ <>
+ <div className="h-px w-full bg-green-500 my-3"></div>
+ <span className="font-mono text-xs uppercase text-scale-1200 font-medium tracking-wider mb-2">
+ Resources
+ </span>
+ </>
+ )}
{menu.extras?.map((x) => {
return (
<div>
- <span className="font-mono text-xs uppercase text-scale-1200 font-medium tracking-wider">
- {x.name}
- </span>
- {x.items.map((x) => {
- return (
- <li className="transition text-scale-1000 text-sm hover:text-brand-900">
- {x.name}
- </li>
- )
- })}
+ <li>
+ <a
+ onClick={() => {
+ router.push(`/${tempBasePath}${x.href}`)
+ }}
+ className="cursor-pointer transition text-scale-1100 text-sm hover:text-brand-900 flex gap-3 my-1"
+ >
+ {x.icon && <img className="w-4" src={`${router.basePath}${x.icon}`} />}
+ {x.name}
+ </a>
+ </li>
</div>
)
})}
diff --git a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
index f313968cbf3..482a78602e3 100644
--- a/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/TopNavBar.tsx
@@ -1,11 +1,11 @@
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from 'next/router'
-import { useState, useEffect, FC } from 'react'
-import { IconMenu, IconMoon, IconSearch, IconSun, IconCommand, Listbox } from 'ui'
-import { useTheme } from '~/components/Providers'
-import { REFERENCES } from '~/components/Navigation/Navigation.constants'
+import { FC, useEffect, useState } from 'react'
+import { Button, IconCommand, IconMenu, IconMoon, IconSearch, IconSun, Input, Listbox } from 'ui'
import { SearchButton } from '~/components/DocSearch'
+import { REFERENCES } from '~/components/Navigation/Navigation.constants'
+import { useTheme } from '~/components/Providers'
import { getPageType } from '~/lib/helpers'
@@ -65,133 +65,107 @@ const TopNavBar: FC = () => {
}
return (
- <nav
- className={[
- 'sticky top-0 z-10 flex items-center justify-between',
- 'h-[60px] border-b bg-white px-4 backdrop-blur backdrop-filter',
- 'dark:border-scale-400 dark:bg-scale-200',
- ].join(' ')}
- >
- <div className="flex items-center">
- <button className="mr-4 block stroke-2 lg:hidden" onClick={toggleMobileMenu}>
- <IconMenu className="text-scale-1100" />
- </button>
- {mounted && (
- <Link href="/">
- <a className="flex items-center">
- <Image
- className="cursor-pointer"
- src={isDarkMode ? '/docs/supabase-dark.svg' : '/docs/supabase-light.svg'}
- width={124}
- height={24}
- alt="Supabase Logo"
- />
- </a>
- </Link>
- )}
- {versions.length > 0 && (
- <div className="ml-8">
- <Listbox
- size="small"
- defaultValue={version}
- style={{ width: '70px' }}
- onChange={onSelectVersion}
- >
- {versions.map((version) => (
- <Listbox.Option key={version} label={version} value={version}>
- {version}
- </Listbox.Option>
- ))}
- </Listbox>
- </div>
- )}
- </div>
-
- <div className="flex items-center space-x-4">
- <div className="hidden items-center md:flex">
- <ul className="flex items-center">
- <li className="px-4">
- <a
- href="https://app.supabase.com"
- className="text-scale-1100 text-sm"
- target="_blank"
- rel="noreferrer noopener"
- >
- Dashboard
- </a>
- </li>
- <li className="px-4">
- <a
- href="https://github.com/supabase/supabase"
- target="_blank"
- rel="noreferrer noopener"
- >
- <div
- className="h-4 w-4 !bg-no-repeat !bg-center"
- style={{
- background: isDarkMode
- ? "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E\") 50% no-repeat"
- : "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E\")",
- }}
+ <nav className="h-[60px] border-b px-4 backdrop-blur backdrop-filter dark:bg-blackA-1200 dark:bg-blackA-300">
+ <div className="max-w-[1400px] grid grid-cols-12 mx-auto gap-4 px-5 h-full">
+ <div className="col-span-3 flex items-center">
+ <button className="mr-4 block stroke-2 lg:hidden" onClick={toggleMobileMenu}>
+ <IconMenu className="text-scale-1100" />
+ </button>
+ {mounted && (
+ <Link href="/">
+ <a className="flex items-center">
+ <Image
+ className="cursor-pointer"
+ src={isDarkMode ? '/docs/supabase-dark.svg' : '/docs/supabase-light.svg'}
+ width={124}
+ height={24}
+ alt="Supabase Logo"
/>
</a>
- </li>
- <li className="px-4">
- <a
- href="https://discord.supabase.com"
- rel="noreferrer noopener"
- target="_blank"
- className="text-scale-1100"
+ </Link>
+ )}
+ {versions.length > 0 && (
+ <div className="ml-8">
+ <Listbox
+ size="small"
+ defaultValue={version}
+ style={{ width: '70px' }}
+ onChange={onSelectVersion}
>
- <div
- className="h-4 w-4 !bg-no-repeat !bg-center"
- style={{
- background: isDarkMode
- ? "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 71 55' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M60.105 4.898A58.55 58.55 0 0 0 45.653.415a.22.22 0 0 0-.233.11 40.784 40.784 0 0 0-1.8 3.697c-5.456-.817-10.886-.817-16.23 0-.485-1.164-1.201-2.587-1.828-3.697a.228.228 0 0 0-.233-.11 58.386 58.386 0 0 0-14.451 4.483.207.207 0 0 0-.095.082C1.578 18.73-.944 32.144.293 45.39a.244.244 0 0 0 .093.167c6.073 4.46 11.955 7.167 17.729 8.962a.23.23 0 0 0 .249-.082 42.08 42.08 0 0 0 3.627-5.9.225.225 0 0 0-.123-.312 38.772 38.772 0 0 1-5.539-2.64.228.228 0 0 1-.022-.378c.372-.279.744-.569 1.1-.862a.22.22 0 0 1 .23-.03c11.619 5.304 24.198 5.304 35.68 0a.219.219 0 0 1 .233.027c.356.293.728.586 1.103.865a.228.228 0 0 1-.02.378 36.384 36.384 0 0 1-5.54 2.637.227.227 0 0 0-.121.315 47.249 47.249 0 0 0 3.624 5.897.225.225 0 0 0 .249.084c5.801-1.794 11.684-4.502 17.757-8.961a.228.228 0 0 0 .092-.164c1.48-15.315-2.48-28.618-10.497-40.412a.18.18 0 0 0-.093-.084Zm-36.38 32.427c-3.497 0-6.38-3.211-6.38-7.156 0-3.944 2.827-7.156 6.38-7.156 3.583 0 6.438 3.24 6.382 7.156 0 3.945-2.827 7.156-6.381 7.156Zm23.593 0c-3.498 0-6.38-3.211-6.38-7.156 0-3.944 2.826-7.156 6.38-7.156 3.582 0 6.437 3.24 6.38 7.156 0 3.945-2.798 7.156-6.38 7.156Z' fill='%23fff'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h71v55H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\") 50% no-repeat"
- : "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 71 55' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23a)'%3E%3Cpath d='M60.105 4.898A58.55 58.55 0 0 0 45.653.415a.22.22 0 0 0-.233.11 40.784 40.784 0 0 0-1.8 3.697c-5.456-.817-10.886-.817-16.23 0-.485-1.164-1.201-2.587-1.828-3.697a.228.228 0 0 0-.233-.11 58.386 58.386 0 0 0-14.451 4.483.207.207 0 0 0-.095.082C1.578 18.73-.944 32.144.293 45.39a.244.244 0 0 0 .093.167c6.073 4.46 11.955 7.167 17.729 8.962a.23.23 0 0 0 .249-.082 42.08 42.08 0 0 0 3.627-5.9.225.225 0 0 0-.123-.312 38.772 38.772 0 0 1-5.539-2.64.228.228 0 0 1-.022-.378c.372-.279.744-.569 1.1-.862a.22.22 0 0 1 .23-.03c11.619 5.304 24.198 5.304 35.68 0a.219.219 0 0 1 .233.027c.356.293.728.586 1.103.865a.228.228 0 0 1-.02.378 36.384 36.384 0 0 1-5.54 2.637.227.227 0 0 0-.121.315 47.249 47.249 0 0 0 3.624 5.897.225.225 0 0 0 .249.084c5.801-1.794 11.684-4.502 17.757-8.961a.228.228 0 0 0 .092-.164c1.48-15.315-2.48-28.618-10.497-40.412a.18.18 0 0 0-.093-.084Zm-36.38 32.427c-3.497 0-6.38-3.211-6.38-7.156 0-3.944 2.827-7.156 6.38-7.156 3.583 0 6.438 3.24 6.382 7.156 0 3.945-2.827 7.156-6.381 7.156Zm23.593 0c-3.498 0-6.38-3.211-6.38-7.156 0-3.944 2.826-7.156 6.38-7.156 3.582 0 6.437 3.24 6.38 7.156 0 3.945-2.798 7.156-6.38 7.156Z' fill='%2323272A'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='a'%3E%3Cpath fill='%23fff' d='M0 0h71v55H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E\")",
- }}
- />
- </a>
- </li>
- <li className="px-4">
- <a href="https://twitter.com/supabase" target="_blank" rel="noreferrer noopener">
- <div
- className="h-4 w-4 !bg-no-repeat !bg-center"
- style={{
- background: isDarkMode
- ? "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 335 276' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23fff' d='M302 70A195 195 0 0 1 3 245a142 142 0 0 0 97-30 70 70 0 0 1-58-47 70 70 0 0 0 31-2 70 70 0 0 1-57-66 70 70 0 0 0 28 5 70 70 0 0 1-18-90 195 195 0 0 0 141 72 67 67 0 0 1 116-62 117 117 0 0 0 43-17 65 65 0 0 1-31 38 117 117 0 0 0 39-11 65 65 0 0 1-32 35'/%3E%3C/svg%3E\") 50% no-repeat"
- : "url(\"data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 335 276' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M302 70A195 195 0 0 1 3 245a142 142 0 0 0 97-30 70 70 0 0 1-58-47 70 70 0 0 0 31-2 70 70 0 0 1-57-66 70 70 0 0 0 28 5 70 70 0 0 1-18-90 195 195 0 0 0 141 72 67 67 0 0 1 116-62 117 117 0 0 0 43-17 65 65 0 0 1-31 38 117 117 0 0 0 39-11 65 65 0 0 1-32 35'/%3E%3C/svg%3E\")",
- }}
- />
- </a>
- </li>
+ {versions.map((version) => (
+ <Listbox.Option key={version} label={version} value={version}>
+ {version}
+ </Listbox.Option>
+ ))}
+ </Listbox>
+ </div>
+ )}
+ </div>
+ <div className="col-span-5 flex items-center">
+ <div className="max-w-xl grow">
+ <SearchButton className="w-full">
+ <div
+ className="
+ flex
+ group
+ items-center
+ justify-between
+ bg-scaleA-200
+ border
+ transition
+ hover:border-scale-600
+ hover:bg-scaleA-300
+ border-scale-500 pl-3 pr-1.5 w-full h-[32px] rounded"
+ >
+ <div className="flex items-center space-x-2">
+ <IconSearch className="text-scale-1100" size={18} strokeWidth={2} />
+ <p className="text-scale-1100 text-sm group-hover:text-scale-1200 transition">
+ Search docs...
+ </p>
+ </div>
+ <div className="flex items-center space-x-1">
+ <div className="text-scale-1200 md:flex items-center justify-center h-5 w-10 border rounded bg-scale-500 border-scale-700 gap-1">
+ <IconCommand size={12} strokeWidth={1.5} />
+ <span className="text-[12px]">K</span>
+ </div>
+ </div>
+ </div>
+ </SearchButton>
+ </div>
+ </div>
+ <div className="col-span-4 flex items-center justify-end gap-3">
+ <Button type="default">Feedback</Button>
+ <Button
+ type="outline"
+ as="a"
+ // @ts-ignore
+ href="https://app.supabase.com"
+ className="text-scale-1100 text-sm"
+ target="_blank"
+ rel="noreferrer noopener"
+ >
+ Go to Dashboard
+ </Button>
+ <ul className="flex items-center">
<li className="px-4">
<div className="cursor-pointer" onClick={toggleDarkMode}>
{isDarkMode ? (
- <IconMoon size={18} strokeWidth={2} className="text-scale-1200" />
+ <IconMoon
+ size={16}
+ strokeWidth={1}
+ className="text-scale-1100 hover:text-scale-1200 transition"
+ />
) : (
- <IconSun size={18} strokeWidth={2} className="text-scale-1200" />
+ <IconSun
+ size={16}
+ strokeWidth={1}
+ className="text-scale-1100 hover:text-scale-1200 transition"
+ />
)}
</div>
</li>
</ul>
</div>
- <SearchButton>
- <div className="flex items-center justify-between space-x-6 bg-scale-300 border border-scale-700 pl-3 pr-1.5 py-1.5 rounded">
- <div className="flex items-center space-x-2">
- <IconSearch className="text-scale-1100" size={18} strokeWidth={2} />
- <p className="text-scale-800 text-sm">Search</p>
- </div>
- <div className="flex items-center space-x-1">
- <div className="hidden text-scale-1200 md:flex items-center justify-center h-6 w-6 rounded bg-scale-500">
- <IconCommand size={12} strokeWidth={1.5} />
- </div>
- <div className="hidden text-xs text-scale-1200 md:flex items-center justify-center h-6 w-6 rounded bg-scale-500">
- K
- </div>
- </div>
- </div>
- </SearchButton>
</div>
</nav>
)
diff --git a/apps/docs/layouts/SiteLayout.tsx b/apps/docs/layouts/SiteLayout.tsx
index 5ec2ad6ed51..9fd3b1dba99 100644
--- a/apps/docs/layouts/SiteLayout.tsx
+++ b/apps/docs/layouts/SiteLayout.tsx
@@ -10,9 +10,9 @@ const Layout = ({ children }) => {
<main>
<img
src={`${router.basePath}/img/gradient-bg.png`}
- className="absolute left-0 w-[520px] top-0"
+ className="absolute left-0 w-[520px] top-0 -z-10"
/>
- <div className="max-w-[1400px] mx-auto">
+ <div className="mx-auto sticky top-0 z-10">
<TopNavBar />
</div>
<div className="grid grid-cols-12 opacity-100 duration-100 max-w-[1400px] mx-auto py-16 gap-4 px-5">