23 lines
1.5 KiB
Elixir
23 lines
1.5 KiB
Elixir
<%= form_for @conn, "/login", [class: "w-full max-w-sm mx-auto bg-white shadow-md rounded px-8 py-6 mt-8"], fn f -> %>
|
|
<h2><%= get_flash(@conn, :login_title) || "Enter your email and password" %></h2>
|
|
<%= if get_flash(@conn, :login_instructions) do %>
|
|
<p class="text-grey-dark text-sm mt-1 mb-2"><%= get_flash(@conn, :login_instructions) %></p>
|
|
<% end %>
|
|
<%= if @conn.assigns[:error] do %>
|
|
<div class="text-red text-xs italic mt-4"><%= @conn.assigns[:error] %></div>
|
|
<% end %>
|
|
<div class="my-4 mt-8">
|
|
<%= label f, :email, class: "block text-grey-darker text-sm font-bold mb-2" %>
|
|
<%= email_input f, :email, class: "bg-grey-lighter appearance-none border border-transparent rounded w-full p-2 text-grey-darker leading-normal appearance-none focus:outline-none focus:bg-white focus:border-grey-light", placeholder: "user@example.com" %>
|
|
</div>
|
|
<div class="my-4">
|
|
<%= label f, :password, class: "block text-grey-darker text-sm font-bold mb-2" %>
|
|
<%= password_input f, :password, class: "transition bg-grey-lighter appearance-none border border-transparent rounded w-full p-2 text-grey-darker leading-normal appearance-none focus:outline-none focus:bg-white focus:border-grey-light" %>
|
|
<p class="text-grey-dark text-xs my-2">Forgot password? <a href="/password/request-reset">Click here</a> to reset it.</p>
|
|
</div>
|
|
<%= submit "Login →", class: "button mt-4 w-full" %>
|
|
<p class="text-center text-grey-dark text-xs mt-4">
|
|
Don't have an account? <%= link("Register", to: "/register") %> instead.
|
|
</p>
|
|
<% end %>
|