First pass
This commit is contained in:
37
src/pages/login.astro
Normal file
37
src/pages/login.astro
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
import Layout from '../layouts/Layout.astro';
|
||||
|
||||
if (Astro.locals.user) {
|
||||
return Astro.redirect('/dashboard');
|
||||
}
|
||||
---
|
||||
|
||||
<Layout title="Login - Zamaan">
|
||||
<div class="flex justify-center items-center min-h-screen bg-base-200">
|
||||
<div class="card w-96 bg-base-100 shadow-xl">
|
||||
<div class="card-body">
|
||||
<h2 class="card-title justify-center">Login</h2>
|
||||
<form action="/api/auth/login" method="POST" class="space-y-4">
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Email</span>
|
||||
</label>
|
||||
<input type="email" name="email" placeholder="email@example.com" class="input input-bordered" required />
|
||||
</div>
|
||||
<div class="form-control">
|
||||
<label class="label">
|
||||
<span class="label-text">Password</span>
|
||||
</label>
|
||||
<input type="password" name="password" placeholder="********" class="input input-bordered" required />
|
||||
</div>
|
||||
<div class="form-control mt-6">
|
||||
<button class="btn btn-primary">Login</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="text-center mt-4">
|
||||
<a href="/signup" class="link link-hover">Don't have an account? Sign up</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Layout>
|
||||
Reference in New Issue
Block a user