diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-28 02:24:13 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-28 02:24:36 +0900 |
| commit | f106dfda762b499af52a741f682c34abb83d27d9 (patch) | |
| tree | fb79c8ef39215b994f3c50c4267f5a266f3055bb /frontend/app/routes/login.tsx | |
| parent | 2b9de78cf20faa8d3ae8cd31a8e9d1b7f3ed9aef (diff) | |
| download | phperkaigi-2025-albatross-f106dfda762b499af52a741f682c34abb83d27d9.tar.gz phperkaigi-2025-albatross-f106dfda762b499af52a741f682c34abb83d27d9.tar.zst phperkaigi-2025-albatross-f106dfda762b499af52a741f682c34abb83d27d9.zip | |
frontend: impl /login and /dashboard
Diffstat (limited to 'frontend/app/routes/login.tsx')
| -rw-r--r-- | frontend/app/routes/login.tsx | 55 |
1 files changed, 45 insertions, 10 deletions
diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx index 0da2616..40ad66f 100644 --- a/frontend/app/routes/login.tsx +++ b/frontend/app/routes/login.tsx @@ -17,15 +17,50 @@ export async function action({ request }: ActionFunctionArgs) { export default function Login() { return ( - <Form method="post"> - <input type="username" name="username" required /> - <input - type="password" - name="password" - autoComplete="current-password" - required - /> - <button>Log In</button> - </Form> + <div className="min-h-screen bg-gray-100 flex items-center justify-center"> + <Form + method="post" + className="bg-white p-8 rounded shadow-md w-full max-w-sm" + > + <h2 className="text-2xl font-bold mb-6 text-center">Login</h2> + <div className="mb-4"> + <label + htmlFor="username" + className="block text-sm font-medium text-gray-700" + > + Username + </label> + <input + type="text" + name="username" + id="username" + required + className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" + /> + </div> + <div className="mb-6"> + <label + htmlFor="password" + className="block text-sm font-medium text-gray-700" + > + Password + </label> + <input + type="password" + name="password" + id="password" + autoComplete="current-password" + required + className="mt-1 p-2 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-blue-500 focus:border-blue-500" + /> + </div> + <button + type="submit" + className="w-full bg-blue-500 text-white py-2 rounded hover:bg-blue-600 transition duration-300" + > + Log In + </button> + </Form> + </div> ); } |
