fix(users): fix styles for login page
Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
parent
7374d7189e
commit
47acc97955
@ -34,6 +34,7 @@ defmodule KetbinWeb.UserAuth do
|
|||||||
|> put_session(:user_token, token)
|
|> put_session(:user_token, token)
|
||||||
|> put_session(:live_socket_id, "users_sessions:#{Base.url_encode64(token)}")
|
|> put_session(:live_socket_id, "users_sessions:#{Base.url_encode64(token)}")
|
||||||
|> maybe_write_remember_me_cookie(token, params)
|
|> maybe_write_remember_me_cookie(token, params)
|
||||||
|
|> put_flash(:info, "Logged in successfully!")
|
||||||
|> redirect(to: user_return_to || signed_in_path(conn))
|
|> redirect(to: user_return_to || signed_in_path(conn))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,27 +1,34 @@
|
|||||||
<h1>Log in</h1>
|
<div class="flex flex-col w-full h-full justify-center items-center">
|
||||||
|
<h1 class="font-bold text-4xl text-amber pt-4">Log in</h1>
|
||||||
|
|
||||||
<%= form_for @conn, Routes.user_session_path(@conn, :create), [as: :user], fn f -> %>
|
<%= form_for @conn, Routes.user_session_path(@conn, :create), [as: :user, class: "flex flex-col h-full justify-center items-start m-auto"], fn f -> %>
|
||||||
<%= if @error_message do %>
|
<%= if @error_message do %>
|
||||||
<div class="alert alert-danger">
|
<div class="alert alert-danger">
|
||||||
<p><%= @error_message %></p>
|
<p><%= @error_message %></p>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= label f, :email %>
|
<div class="flex flex-col w-full">
|
||||||
<%= email_input f, :email, required: true %>
|
<%= label f, :email %>
|
||||||
|
<%= email_input f, :email, [class: "text-black px-2 py-1 outline-none", required: true] %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= label f, :password %>
|
<div class="flex flex-col mt-2 w-full">
|
||||||
<%= password_input f, :password, required: true %>
|
<%= label f, :password %>
|
||||||
|
<%= password_input f, :password, [class: "text-black px-2 py-1 outline-none", required: true] %>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-2 w-full justify-center items-center">
|
||||||
|
<%= checkbox f, :remember_me, [class: "mr-2 outline-none"] %>
|
||||||
|
<%= label f, :remember_me, "Keep me logged in for 60 days" %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<%= label f, :remember_me, "Keep me logged in for 60 days" %>
|
<div class="bg-amber mt-4 rounded-sm px-2 py-1">
|
||||||
<%= checkbox f, :remember_me %>
|
<%= submit "Log in" %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div>
|
<p class="mb-4 text-amber">
|
||||||
<%= submit "Log in" %>
|
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
|
||||||
</div>
|
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
|
||||||
<% end %>
|
</p>
|
||||||
|
</div>
|
||||||
<p>
|
|
||||||
<%= link "Register", to: Routes.user_registration_path(@conn, :new) %> |
|
|
||||||
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
|
|
||||||
</p>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user