The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Ensure SVG strokes are dark themed toggelable too
Joshen Limc43cb5b6d1e9
diff --git a/www/components/AdminAccess/tabs.tsx b/www/components/AdminAccess/tabs.tsxindex 69f0cd003df..a9bc1973066 100644--- a/www/components/AdminAccess/tabs.tsx+++ b/www/components/AdminAccess/tabs.tsx@@ -17,7 +17,7 @@ function Tabs(props: Props) {}return (- <div className="flex justify-between items-center w-full sm:relative sm:-mt-20">+ <div className="flex justify-between items-center w-full sm:relative sm:-mt-20 lg:mt-0"><div><div className="border-b border-gray-200"><nav className="-mb-px flex" aria-label="Tabs">diff --git a/www/components/BuiltWithSupabase/index.tsx b/www/components/BuiltWithSupabase/index.tsxindex ace503dd050..a6822d76f17 100644--- a/www/components/BuiltWithSupabase/index.tsx+++ b/www/components/BuiltWithSupabase/index.tsx@@ -7,7 +7,7 @@ const BuiltExamples = () => {<div className="bg-gray-50 dark:bg-dark-200 py-16"><div className="container mx-auto sm:px-16 xl:px-20 relative"><div className="absolute inset-0">- <div className="bg-white dark:bg-dark-200 h-1/3 sm:h-2/3"></div>+ <div className="bg-white dark:bg-dark-600 h-1/3 sm:h-2/3"></div></div><div className="mx-auto max-w-7xl"><SectionHeader@@ -18,9 +18,9 @@ const BuiltExamples = () => {</div><div className="relative max-w-7xl mx-auto"><div className="mt-12 max-w-lg mx-auto grid gap-5 lg:grid-cols-3 lg:max-w-none">- {ProjectExamples.map((example: any) => (+ {ProjectExamples.map((example: any, idx: number) => (<Card- key={example.title}+ key={`example_${idx}`}title={example.title}type="Project Example"description={example.description}diff --git a/www/components/CTABanner/index.tsx b/www/components/CTABanner/index.tsxindex 58c745c0a8d..59c804b1f78 100644--- a/www/components/CTABanner/index.tsx+++ b/www/components/CTABanner/index.tsx@@ -2,9 +2,9 @@ import Button from '../button'const CTABanner = () => {return (- <div className="py-32 grid grid-cols-12 gap-4 items-center text-center bg-neutral-700">+ <div className="py-32 grid grid-cols-12 gap-4 items-center text-center bg-gray-100 dark:bg-dark-700"><div className="col-span-12">- <h4 className="font-normal text-white lg:text-3xl">+ <h4 className="font-normal text-gray-900 dark:text-white lg:text-3xl"><span className="block">Create your next project backend </span></h4><p className="font-normal mt-1 text-gray-500 lg:text-3xl">diff --git a/www/components/Features/index.tsx b/www/components/Features/index.tsxindex 8ed2a4204bb..3141a770c13 100644--- a/www/components/Features/index.tsx+++ b/www/components/Features/index.tsx@@ -5,18 +5,15 @@ import Solutions from 'data/Solutions.json'const Features = () => {const IconSections = Object.values(Solutions).map((solution: any) => {const { name, description, icon, label, url } = solution-return (<div key={name}><div className="flex items-center">- <div className="flex items-center justify-center h-12 w-12 rounded-md bg-gray-900 dark:bg-white text-white">- {/* <!-- Heroicon name: globe-alt --> */}+ <div className="flex items-center justify-center h-12 w-12 rounded-md bg-gray-900 text-white dark:bg-white"><svg- className="h-6 w-6"+ className="h-6 w-6 stroke-white dark:stroke-black"xmlns="http://www.w3.org/2000/svg"fill="none"viewBox="0 0 24 24"- stroke="black"aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d={icon} />diff --git a/www/components/Footer/index.tsx b/www/components/Footer/index.tsxindex bda79ccead6..d51beb7144e 100644--- a/www/components/Footer/index.tsx+++ b/www/components/Footer/index.tsx@@ -2,22 +2,16 @@ import { useState, useEffect } from 'react'import FooterLinks from "data/Footer.json"type Props = {+ darkMode: boolean,updateTheme: Function}const Footer = (props: Props) => {- const { updateTheme } = props- const [darkMode, setDarkMode] = useState<boolean>(true)-- useEffect(() => {- const isDarkMode = localStorage.getItem('supabaseDarkMode')- if (isDarkMode) setDarkMode(isDarkMode === 'true')- }, [])+ const { darkMode, updateTheme } = propsconst toggleDarkMode = () => {localStorage.setItem('supabaseDarkMode', (!darkMode).toString())updateTheme(!darkMode)- setDarkMode(!darkMode)}const SunEmoji = () => (@@ -72,7 +66,7 @@ const Footer = (props: Props) => {<div className="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8"><div className="xl:grid xl:grid-cols-3 xl:gap-8"><div className="space-y-8 xl:col-span-1">- <img className="h-10 w-auto" src="images/logo-dark.png" alt="Supabase" />+ <img className="h-10 w-auto" src={darkMode ? "images/logo-dark.png" : "images/logo-light.png"} alt="Supabase" /><p className="text-gray-500 text-base sr-only">Any description</p><div className="flex space-x-6">diff --git a/www/components/Nav/FlyOut.tsx b/www/components/Nav/FlyOut.tsxindex bd00a95c09b..6ef0c22242f 100644--- a/www/components/Nav/FlyOut.tsx+++ b/www/components/Nav/FlyOut.tsx@@ -28,11 +28,10 @@ const FlyOut = () => {<div className="flex-shrink-0"><div className="inline-flex items-center justify-center h-10 w-10 rounded-md bg-gray-900 dark:bg-white text-white sm:h-12 sm:w-12"><svg- className="h-6 w-6"+ className="h-6 w-6 stroke-white dark:stroke-black"xmlns="http://www.w3.org/2000/svg"fill="none"viewBox="0 0 24 24"- stroke="black"aria-hidden="true"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d={icon} />diff --git a/www/components/Nav/index.tsx b/www/components/Nav/index.tsxindex 12d86db8fb3..4107e5128ac 100644--- a/www/components/Nav/index.tsx+++ b/www/components/Nav/index.tsx@@ -6,7 +6,12 @@ import FlyOut from 'components/Nav/FlyOut'import Transition from 'lib/Transition'import Solutions from 'data/Solutions.json'-const Nav = () => {+type Props = {+ darkMode: boolean,+}++const Nav = (props: Props) => {+ const { darkMode } = propsconst [open, setOpen] = useState(false)React.useEffect(() => {@@ -132,13 +137,13 @@ const Nav = () => {{/* Mobile - remove if not needed */}<imgclassName="block lg:hidden h-6 w-auto"- src="images/logo-light.png"+ src={darkMode ? "images/logo-dark.png" : "images/logo-light.png"}alt="Workflow"/>{/* Desktop */}<imgclassName="hidden lg:block h-6 w-auto"- src="images/logo-dark.png"+ src={darkMode ? "images/logo-dark.png" : "images/logo-light.png"}alt="Workflow"/></div>diff --git a/www/components/layout.tsx b/www/components/layout.tsxindex 278ee0bd106..66fa82dd289 100644--- a/www/components/layout.tsx+++ b/www/components/layout.tsx@@ -1,4 +1,4 @@-import { useEffect } from 'react'+import { useState, useEffect } from 'react'import Nav from 'components/Nav/index'import Footer from 'components/Footer/index'import Meta from 'components/meta'@@ -10,23 +10,29 @@ type Props = {const Layout = ({ preview, children }: Props) => {+ const [darkMode, setDarkMode] = useState<boolean>(true)+useEffect(() => {- const darkMode = localStorage.getItem('supabaseDarkMode')- if (darkMode) document.documentElement.className = darkMode === 'true' ? 'dark' : ''+ const isDarkMode = localStorage.getItem('supabaseDarkMode')+ if (isDarkMode) {+ setDarkMode(isDarkMode === 'true')+ document.documentElement.className = isDarkMode === 'true' ? 'dark' : ''+ }}, [])const updateTheme = (isDarkMode: boolean) => {document.documentElement.className = isDarkMode ? 'dark' : ''+ setDarkMode(isDarkMode)}return (<><Meta />- <Nav />+ <Nav darkMode={darkMode} /><div className="min-h-screen bg-gray-100"><main>{children}</main></div>- <Footer updateTheme={updateTheme} />+ <Footer darkMode={darkMode} updateTheme={updateTheme}/></>)}diff --git a/www/tailwind.config.js b/www/tailwind.config.jsindex 1bc61aff1c9..6e3fc9be9bb 100644--- a/www/tailwind.config.js+++ b/www/tailwind.config.js@@ -44,18 +44,8 @@ module.exports = {300: '#292929',400: '#202020',500: '#1E1E1E',- },- // Joshen: Adding our Figma palette here- neutral: {- 100: '#F1F1F1',- 200: '#E0E0E0',- 300: '#BBBBBB',- 400: '#666666',- 500: '#444444',- 600: '#1E1E1E',700: '#181818',- 800: '#000000',- }+ },},spacing: {28: '7rem',@@ -97,11 +87,16 @@ module.exports = {],mono: ['Source Code Pro', 'Menlo', 'monospace'],},+ stroke: theme => ({+ 'white': theme('colors.white'),+ 'black': theme('colors.black'),+ })},},variants: {extend: {- inset: ['responsive', 'group-hover']+ inset: ['group-hover'],+ stroke: ['dark']},},plugins: [],