Rewrite login.astro as a login page

This commit is contained in:
Melon 2025-01-27 18:59:15 +00:00
parent 02f4443fb0
commit 34d84031ea
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -9,15 +9,13 @@ import Layout from "../layouts/Layout.astro";
<p>Check your inbox for a verification email</p> <p>Check your inbox for a verification email</p>
[[ end ]] [[ end ]]
[[ .AuthTemplate ]] [[ .AuthTemplate ]]
<div> <div class="w-full">
<form method="POST" action="/reset-password"> <form method="POST" action="/login">
<p>Enter your email address below to receive an email with instructions on how to reset your password.</p> <input type="hidden" name="redirect" value="[[ .Redirect ]]"/>
<p>Please note this only works if your email address is already verified.</p> <div class="w-full">
<div> <label>Email: <input type="email" name="email" value="[[ .UserEmail ]]" required/></label>
<label for="field_email">Email:</label>
<input type="email" name="email" id="field_email" required/>
</div> </div>
<button type="submit">Send Reset Password Email</button> <button type="submit">Continue</button>
</form> </form>
</div> </div>
[[ if gt (len .AuthButtons) 0 ]] [[ if gt (len .AuthButtons) 0 ]]
@ -28,3 +26,12 @@ import Layout from "../layouts/Layout.astro";
</div> </div>
[[ end ]] [[ end ]]
</Layout> </Layout>
<style>
form label {
white-space: nowrap;
justify-content: space-between;
display: flex;
gap: 1em;
}
</style>