Skip to content

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

Fix light-dark icons in nav

Terry Suttond3bd00b4cad9
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
index 227120c01af..f003826d2be 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
@@ -37,7 +37,7 @@ export const REFERENCES: References = {
}
export const gettingstarted = {
- icon: '/img/icons/menu/getting-started.svg',
+ icon: 'getting-started',
title: 'Getting started',
label: 'Overview',
items: [
@@ -48,7 +48,7 @@ export const gettingstarted = {
}
export const tutorials = {
- icon: '/img/icons/menu/tutorials.svg',
+ icon: 'tutorials',
label: 'Quickstarts',
items: [
{
@@ -275,7 +275,7 @@ export const PhoneLoginsItems = [
]
export const auth = {
- icon: '/img/icons/menu/auth.svg',
+ icon: 'auth',
label: 'Auth',
items: [
{
@@ -358,19 +358,19 @@ export const auth = {
name: 'API Reference',
level: 'integrations',
items: [],
- icon: '/img/icons/menu/reference.svg',
+ icon: 'reference',
},
{
name: 'Integrations',
level: 'reference',
items: [],
- icon: '/img/icons/menu/integrations.svg',
+ icon: 'integrations',
},
],
}
export const database = {
- icon: '/img/icons/menu/database.svg',
+ icon: 'database',
label: 'Database',
items: [
{ name: 'Overview', url: '/guides/database', items: [] },
@@ -431,7 +431,7 @@ export const database = {
}
export const functions = {
- icon: '/img/icons/menu/functions.svg',
+ icon: 'functions',
label: 'Edge Functions',
items: [
{ name: 'Overview', url: '/guides/functions', items: [] },
@@ -449,7 +449,7 @@ export const functions = {
}
export const realtime = {
- icon: '/img/icons/menu/realtime.svg',
+ icon: 'realtime',
label: 'Realtime',
items: [
{ name: 'Overview', url: '/guides/realtime', items: [] },
@@ -466,7 +466,7 @@ export const realtime = {
}
export const storage = {
- icon: '/img/icons/menu/storage.svg',
+ icon: 'storage',
label: 'Storage',
items: [
{ name: 'Overview', url: '/guides/storage', items: [] },
@@ -475,7 +475,7 @@ export const storage = {
}
export const platform = {
- icon: '/img/icons/menu/platform.svg',
+ icon: 'platform',
label: 'Platform',
items: [
{ name: 'Overview', url: '/guides/hosting/platform', items: [] },
@@ -513,7 +513,7 @@ export const migrate = {
}
export const integrations = {
- icon: '/img/icons/menu/integrations.svg',
+ icon: 'integrations',
label: 'Integrations',
items: [
{
@@ -566,7 +566,7 @@ export const integrations = {
export const reference = {
title: 'API Reference',
- icon: '/img/icons/menu/reference.svg',
+ icon: 'reference',
items: [
{
name: 'Client libraries',
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
index 7e645e6220e..59859a42f67 100644
--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenuGuideList.tsx
@@ -5,12 +5,15 @@ import { IconChevronLeft } from '~/../../packages/ui'
import * as NavItems from './NavigationMenu.constants'
import * as Accordion from '@radix-ui/react-accordion'
import { useEffect } from 'react'
+import Image from 'next/image'
+import { useTheme } from 'common/Providers'
const NavigationMenuGuideList = ({ currentLevel, setLevel, id }) => {
const router = useRouter()
+ const { isDarkMode } = useTheme()
const menu = NavItems[id]
-
+ console.log({ menu })
// get url
const url = router.asPath
// remove the end of the url if a deep link
@@ -60,12 +63,18 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, id }) => {
invisible md:visible"
>
{/* <div className="w-10 h-10 bg-brand-500 rounded flex items-center justify-center"> */}
- <img
- src={`${router.basePath}` + menu.icon ?? `/img/icons/menu/${id}.svg`}
- className="w-5 rounded"
+
+ <Image
+ alt={menu.icon}
+ width={15}
+ height={15}
+ src={
+ `${router.basePath}` +
+ `/img/icons/menu/${menu.icon}${isDarkMode ? '' : '-light'}.svg`
+ }
/>
{/* </div> */}
- <h2
+ <span
className={[
' ',
!menu.title && 'capitalize',
@@ -73,7 +82,7 @@ const NavigationMenuGuideList = ({ currentLevel, setLevel, id }) => {
].join(' ')}
>
{menu.title ?? currentLevel}
- </h2>
+ </span>
</div>
{menu.items.map((x, index) => {
diff --git a/apps/docs/pages/404.mdx b/apps/docs/pages/404.mdx
new file mode 100644
index 00000000000..b75a4a59620
--- /dev/null
+++ b/apps/docs/pages/404.mdx
@@ -0,0 +1,13 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+
+export const meta = {
+ id: '404',
+ title: '404 not found',
+ description: '404 not found',
+}
+
+404 not found
+
+export const Page = ({ children }) => <Layout meta={meta} children={children} />
+
+export default Page
diff --git a/apps/docs/pages/architecture.mdx b/apps/docs/pages/architecture.mdx
index 91048898791..87747287ca7 100644
--- a/apps/docs/pages/architecture.mdx
+++ b/apps/docs/pages/architecture.mdx
@@ -1,9 +1,9 @@
import Layout from '~/layouts/DefaultGuideLayout'
export const meta = {
- id: 'architecture',
- title: 'Architecture',
- description: 'Supabase design and architecture',
+ id: '404',
+ title: '404 - not found',
+ description: '404 - not found',
}
Supabase is open source. We choose open source tools which are scalable and make them simple to use.