Update login UI

This commit is contained in:
Daniel Nitsikopoulos
2024-09-29 22:26:56 +10:00
parent a9e1c4bf60
commit 4d4758c6cd
3 changed files with 8 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@@ -8,7 +8,7 @@ module Adamantium
def call(env)
session = env["rack.session"]
return [403, {"Content-Type" => "text/html"}, ["Unauthorized | <a href=\"/admin/login\">Login</>"]] unless @auth_proc.call(session[:user_id])
return [302, {"Location" => "/admin/login"}, []] unless @auth_proc.call(session[:user_id])
@app.call(env)
end

View File

@@ -1,7 +1,11 @@
div class="max-w-prose mx-auto prose dark:prose-invert"
form action="/admin/sessions/create" method="POST"
div class=""
h2 class="m-0" Log in
div class="mb-2"
p Enter your email address and we'll send you a login link
div class="mb-2 flex"
label for="email" class="mr-2" Email
input type="email" id="email" name="email" class="border"
input type="email" id="email" name="email" class="border p-1 rounded w-full"
div class="mb-2"
button Login
button class="rounded bg-blue-100 hover:bg-blue-200 text-blue-600 px-2 hover:cursor-pointer w-full" Log in