Skip to content

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

made flyout reusuable - although need to change behaviour so they can be toggled between each one from top nav

mildtomatoc7146193b23b
diff --git a/www/components/Nav/Company.tsx b/www/components/Nav/Company.tsx
new file mode 100644
index 00000000000..f79e276d15f
--- /dev/null
+++ b/www/components/Nav/Company.tsx
@@ -0,0 +1,102 @@
+import React from 'react'
+import Badge from 'components/Badge'
+import SolutionsData from 'data/Solutions.json'
+import CompanyData from 'data/Company.json'
+import CaseStudiesData from 'data/CaseStudies.json'
+
+const Company = () => {
+ const iconSections = Object.values(CompanyData).map((company) => {
+ const { text, description, url } = company
+
+ const content = (
+ <a
+ href="#"
+ className="-m-3 p-3 flex items-start rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"
+ >
+ {/* <!-- Heroicon name: support --> */}
+ <svg
+ className="flex-shrink-0 h-6 w-6 text-grey-600"
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M18.364 5.636l-3.536 3.536m0 5.656l3.536 3.536M9.172 9.172L5.636 5.636m3.536 9.192l-3.536 3.536M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-5 0a4 4 0 11-8 0 4 4 0 018 0z"
+ />
+ </svg>
+ <div className="ml-4">
+ <p className="text-base font-medium text-gray-900">{text}</p>
+ <p className="mt-1 text-sm text-gray-500">{description}</p>
+ </div>
+ </a>
+ )
+ return url ? (
+ <a
+ key={name}
+ href="#"
+ className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 dark:hover:bg-dark-700 transition ease-in-out duration-150"
+ >
+ {content}
+ </a>
+ ) : (
+ <div
+ key={name}
+ className="-m-3 p-3 flex flex-col justify-between rounded-lg transition ease-in-out duration-150"
+ >
+ {content}
+ </div>
+ )
+ })
+
+ return (
+ <React.Fragment>
+ <nav
+ className="grid gap-y-10 px-4 py-8 sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"
+ aria-labelledby="solutionsHeading"
+ >
+ {iconSections}
+ </nav>
+ <div className="px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12">
+ <div>
+ <h3 className="text-sm font-medium tracking-wide text-gray-500 dark:text-dark-300 uppercase">
+ Latest blog posts
+ </h3>
+ <ul className="mt-6 space-y-12">
+ {CaseStudiesData.map((caseStudy: any, idx: number) => (
+ <li className="flow-root" key={`flyout_case_${idx}`}>
+ <a
+ href={caseStudy.url}
+ className="-m-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-600 transition ease-in-out duration-150"
+ >
+ <div className="min-w-0 flex-1 sm:ml-3">
+ <h4 className="text-base font-medium text-gray-900 dark:text-white truncate">
+ {caseStudy.title}
+ </h4>
+ <p className="mt-1 text-sm text-gray-500 dark:text-dark-300">
+ {caseStudy.description}
+ </p>
+ </div>
+ </a>
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div className="mt-6 text-sm font-medium">
+ <a
+ href="/blog"
+ className="text-gray-600 hover:text-gray-500 dark:text-brand-600 dark:hover:text-brand-700 transition ease-in-out duration-150"
+ >
+ View all posts <span aria-hidden="true">&rarr;</span>
+ </a>
+ </div>
+ </div>
+ </React.Fragment>
+ )
+}
+
+export default Company
diff --git a/www/components/Nav/Developers.tsx b/www/components/Nav/Developers.tsx
new file mode 100644
index 00000000000..93c5a90920e
--- /dev/null
+++ b/www/components/Nav/Developers.tsx
@@ -0,0 +1,99 @@
+import React from 'react'
+import DevelopersData from 'data/Developers.json'
+import AnnouncementsData from 'data/Announcements.json'
+
+const Developers = () => {
+ const iconSections = Object.values(DevelopersData).map((company) => {
+ const { text, description, url } = company
+
+ const content = (
+ <a
+ href="#"
+ className="-m-3 p-3 flex items-start rounded-lg hover:bg-gray-50 transition ease-in-out duration-150"
+ >
+ {/* <!-- Heroicon name: support --> */}
+ <svg
+ className="flex-shrink-0 h-6 w-6 text-grey-600"
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ stroke-width="2"
+ d="M18.364 5.636l-3.536 3.536m0 5.656l3.536 3.536M9.172 9.172L5.636 5.636m3.536 9.192l-3.536 3.536M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-5 0a4 4 0 11-8 0 4 4 0 018 0z"
+ />
+ </svg>
+ <div className="ml-4">
+ <p className="text-base font-medium text-gray-900">{text}</p>
+ <p className="mt-1 text-sm text-gray-500">{description}</p>
+ </div>
+ </a>
+ )
+ return url ? (
+ <a
+ key={name}
+ href="#"
+ className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 dark:hover:bg-dark-700 transition ease-in-out duration-150"
+ >
+ {content}
+ </a>
+ ) : (
+ <div
+ key={name}
+ className="-m-3 p-3 flex flex-col justify-between rounded-lg transition ease-in-out duration-150"
+ >
+ {content}
+ </div>
+ )
+ })
+
+ return (
+ <React.Fragment>
+ <nav
+ className="grid gap-y-10 px-4 py-8 sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"
+ aria-labelledby="solutionsHeading"
+ >
+ {iconSections}
+ </nav>
+ <div className="px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12">
+ <div>
+ <h3 className="text-sm font-medium tracking-wide text-gray-500 dark:text-dark-300 uppercase">
+ Latest announcements
+ </h3>
+ <ul className="mt-6 space-y-12">
+ {AnnouncementsData.map((caseStudy: any, idx: number) => (
+ <li className="flow-root" key={`flyout_case_${idx}`}>
+ <a
+ href={caseStudy.url}
+ className="-m-3 p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-600 transition ease-in-out duration-150"
+ >
+ <div className="hidden sm:block flex-shrink-0">
+ <img
+ className="w-32 h-20 object-cover rounded-md"
+ src={caseStudy.imgUrl}
+ alt="caseStudyThumb"
+ />
+ </div>
+ <div className="min-w-0 flex-1 sm:ml-8">
+ <h4 className="text-base font-medium text-gray-900 dark:text-white truncate">
+ {caseStudy.title}
+ </h4>
+ <p className="mt-1 text-sm text-gray-500 dark:text-dark-300">
+ {caseStudy.description}
+ </p>
+ </div>
+ </a>
+ </li>
+ ))}
+ </ul>
+ </div>
+ </div>
+ </React.Fragment>
+ )
+}
+
+export default Developers
diff --git a/www/components/Nav/FlyOut.tsx b/www/components/Nav/FlyOut.tsx
deleted file mode 100644
index 55bd3a5485e..00000000000
--- a/www/components/Nav/FlyOut.tsx
+++ /dev/null
@@ -1,192 +0,0 @@
-import { useState, useEffect } from 'react'
-import Badge from 'components/Badge'
-import Transition from 'lib/Transition'
-import Solutions from 'data/Solutions.json'
-import CaseStudiesData from 'data/CaseStudies.json'
-
-const FlyOut = () => {
- const [show, setShow] = useState(false)
-
- function handleToggle() {
- setShow(!show)
- }
-
- useEffect(() => {
- // window is accessible here.
- window.addEventListener('scroll', function (e) {
- // close Fly Out window if user scrolls past 96px from top
- if (window.pageYOffset > 96) {
- setShow(false)
- }
- })
- }, [])
-
- const iconSections = Object.values(Solutions).map((solution) => {
- const { name, description, icon, label, url } = solution
-
- const content = (
- <div className="flex md:h-full lg:flex-col">
- <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 stroke-white dark:stroke-black"
- xmlns="http://www.w3.org/2000/svg"
- fill="none"
- viewBox="0 0 24 24"
- aria-hidden="true"
- >
- <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d={icon} />
- </svg>
- </div>
- </div>
- <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">
- <div>
- <p className="text-base font-medium text-gray-900 dark:text-white">
- {name} {label && <Badge className="ml-3">{label}</Badge>}
- </p>
- <p className="mt-1 text-sm text-gray-500 dark:text-dark-300">{description}</p>
- </div>
- {url && (
- <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">
- Learn more <span aria-hidden="true">&rarr;</span>
- </p>
- )}
- </div>
- </div>
- )
- return url ? (
- <a
- key={name}
- href="#"
- className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 dark:hover:bg-dark-700 transition ease-in-out duration-150"
- >
- {content}
- </a>
- ) : (
- <div
- key={name}
- className="-m-3 p-3 flex flex-col justify-between rounded-lg transition ease-in-out duration-150"
- >
- {content}
- </div>
- )
- })
-
- return (
- <>
- <a
- href="#"
- className="inline-flex items-center px-1 border-b-2 border-transparent text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-dark-100 dark:hover:border-dark-100"
- onClick={() => handleToggle()}
- >
- <span>Product</span>
- <svg
- className="ml-2 h-5 w-5 text-gray-300 group-hover:text-gray-300 transition ease-in-out duration-150"
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 20 20"
- fill="currentColor"
- aria-hidden="true"
- >
- <path
- fillRule="evenodd"
- d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
- clipRule="evenodd"
- />
- </svg>
- </a>
- <Transition
- appear={true}
- show={show}
- enter="transition ease-out duration-200"
- enterFrom="opacity-0 translate-y-1"
- enterTo="opacity-100 translate-y-0"
- leave="transition ease-in duration-150"
- leaveFrom="opacity-100 translate-y-0"
- leaveTo="opacity-0 translate-y-1"
- >
- <>
- <div
- className="absolute inset-x-0 transform shadow-lg border-t border-gray-50 dark:border-dark-500"
- style={{
- zIndex: 999,
- position: 'absolute',
- width: '100vw',
- margin: '0 auto',
- marginTop: '64px',
- left: '-50vw',
- right: '-50vw',
- }}
- >
- <div className="absolute inset-0 flex sm:flex-col lg:flex-row" aria-hidden="true">
- <div className="bg-white dark:bg-dark-600 sm:w-full sm:h-1/2 lg:w-1/2 lg:h-full"></div>
- <div className="bg-gray-50 dark:bg-dark-500 sm:w-full sm:h-1/2 lg:w-1/2 lg:h-full"></div>
- {/* <div className="bg-gray-50 dark:bg-dark-300 md:hidden lg:block lg:w-1/2"></div> */}
- </div>
- <div className="relative max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-2">
- <nav
- className="grid gap-y-10 px-4 py-8 sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"
- aria-labelledby="solutionsHeading"
- >
- {iconSections}
- </nav>
- <div className="px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12">
- <div>
- <h3 className="text-sm font-medium tracking-wide text-gray-500 dark:text-dark-300 uppercase">
- Latest news
- </h3>
- <ul className="mt-6 space-y-6">
- {CaseStudiesData.map((caseStudy: any, idx: number) => (
- <li className="flow-root" key={`flyout_case_${idx}`}>
- <a
- href={caseStudy.url}
- className="-m-3 p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-600 transition ease-in-out duration-150"
- >
- <div className="hidden sm:block flex-shrink-0">
- <img
- className="w-32 h-20 object-cover rounded-md"
- src={caseStudy.imgUrl}
- alt="caseStudyThumb"
- />
- </div>
- <div className="min-w-0 flex-1 sm:ml-8">
- <h4 className="text-base font-medium text-gray-900 dark:text-white truncate">
- {caseStudy.title}
- </h4>
- <p className="mt-1 text-sm text-gray-500 dark:text-dark-300">
- {caseStudy.description}
- </p>
- </div>
- </a>
- </li>
- ))}
- </ul>
- </div>
- <div className="mt-6 text-sm font-medium">
- <a
- href="/blog"
- className="text-gray-600 hover:text-gray-500 dark:text-brand-600 dark:hover:text-brand-700 transition ease-in-out duration-150"
- >
- View all posts <span aria-hidden="true">&rarr;</span>
- </a>
- </div>
- </div>
- </div>
- </div>
- <div
- className="fixed inset-0 transition-opacity"
- style={{
- zIndex: 100,
- marginLeft: 0,
- pointerEvents: 'visiblePainted',
- }}
- onClick={() => handleToggle()}
- >
- <div className="absolute inset-0 opacity-0"></div>
- </div>
- </>
- </Transition>
- </>
- )
-}
-
-export default FlyOut
diff --git a/www/components/Nav/Product.tsx b/www/components/Nav/Product.tsx
new file mode 100644
index 00000000000..10f5bb9096f
--- /dev/null
+++ b/www/components/Nav/Product.tsx
@@ -0,0 +1,111 @@
+import React from 'react'
+import Badge from 'components/Badge'
+import SolutionsData from 'data/Solutions.json'
+import CaseStudiesData from 'data/CaseStudies.json'
+
+const Product = () => {
+ const iconSections = Object.values(SolutionsData).map((solution) => {
+ const { name, description, icon, label, url } = solution
+
+ const content = (
+ <div className="flex md:h-full lg:flex-col">
+ <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 stroke-white dark:stroke-black"
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ aria-hidden="true"
+ >
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d={icon} />
+ </svg>
+ </div>
+ </div>
+ <div className="ml-4 md:flex-1 md:flex md:flex-col md:justify-between lg:ml-0 lg:mt-4">
+ <div>
+ <p className="text-base font-medium text-gray-900 dark:text-white">
+ {name} {label && <Badge className="ml-3">{label}</Badge>}
+ </p>
+ <p className="mt-1 text-sm text-gray-500 dark:text-dark-300">{description}</p>
+ </div>
+ {url && (
+ <p className="mt-2 text-sm font-medium text-brand-600 lg:mt-4">
+ Learn more <span aria-hidden="true">&rarr;</span>
+ </p>
+ )}
+ </div>
+ </div>
+ )
+ return url ? (
+ <a
+ key={name}
+ href="#"
+ className="-m-3 p-3 flex flex-col justify-between rounded-lg hover:bg-gray-50 dark:hover:bg-dark-700 transition ease-in-out duration-150"
+ >
+ {content}
+ </a>
+ ) : (
+ <div
+ key={name}
+ className="-m-3 p-3 flex flex-col justify-between rounded-lg transition ease-in-out duration-150"
+ >
+ {content}
+ </div>
+ )
+ })
+
+ return (
+ <React.Fragment>
+ <nav
+ className="grid gap-y-10 px-4 py-8 sm:grid-cols-2 sm:gap-x-8 sm:py-12 sm:px-6 lg:px-8 xl:pr-12"
+ aria-labelledby="solutionsHeading"
+ >
+ {iconSections}
+ </nav>
+ <div className="px-4 py-8 sm:py-12 sm:px-6 lg:px-8 xl:pl-12">
+ <div>
+ <h3 className="text-sm font-medium tracking-wide text-gray-500 dark:text-dark-300 uppercase">
+ Latest news
+ </h3>
+ <ul className="mt-6 space-y-6">
+ {CaseStudiesData.map((caseStudy: any, idx: number) => (
+ <li className="flow-root" key={`flyout_case_${idx}`}>
+ <a
+ href={caseStudy.url}
+ className="-m-3 p-3 flex rounded-lg hover:bg-gray-100 dark:hover:bg-dark-600 transition ease-in-out duration-150"
+ >
+ <div className="hidden sm:block flex-shrink-0">
+ <img
+ className="w-32 h-20 object-cover rounded-md"
+ src={caseStudy.imgUrl}
+ alt="caseStudyThumb"
+ />
+ </div>
+ <div className="min-w-0 flex-1 sm:ml-8">
+ <h4 className="text-base font-medium text-gray-900 dark:text-white truncate">
+ {caseStudy.title}
+ </h4>
+ <p className="mt-1 text-sm text-gray-500 dark:text-dark-300">
+ {caseStudy.description}
+ </p>
+ </div>
+ </a>
+ </li>
+ ))}
+ </ul>
+ </div>
+ <div className="mt-6 text-sm font-medium">
+ <a
+ href="/blog"
+ className="text-gray-600 hover:text-gray-500 dark:text-brand-600 dark:hover:text-brand-700 transition ease-in-out duration-150"
+ >
+ View all posts <span aria-hidden="true">&rarr;</span>
+ </a>
+ </div>
+ </div>
+ </React.Fragment>
+ )
+}
+
+export default Product
diff --git a/www/components/Nav/index.tsx b/www/components/Nav/index.tsx
index e1db27b483c..786f7ab425c 100644
--- a/www/components/Nav/index.tsx
+++ b/www/components/Nav/index.tsx
@@ -1,10 +1,13 @@
import React, { useState } from 'react'
-import Link from 'next/link'
import Badge from 'components/Badge'
-import FlyOut from 'components/Nav/FlyOut'
+import FlyOut from '~/components/UI/FlyOut'
import Transition from 'lib/Transition'
-import Solutions from 'data/Solutions.json'
+import SolutionsData from 'data/Solutions.json'
+
+import Solutions from '~/components/Nav/Product'
+import Developers from './Developers'
+import Company from './Company'
type Props = {
darkMode: boolean
@@ -24,7 +27,13 @@ const Nav = (props: Props) => {
}
}, [open])
- const iconSections = Object.values(Solutions).map((solution: any, idx: number) => {
+
+ function handleNavClick() {
+ // @ts-ignore
+ ref.current
+ }
+
+ const iconSections = Object.values(SolutionsData).map((solution: any, idx: number) => {
const { name, description, icon, label, url } = solution
const content = (
@@ -147,27 +156,16 @@ const Nav = (props: Props) => {
/>
</div>
<div className="pl-4 hidden sm:ml-6 lg:flex sm:space-x-8">
- <FlyOut />
- <a
- href="https://supabase.io/docs"
- className={`
- inline-flex items-center px-1 border-b-2 border-transparent text-sm font-medium
- text-gray-500 hover:text-gray-700 hover:border-gray-500 p-5
- dark:text-dark-100 dark:hover:border-dark-100
- `}
- >
- Developers
- </a>
- <a
- href="https://supabase.io/docs/guides/platform"
- className={`
- inline-flex items-center px-1 border-b-2 border-transparent text-sm font-medium
- text-gray-500 hover:text-gray-700 hover:border-gray-500 p-5
- dark:text-dark-100 dark:hover:border-dark-100
- `}
- >
- Company
- </a>
+ <button onClick={() => handleNavClick()}>make me do something</button>
+ <FlyOut title={'Product'}>
+ <Solutions />
+ </FlyOut>
+ <FlyOut title={'Developers'}>
+ <Developers/>
+ </FlyOut>
+ <FlyOut title={'Company'}>
+ <Company/>
+ </FlyOut>
<a
href="https://supabase.io/docs/pricing"
className={`
diff --git a/www/components/UI/FlyOut.tsx b/www/components/UI/FlyOut.tsx
new file mode 100644
index 00000000000..4390a96e658
--- /dev/null
+++ b/www/components/UI/FlyOut.tsx
@@ -0,0 +1,98 @@
+import React, { useState, useEffect, useImperativeHandle } from 'react'
+import Transition from 'lib/Transition'
+
+type Props = {
+ title: string
+ children?: React.ReactNode,
+ ref? : any
+}
+
+const FlyOut = (props :Props) => {
+ const [show, setShow] = useState(false)
+
+ function handleToggle() {
+ setShow(!show)
+ }
+
+ useEffect(() => {
+ // window is accessible here.
+ window.addEventListener('scroll', function (e) {
+ // close Fly Out window if user scrolls past 96px from top
+ if (window.pageYOffset > 96) {
+ setShow(false)
+ }
+ })
+ }, [])
+
+ return (
+ <>
+ <a
+ href="#"
+ className="inline-flex items-center px-1 border-b-2 border-transparent text-sm font-medium text-gray-500 hover:text-gray-700 hover:border-gray-300 dark:text-dark-100 dark:hover:border-dark-100"
+ onClick={() => handleToggle()}
+ >
+ <span>{props.title}</span>
+ <svg
+ className="ml-2 h-5 w-5 text-gray-300 group-hover:text-gray-300 transition ease-in-out duration-150"
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ fillRule="evenodd"
+ d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
+ clipRule="evenodd"
+ />
+ </svg>
+ </a>
+ <Transition
+ appear={true}
+ show={show}
+ enter="transition ease-out duration-200"
+ enterFrom="opacity-0 translate-y-1"
+ enterTo="opacity-100 translate-y-0"
+ leave="transition ease-in duration-150"
+ leaveFrom="opacity-100 translate-y-0"
+ leaveTo="opacity-0 translate-y-1"
+ >
+ <>
+ <div
+ className="absolute inset-x-0 transform shadow-lg border-t border-gray-100 dark:border-dark-500"
+ style={{
+ zIndex: 999,
+ position: 'absolute',
+ width: '100vw',
+ margin: '0 auto',
+ marginTop: '63px',
+ left: '-50vw',
+ right: '-50vw',
+ }}
+ >
+ <div className="absolute inset-0 flex sm:flex-col lg:flex-row" aria-hidden="true">
+ <div className="bg-white dark:bg-dark-600 sm:w-full sm:h-1/2 lg:w-1/2 lg:h-full"></div>
+ <div className="bg-gray-50 dark:bg-dark-500 sm:w-full sm:h-1/2 lg:w-1/2 lg:h-full"></div>
+ {/* <div className="bg-gray-50 dark:bg-dark-300 md:hidden lg:block lg:w-1/2"></div> */}
+ </div>
+ <div className="relative max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-2">
+ {props.children}
+ </div>
+ </div>
+ <div
+ className="fixed inset-0 transition-opacity bg-red"
+ style={{
+ zIndex: 100,
+ marginLeft: 0,
+ pointerEvents: 'visiblePainted',
+ }}
+ onClick={() => handleToggle()}
+ >
+ <div className="absolute inset-0 opacity-0"></div>
+ </div>
+ </>
+ </Transition>
+ </>
+ )
+}
+
+export default FlyOut
diff --git a/www/data/Announcements.json b/www/data/Announcements.json
new file mode 100644
index 00000000000..76de53da8a7
--- /dev/null
+++ b/www/data/Announcements.json
@@ -0,0 +1,18 @@
+[
+ {
+ "type": "Announcement",
+ "title": "Beta launch",
+ "description": "We're excitied to announce we have moved from Alpha to Beta",
+ "imgUrl": "images/case-study-monitoro.jpg",
+ "logoUrl": "images/logos/monitoro.png",
+ "organization": "Monitoro",
+ "url": "/casestudies/monitoro",
+ "postMeta": {
+ "name" : "Paul Copplestone",
+ "avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
+ "publishDate": "Mar 16, 2020",
+ "readLength": 6
+ },
+ "ctaText": "View case study"
+ }
+]
diff --git a/www/data/BlogPosts.json b/www/data/BlogPosts.json
new file mode 100644
index 00000000000..05560287862
--- /dev/null
+++ b/www/data/BlogPosts.json
@@ -0,0 +1,50 @@
+[
+ {
+ "type": "Blog post",
+ "title": "A web crawler handling millions of API requests.",
+ "description": "See how Monitoro built an automated a scraping platform using Supabase.",
+ "imgUrl": "images/case-study-monitoro.jpg",
+ "logoUrl": "images/logos/monitoro.png",
+ "organization": "Monitoro",
+ "url": "/casestudies/monitoro",
+ "postMeta": {
+ "name" : "Paul Copplestone",
+ "avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
+ "publishDate": "Mar 16, 2020",
+ "readLength": 6
+ },
+ "ctaText": "View case study"
+ },
+ {
+ "type": "Blog post",
+ "title": "A no-code website builder, deployed in seven days.",
+ "description": "See how Tayfa went from idea to paying customer in less than 30 days.",
+ "imgUrl": "images/case-study-tayfab.jpg",
+ "logoUrl": "images/logos/monitoro.png",
+ "organization": "Tayfab",
+ "url": "/casestudies/monitoro",
+ "postMeta": {
+ "name" : "Paul Copplestone",
+ "avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
+ "publishDate": "Mar 27, 2020",
+ "readLength": 5
+ },
+ "ctaText": "View case study"
+ },
+ {
+ "type": "Blog post",
+ "title": "Counter-fraud watchlists for the fintech industry.",
+ "description": "See how Xendit use Supabase to build a full-text search engine.",
+ "imgUrl": "images/case-study-xendit.jpg",
+ "logoUrl": "images/logos/xendit.png",
+ "organization": "Llama Lab",
+ "url": "/casestudies/monitoro",
+ "postMeta": {
+ "name" : "Paul Copplestone",
+ "avatarUrl": "https://avatars0.githubusercontent.com/u/10214025?v=4",
+ "publishDate": "Mar 20, 2020",
+ "readLength": 10
+ },
+ "ctaText": "View case study"
+ }
+]
diff --git a/www/data/Company.json b/www/data/Company.json
new file mode 100644
index 00000000000..7dbb7c13ea5
--- /dev/null
+++ b/www/data/Company.json
@@ -0,0 +1,22 @@
+[
+ {
+ "text": "Blog",
+ "description": "Read the latest developments from Supabase",
+ "url": "https://supabase.io/blog"
+ },
+ {
+ "text": "Open Source",
+ "description": "Supabase is an opensource company, supporting existing open source tools and communities wherever possible.",
+ "url": "https://supabase.io/oss"
+ },
+ {
+ "text": "Humans.txt",
+ "description": "Overview of Supabase staff",
+ "url": "https://supabase.io/humans.txt"
+ },
+ {
+ "text": "Lawyers.txt",
+ "description": "Details of technology used by Supabase",
+ "url": "https://supabase.io/lawyers.txt"
+ }
+]
diff --git a/www/data/Developers.json b/www/data/Developers.json
new file mode 100644
index 00000000000..5d0883bdaa0
--- /dev/null
+++ b/www/data/Developers.json
@@ -0,0 +1,12 @@
+[
+ {
+ "text": "Documentation",
+ "description": "Everything you need that makes it simple to get started.",
+ "url": "https://supabase.io/docs"
+ },
+ {
+ "text": "API reference",
+ "description": "Examples and references for using API libraries",
+ "url": "https://supabase.io/docs/client/supabase-client"
+ }
+]