2024-03-05 16:56:17 +00:00
|
|
|
import type { MetaFunction } from "@remix-run/node"
|
|
|
|
import { Link } from "@remix-run/react"
|
|
|
|
import { Button } from "~/components/ui/button"
|
|
|
|
import logoPng from "~/images/lume-logo.png?url"
|
|
|
|
import lumeColorLogoPng from "~/images/lume-color-logo.png?url"
|
|
|
|
import discordLogoPng from "~/images/discord-logo.png?url"
|
|
|
|
import lumeBgPng from "~/images/lume-bg-image.png?url"
|
|
|
|
import { Field, FieldCheckbox } from "~/components/forms"
|
2024-03-05 19:16:05 +00:00
|
|
|
import { useForm } from "@conform-to/react"
|
2024-03-05 16:56:17 +00:00
|
|
|
|
|
|
|
export const meta: MetaFunction = () => {
|
|
|
|
return [
|
|
|
|
{ title: "New Remix SPA" },
|
|
|
|
{ name: "description", content: "Welcome to Remix (SPA Mode)!" }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
export default function Index() {
|
2024-03-05 19:16:05 +00:00
|
|
|
const [form, fields] = useForm({
|
|
|
|
id: "login"
|
|
|
|
})
|
2024-03-05 16:56:17 +00:00
|
|
|
return (
|
|
|
|
<div className="p-10 h-screen relative overflow-clip">
|
|
|
|
<header>
|
|
|
|
<img src={logoPng} alt="Lume logo" className="h-10"></img>
|
|
|
|
</header>
|
|
|
|
<form className="w-full p-2 max-w-md space-y-4 mt-12 bg-background">
|
|
|
|
<h2 className="text-3xl font-bold !mb-12">Welcome back! 🎉</h2>
|
|
|
|
<Field
|
2024-03-05 19:16:05 +00:00
|
|
|
inputProps={{ name: fields.email.name }}
|
2024-03-05 16:56:17 +00:00
|
|
|
labelProps={{ children: "Email" }}
|
2024-03-05 19:16:05 +00:00
|
|
|
errors={fields.email.errors}
|
2024-03-05 16:56:17 +00:00
|
|
|
/>
|
|
|
|
<Field
|
2024-03-05 19:16:05 +00:00
|
|
|
inputProps={{ name: fields.password.name, type: "password" }}
|
2024-03-05 16:56:17 +00:00
|
|
|
labelProps={{ children: "Password" }}
|
2024-03-05 19:16:05 +00:00
|
|
|
errors={fields.password.errors}
|
2024-03-05 16:56:17 +00:00
|
|
|
/>
|
|
|
|
<FieldCheckbox
|
2024-03-05 19:16:05 +00:00
|
|
|
inputProps={{ name: fields.rememberMe.name, form: form.id }}
|
2024-03-05 16:56:17 +00:00
|
|
|
labelProps={{ children: "Remember Me" }}
|
2024-03-05 19:16:05 +00:00
|
|
|
errors={fields.rememberMe.errors}
|
2024-03-05 16:56:17 +00:00
|
|
|
/>
|
|
|
|
<Button className="w-full h-14">Login</Button>
|
|
|
|
<p className="text-input-placeholder">
|
|
|
|
Forgot your password?{" "}
|
|
|
|
<Link
|
|
|
|
to="/sign-up"
|
|
|
|
className="text-primary-1 text-md hover:underline hover:underline-offset-4"
|
|
|
|
>
|
|
|
|
Reset Password
|
|
|
|
</Link>
|
|
|
|
</p>
|
|
|
|
<Button className="w-full h-14" variant={"outline"}>
|
|
|
|
Create an Account
|
|
|
|
</Button>
|
|
|
|
</form>
|
|
|
|
<img src={lumeBgPng} alt="Lume background" className="absolute top-0 right-0 md:w-2/3 object-cover z-[-1]"></img>
|
|
|
|
<footer className="absolute bottom-5">
|
|
|
|
<ul className="flex flex-row">
|
|
|
|
<li>
|
|
|
|
<Link to="https://discord.lumeweb.com">
|
|
|
|
<Button
|
|
|
|
variant={"link"}
|
|
|
|
className="flex flex-row gap-x-2 text-input-placeholder"
|
|
|
|
>
|
|
|
|
<img className="h-5" src={discordLogoPng} alt="Discord Logo" />
|
|
|
|
Connect with us
|
|
|
|
</Button>
|
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
<li>
|
|
|
|
<Link to="https://lumeweb.com">
|
|
|
|
<Button
|
|
|
|
variant={"link"}
|
|
|
|
className="flex flex-row gap-x-2 text-input-placeholder"
|
|
|
|
>
|
|
|
|
<img className="h-5" src={lumeColorLogoPng} alt="Lume Logo" />
|
|
|
|
Connect with us
|
|
|
|
</Button>
|
|
|
|
</Link>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</footer>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|