Skip to content

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

improves login/register page designs

Alaister Young9626c434ad4f
diff --git a/studio/components/interfaces/App/AppBannerWrapper.tsx b/studio/components/interfaces/App/AppBannerWrapper.tsx
index ec6f35f7236..c0ab64ee9e3 100644
--- a/studio/components/interfaces/App/AppBannerWrapper.tsx
+++ b/studio/components/interfaces/App/AppBannerWrapper.tsx
@@ -7,7 +7,7 @@ const AppBannerWrapper: FC = ({ children }) => {
const ongoingIncident = useFlag('ongoingIncident')
return (
- <div className="flex h-full flex-col">
+ <div className="min-h-full flex flex-col">
{ongoingIncident && (
<Link href="https://status.supabase.com">
<a target="_blank">
@@ -21,6 +21,7 @@ const AppBannerWrapper: FC = ({ children }) => {
</a>
</Link>
)}
+
{children}
</div>
)
diff --git a/studio/components/interfaces/Login/LoginForm.tsx b/studio/components/interfaces/Login/LoginForm.tsx
index f3adae920b4..6a634a65a43 100644
--- a/studio/components/interfaces/Login/LoginForm.tsx
+++ b/studio/components/interfaces/Login/LoginForm.tsx
@@ -54,7 +54,7 @@ const LoginForm = () => {
>
{({ isSubmitting }: { isSubmitting: boolean }) => {
return (
- <div className="mb-4 space-y-4 pt-4">
+ <div className="flex flex-col gap-4">
<Input
id="email"
name="email"
@@ -71,13 +71,11 @@ const LoginForm = () => {
placeholder="&bull;&bull;&bull;&bull;&bull;&bull;&bull;&bull;"
/>
- <div className="border-overlay-border border-t" />
-
<Button
block
form="login-form"
htmlType="submit"
- size="medium"
+ size="large"
disabled={isSubmitting}
loading={isSubmitting}
>
diff --git a/studio/components/interfaces/Login/LoginWithGitHub.tsx b/studio/components/interfaces/Login/LoginWithGitHub.tsx
index 2cf9cdf5760..e553da28b34 100644
--- a/studio/components/interfaces/Login/LoginWithGitHub.tsx
+++ b/studio/components/interfaces/Login/LoginWithGitHub.tsx
@@ -17,7 +17,7 @@ const LoginWithGitHub = () => {
}
return (
- <Button onClick={handleGithubSignIn} icon={<IconGitHub />} size="medium">
+ <Button block onClick={handleGithubSignIn} icon={<IconGitHub />} size="large" type="default">
Continue with GitHub
</Button>
)
diff --git a/studio/components/interfaces/Login/RegisterForm.tsx b/studio/components/interfaces/Login/RegisterForm.tsx
index cc26ff3c1a8..6ae176fcc39 100644
--- a/studio/components/interfaces/Login/RegisterForm.tsx
+++ b/studio/components/interfaces/Login/RegisterForm.tsx
@@ -1,7 +1,7 @@
import { useStore } from 'hooks'
import { auth } from 'lib/gotrue'
import { useRouter } from 'next/router'
-import { Button, Form, IconLock, Input } from 'ui'
+import { Button, Form, Input } from 'ui'
import { object, string } from 'yup'
const registerSchema = object({
@@ -95,8 +95,7 @@ const RegisterForm = () => {
block
form="register-form"
htmlType="submit"
- size="medium"
- icon={<IconLock />}
+ size="large"
disabled={isSubmitting}
loading={isSubmitting}
>
diff --git a/studio/components/layouts/LoginLayout/ForgotPasswordLayout.tsx b/studio/components/layouts/LoginLayout/ForgotPasswordLayout.tsx
new file mode 100644
index 00000000000..c674638abb3
--- /dev/null
+++ b/studio/components/layouts/LoginLayout/ForgotPasswordLayout.tsx
@@ -0,0 +1,86 @@
+import { useStore } from 'hooks'
+import { observer } from 'mobx-react-lite'
+import Image from 'next/image'
+import Link from 'next/link'
+import { PropsWithChildren } from 'react'
+
+type ForgotPasswordLayoutProps = {
+ title: string
+ showDisclaimer?: boolean
+ logoLinkToMarketingSite?: boolean
+}
+
+const ForgotPasswordLayout = ({
+ title,
+ showDisclaimer = true,
+ logoLinkToMarketingSite = false,
+ children,
+}: PropsWithChildren<ForgotPasswordLayoutProps>) => {
+ const {
+ ui: { theme },
+ } = useStore()
+
+ return (
+ <div className="flex flex-col gap-8 mb-5">
+ <div className="sticky top-0 mx-auto w-full max-w-7xl px-8 pt-6 sm:px-6 lg:px-8">
+ <nav className="relative flex items-center justify-between sm:h-10">
+ <div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
+ <div className="flex w-full items-center justify-between md:w-auto">
+ <Link href={logoLinkToMarketingSite ? 'https://supabase.com' : '/'}>
+ <a>
+ <Image
+ src={theme == 'dark' ? '/img/supabase-dark.svg' : '/img/supabase-light.svg'}
+ alt=""
+ height={24}
+ width={120}
+ />
+ </a>
+ </Link>
+ </div>
+ </div>
+
+ <div className="hidden items-center space-x-3 md:ml-10 md:flex md:pr-4">
+ <a
+ href="https://supabase.com/docs"
+ className="text-sm text-scale-1100 transition-colors hover:text-scale-1200"
+ >
+ Documentation
+ </a>
+ </div>
+ </nav>
+ </div>
+
+ <h1 className="text-2xl self-center mt-8">{title}</h1>
+
+ <div className="flex flex-col justify-center items-center">
+ <main className="min-w-[448px] flex flex-col bg-scale-400 px-5 rounded-lg shadow-lg">
+ <img
+ src="/supabase-logo.svg"
+ alt="Supabase Logo"
+ className="block w-20 mt-8 mb-10 self-center"
+ />
+
+ {children}
+ </main>
+ </div>
+
+ {showDisclaimer && (
+ <div className="sm:text-center">
+ <p className="text-xs text-scale-900 sm:mx-auto sm:max-w-sm">
+ By continuing, you agree to Supabase's{' '}
+ <Link href="https://supabase.com/docs/company/terms">
+ <a className="underline hover:text-scale-1100">Terms of Service</a>
+ </Link>{' '}
+ and{' '}
+ <Link href="https://supabase.com/docs/company/privacy">
+ <a className="underline hover:text-scale-1100">Privacy Policy</a>
+ </Link>
+ , and to receive periodic emails with updates.
+ </p>
+ </div>
+ )}
+ </div>
+ )
+}
+
+export default observer(ForgotPasswordLayout)
diff --git a/studio/components/layouts/LoginLayout/LoginLayout.tsx b/studio/components/layouts/LoginLayout/LoginLayout.tsx
index 642ed3c935d..39738a22578 100644
--- a/studio/components/layouts/LoginLayout/LoginLayout.tsx
+++ b/studio/components/layouts/LoginLayout/LoginLayout.tsx
@@ -5,13 +5,15 @@ import Link from 'next/link'
import { PropsWithChildren } from 'react'
type LoginLayoutProps = {
- title: string
+ heading: string
+ subheading: string
showDisclaimer?: boolean
logoLinkToMarketingSite?: boolean
}
const LoginLayout = ({
- title,
+ heading,
+ subheading,
showDisclaimer = true,
logoLinkToMarketingSite = false,
children,
@@ -21,8 +23,8 @@ const LoginLayout = ({
} = useStore()
return (
- <div className="flex flex-col gap-8 mb-5">
- <div className="sticky top-0 mx-auto w-full max-w-7xl px-8 pt-6 sm:px-6 lg:px-8">
+ <div className="flex-1 flex flex-col bg-scale-100">
+ <div className="absolute top-0 mx-auto w-full px-8 pt-6 sm:px-6 lg:px-8">
<nav className="relative flex items-center justify-between sm:h-10">
<div className="flex flex-shrink-0 flex-grow items-center lg:flex-grow-0">
<div className="flex w-full items-center justify-between md:w-auto">
@@ -50,35 +52,62 @@ const LoginLayout = ({
</nav>
</div>
- <h1 className="text-2xl self-center mt-8">{title}</h1>
+ <div className="flex-1 flex">
+ <main className="max-w-[40%] flex-1 flex flex-col items-center bg-scale-200 px-5 pt-16 pb-8 border-r border-scale-500 shadow-lg">
+ <div className="flex-1 flex flex-col justify-center w-[384px]">
+ <div className="mb-10">
+ <h1 className="text-4xl mt-8 mb-2">{heading}</h1>
+ <h2 className="text-scale-1100">{subheading}</h2>
+ </div>
- <div className="flex flex-col justify-center items-center">
- <main className="min-w-[448px] flex flex-col bg-scale-400 px-5 rounded-lg shadow-lg">
- <img
- src="/supabase-logo.svg"
- alt="Supabase Logo"
- className="block w-20 mt-8 mb-10 self-center"
- />
+ {children}
+ </div>
- {children}
+ {showDisclaimer && (
+ <div className="sm:text-center">
+ <p className="text-xs text-scale-900 sm:mx-auto sm:max-w-sm">
+ By continuing, you agree to Supabase's{' '}
+ <Link href="https://supabase.com/docs/company/terms">
+ <a className="underline hover:text-scale-1100">Terms of Service</a>
+ </Link>{' '}
+ and{' '}
+ <Link href="https://supabase.com/docs/company/privacy">
+ <a className="underline hover:text-scale-1100">Privacy Policy</a>
+ </Link>
+ , and to receive periodic emails with updates.
+ </p>
+ </div>
+ )}
</main>
- </div>
- {showDisclaimer && (
- <div className="sm:text-center">
- <p className="text-xs text-scale-900 sm:mx-auto sm:max-w-sm">
- By continuing, you agree to Supabase's{' '}
- <Link href="https://supabase.com/docs/company/terms">
- <a className="underline hover:text-scale-1100">Terms of Service</a>
- </Link>{' '}
- and{' '}
- <Link href="https://supabase.com/docs/company/privacy">
- <a className="underline hover:text-scale-1100">Privacy Policy</a>
- </Link>
- , and to receive periodic emails with updates.
- </p>
- </div>
- )}
+ <aside className="flex-1 flex flex-col justify-center items-center">
+ <div className="relative flex flex-col gap-6">
+ <div className="absolute -top-12 -left-11 select-none">
+ <span className="text-[160px] leading-none text-scale-600">{'“'}</span>
+ </div>
+
+ <blockquote className="text-3xl z-10">
+ This is something I really like.
+ <br />
+ It's speeding things up so much!
+ </blockquote>
+
+ <div className="flex gap-4">
+ <img
+ src="https://pbs.twimg.com/profile_images/1086183037069549569/wUlAfmEd_400x400.jpg"
+ alt="Jonathan Summers Muir (@jsummersmuir)"
+ className="rounded-full w-12 h-12"
+ />
+
+ <div className="flex flex-col">
+ <cite className="font-medium not-italic">Jonathan Summers Muir</cite>
+ <span className="text-scale-1000 leading-tight">@jsummersmuir</span>
+ <span className="mt-0.5">Developer at Supabase</span>
+ </div>
+ </div>
+ </div>
+ </aside>
+ </div>
</div>
)
}
diff --git a/studio/components/layouts/index.ts b/studio/components/layouts/index.ts
index 2457dda09a7..2bb08b38d79 100644
--- a/studio/components/layouts/index.ts
+++ b/studio/components/layouts/index.ts
@@ -14,6 +14,7 @@ import VercelIntegrationLayout from './VercelIntegrationLayout'
import BillingLayout from './BillingLayout'
import LogsExplorerLayout from './LogsExplorerLayout/LogsExplorerLayout'
import LoginLayout from './LoginLayout/LoginLayout'
+import ForgotPasswordLayout from './LoginLayout/ForgotPasswordLayout'
export {
ProjectLayoutWithAuth,
@@ -32,6 +33,7 @@ export {
BillingLayout,
LogsExplorerLayout,
LoginLayout,
+ ForgotPasswordLayout,
}
export default ProjectLayout
diff --git a/studio/pages/forgot-password.tsx b/studio/pages/forgot-password.tsx
index ff5f6bbeed5..086743005e5 100644
--- a/studio/pages/forgot-password.tsx
+++ b/studio/pages/forgot-password.tsx
@@ -1,5 +1,5 @@
import ForgotPasswordForm from 'components/interfaces/Login/ForgotPasswordForm'
-import { LoginLayout } from 'components/layouts'
+import { ForgotPasswordLayout } from 'components/layouts'
import Link from 'next/link'
import { NextPageWithLayout } from 'types'
@@ -23,9 +23,9 @@ const ForgotPasswordPage: NextPageWithLayout = () => {
}
ForgotPasswordPage.getLayout = (page) => (
- <LoginLayout title="Forgot Password" showDisclaimer={false}>
+ <ForgotPasswordLayout title="Forgot Password" showDisclaimer={false}>
{page}
- </LoginLayout>
+ </ForgotPasswordLayout>
)
export default ForgotPasswordPage
diff --git a/studio/pages/index.tsx b/studio/pages/index.tsx
index 967c6ecbec4..20669b30003 100644
--- a/studio/pages/index.tsx
+++ b/studio/pages/index.tsx
@@ -34,7 +34,7 @@ const LoginPage: NextPageWithLayout = () => {
<Connecting />
) : (
<>
- <div className="flex flex-col gap-4">
+ <div className="flex flex-col gap-5">
<LoginWithGitHub />
<div className="relative">
@@ -42,27 +42,18 @@ const LoginPage: NextPageWithLayout = () => {
<div className="w-full border-t border-scale-700" />
</div>
<div className="relative flex justify-center text-sm">
- <span className="bg-scale-400 px-2">Or</span>
+ <span className="bg-scale-200 px-2">Or</span>
</div>
</div>
<LoginForm />
</div>
- <div className="w-full border-t border-scale-700 my-4" />
-
- <div className="mb-4">
+ <div className="my-8 self-center">
<div>
- <span className="text-scale-1000">Need an account?</span>{' '}
+ <span className="text-scale-1000">Don't have an account?</span>{' '}
<Link href="/register">
- <a className="underline hover:text-scale-1100">Register</a>
- </Link>
- </div>
-
- <div>
- <span className="text-scale-1000">Forgot your password?</span>{' '}
- <Link href="/forgot-password">
- <a className="underline hover:text-scale-1100">Reset Password</a>
+ <a className="underline hover:text-scale-1100">Sign Up Now</a>
</Link>
</div>
</div>
@@ -71,7 +62,11 @@ const LoginPage: NextPageWithLayout = () => {
}
LoginPage.getLayout = (page) => (
- <LoginLayout title="Login" logoLinkToMarketingSite={true}>
+ <LoginLayout
+ heading="Welcome back"
+ subheading="Sign in to your account"
+ logoLinkToMarketingSite={true}
+ >
{page}
</LoginLayout>
)
diff --git a/studio/pages/register.tsx b/studio/pages/register.tsx
index 87095b66d46..b5f66a982fb 100644
--- a/studio/pages/register.tsx
+++ b/studio/pages/register.tsx
@@ -7,7 +7,7 @@ import { NextPageWithLayout } from 'types'
const RegisterPage: NextPageWithLayout = () => {
return (
<>
- <div className="flex flex-col gap-4">
+ <div className="flex flex-col gap-5">
<LoginWithGitHub />
<div className="relative">
@@ -15,25 +15,27 @@ const RegisterPage: NextPageWithLayout = () => {
<div className="w-full border-t border-scale-700" />
</div>
<div className="relative flex justify-center text-sm">
- <span className="bg-scale-400 px-2">Or</span>
+ <span className="bg-scale-200 px-2">Or</span>
</div>
</div>
<RegisterForm />
</div>
- <div className="w-full border-t border-scale-700 my-4" />
-
- <div className="mb-4">
- <span className="text-scale-1000">Already have an account?</span>{' '}
+ <div className="my-8 self-center">
+ <span className="text-scale-1000">Have an account?</span>{' '}
<Link href="/">
- <a className="underline hover:text-scale-1100">Login</a>
+ <a className="underline hover:text-scale-1100">Sign In Now</a>
</Link>
</div>
</>
)
}
-RegisterPage.getLayout = (page) => <LoginLayout title="Create a New Account">{page}</LoginLayout>
+RegisterPage.getLayout = (page) => (
+ <LoginLayout heading="Get Started" subheading="Create a New Account">
+ {page}
+ </LoginLayout>
+)
export default RegisterPage
diff --git a/studio/pages/reset-password.tsx b/studio/pages/reset-password.tsx
index af8584e1cb5..7af393493a7 100644
--- a/studio/pages/reset-password.tsx
+++ b/studio/pages/reset-password.tsx
@@ -1,5 +1,5 @@
import ResetPasswordForm from 'components/interfaces/Login/ResetPasswordForm'
-import { LoginLayout } from 'components/layouts'
+import { ForgotPasswordLayout } from 'components/layouts'
import Link from 'next/link'
import { NextPageWithLayout } from 'types'
@@ -23,9 +23,9 @@ const ResetPasswordPage: NextPageWithLayout = () => {
}
ResetPasswordPage.getLayout = (page) => (
- <LoginLayout title="Reset Password" showDisclaimer={false}>
+ <ForgotPasswordLayout title="Reset Password" showDisclaimer={false}>
{page}
- </LoginLayout>
+ </ForgotPasswordLayout>
)
export default ResetPasswordPage
diff --git a/studio/styles/main.scss b/studio/styles/main.scss
index 28468481253..da61c46d0bc 100644
--- a/studio/styles/main.scss
+++ b/studio/styles/main.scss
@@ -21,7 +21,7 @@ html,
body,
#__next,
.main {
- height: 100vh;
+ height: 100%;
padding: 0;
margin: 0;
-moz-osx-font-smoothing: grayscale;