The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
implement annoucement nav
Florian LEFEBVRE131e4aa7e537
diff --git a/www/components/Nav/Annoucement.tsx b/www/components/Nav/Annoucement.tsxnew file mode 100644index 00000000000..d029223574d--- /dev/null+++ b/www/components/Nav/Annoucement.tsx@@ -0,0 +1,34 @@+import React from 'react'+import { IconArrowRight } from '@supabase/ui'++import data from '~/data/Annoucement.json';++type A = {+ show: boolean;+ text: string;+ link: {+ text: string;+ url: string;+ }+}++const a: A = data;++const Annoucement = () => {+ if (!a.show) return (<></>)+ return (+ <div className="bg-brand-700 dark:bg-gray-700">+ <div className="flex flex-col items-center justify-center py-2 mx-auto space-x-2 text-white sm:flex-row lg:container lg:px-16 xl:px-20">+ <span>{a.text}</span>+ <a+ href={a.link.url}+ className="inline-flex items-center px-2 py-1 space-x-1 text-xs transition-colors bg-white dark:bg-brand-800 rounded-full text-brand-800 hover:text-brand-800 dark:text-white hover:bg-opacity-90 dark:hover:bg-brand-700"+ >+ {a.link.text} <IconArrowRight size="tiny" />+ </a>+ </div>+ </div>+ )+}++export default Annoucementdiff --git a/www/components/Nav/index.tsx b/www/components/Nav/index.tsxindex 362b6cf0d1d..2f73e906b9d 100644--- a/www/components/Nav/index.tsx+++ b/www/components/Nav/index.tsx@@ -3,13 +3,15 @@ import Link from 'next/link'import { useRouter } from 'next/router'import { Badge } from '@supabase/ui'+import { Button } from '@supabase/ui'import FlyOut from '~/components/UI/FlyOut'import Transition from 'lib/Transition'+import SolutionsData from 'data/Solutions.json'import Solutions from '~/components/Nav/Product'-import Developers from './Developers'-import { Button } from '@supabase/ui'+import Developers from '~/components/Nav/Developers'+import Annoucement from '~/components/Nav/Annoucement'type Props = {darkMode: boolean@@ -184,6 +186,7 @@ const Nav = (props: Props) => {return (<>+ <Annoucement /><div className="sticky top-0 z-50"><nav className="bg-white dark:bg-gray-800 border-b dark:border-gray-600">{/* <div className="lg:container mx-auto relative flex justify-between h-16 lg:px-10 xl:px-0"> */}diff --git a/www/data/Annoucement.json b/www/data/Annoucement.jsonnew file mode 100644index 00000000000..f50af748756--- /dev/null+++ b/www/data/Annoucement.json@@ -0,0 +1,8 @@+{+ "show": true,+ "text": "We have released the April recap!",+ "link": {+ "url": "https://supabase.io/blog/2021/05/03/supabase-beta-april-2021",+ "text": "Read the blog post"+ }+}