feat(user): style register page

Signed-off-by: SphericalKat <amolele@gmail.com>
This commit is contained in:
Amogh Lele 2021-08-15 02:18:34 +05:30
parent 16a0c7ec98
commit c99df5e8bd
No known key found for this signature in database
GPG Key ID: ED5C54FBBB920E51
3 changed files with 27 additions and 36 deletions

View File

@ -1,7 +0,0 @@
/* Includes some default style for the starter application.
* This can be safely deleted to start fresh.
*/
/* Milligram v1.3.0 https://milligram.github.io
* Copyright (c) 2017 CJ Patoilo Licensed under the MIT license
*/

View File

@ -37,14 +37,6 @@
<%= @inner_content %>
</main>
<footer class="font-bold">
<div class="copy-bg sm:hidden">
<button aria-label="Copy" viewbox="0 0 24 24" class="h-6 w-6 cursor-pointer fill-current text-white mr-4 copy-btn"">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path>
</svg>
</button>
</div>
<div class="flex px-4 py-1 text-xs sm:text-base justify-between text-amber" style="background: #1a1a1a; font-family: JetbrainsMono">
<a href="https://sphericalk.at">
© <%= DateTime.utc_now().year %> SphericalKat

View File

@ -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 -> %>
<%= 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 %>
<div class="flex flex-col w-full">
<%= label f, :email %>
<%= email_input f, :email, required: true %>
<%= 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 %>
<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 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 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>