feat(user): style register page

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
sphericalkat committed 2021-08-15 02:18:34 +05:30
1 parent 16a0c7ec98
commit c99df5e8bd
3 files changed
+27 -36

No files matched your search

@@ -1,26 +1,32 @@
<h1>Register</h1>
<div class="flex flex-col w-full h-full justify-center items-center">
<h1 class="font-bold text-4xl text-amber pt-4">Register</h1>
<%= form_for @changeset, Routes.user_registration_path(@conn, :create), fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= form_for @changeset, Routes.user_registration_path(@conn, :create), [class: "flex flex-col h-full justify-center items-start m-auto"], fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<%= label f, :email %>
<%= email_input f, :email, required: true %>
<%= error_tag f, :email %>
<div class="flex flex-col w-full">
<%= label f, :email %>
<%= email_input f, :email, [class: "text-black px-2 py-1 outline-none", required: true] %>
<%= error_tag f, :email %>
</div>
<%= label f, :password %>
<%= password_input f, :password, required: true %>
<%= error_tag f, :password %>
<div class="flex flex-col mt-2 w-full">
<%= label f, :password, [class: ""] %>
<%= password_input f, :password, [class: "text-black px-2 py-1 outline-none", required: true] %>
<%= error_tag f, :password %>
</div>
<div>
<%= submit "Register" %>
</div>
<% end %>
<div class="bg-amber mt-4 rounded-sm px-2 py-1">
<%= submit "Sign up" %>
</div>
<% end %>
<p>
<%= link "Log in", to: Routes.user_session_path(@conn, :new) %> |
<%= link "Forgot your password?", to: Routes.user_reset_password_path(@conn, :new) %>
</p>
<p class="mb-4 text-amber">
<%= link "Log in", to: Routes.user_session_path(@conn, :new) %> <span>|</span>
<%= link "Forgot password?", to: Routes.user_reset_password_path(@conn, :new) %>
</p>
</div>