Devise styling consistency

This commit is contained in:
drusepth 2022-02-05 20:16:31 -08:00
parent 6f52e0961a
commit 6550ded52a
3 changed files with 25 additions and 22 deletions

View File

@ -9,6 +9,7 @@ class RegistrationsController < Devise::RegistrationsController
def new
super
if params[:referral]
session[:referral] = params[:referral]
end

View File

@ -22,28 +22,28 @@
</ul>
</div>
<% end %>
<div class="mt-8">
<%= f.label 'Name', class: 'block text-sm' %>
<%= f.text_field :name, autofocus: true, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
<div class="my-4">
<%= f.label 'Name', class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %>
<%= f.text_field :name, autofocus: true, placeholder: "Name", class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
</div>
<div>
<%= f.label 'Email', class: 'block text-sm' %>
<%= f.email_field :email, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
<div class="my-4">
<%= f.label 'Email', class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %>
<%= f.email_field :email, placeholder: "Email", class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
</div>
<div>
<%= f.label "Password #{'(' + @minimum_password_length.to_s + ' characters minimum)' if @minimum_password_length.present?}", class: 'block text-sm' %>
<%= f.password_field :password, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600', autocomplete: 'off' %>
<div class="my-4">
<%= f.label "Password #{'(' + @minimum_password_length.to_s + ' characters minimum)' if @minimum_password_length.present?}", class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %>
<%= f.password_field :password, placeholder: "Password", class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600', autocomplete: 'off' %>
</div>
<div>
<%= f.label 'Password confirmation', class: 'block text-sm' %>
<%= f.password_field :password_confirmation, class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
<div class="my-4">
<%= f.label 'Password confirmation', class: 'block uppercase text-blueGray-600 text-xs font-bold mb-2' %>
<%= f.password_field :password_confirmation, placeholder: "Password", class: 'w-full px-4 py-2 text-sm border rounded-md focus:border-blue-400 focus:outline-none focus:ring-1 focus:ring-blue-600' %>
</div>
<div class="my-2">
<%= f.label 'Email updates', class: 'block text-sm' do %>
<%= f.check_box :email_updates, checked: false %>
<span>
We're always working to improve Notebook.ai. Please check this box if you'd like to receive occasional updates about
what's new.
<div class="my-4">
<%= f.label 'Email updates', class: 'inline-flex items-center', for: :email_updates do %>
<%= f.check_box :email_updates, class: 'mr-4 h-12 w-12' %>
<span class="text-sm">
We're always working to improve Notebook.ai. Please leave this box checked if you'd like to receive occasional updates by email about
new features.
</span>
<% end %>
</div>
@ -71,11 +71,12 @@
end
%>
<%= f.submit "Sign up", class: 'block w-full px-4 py-4 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-notebook-blue border border-transparent rounded-lg active:bg-blue-500 hover:bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline-blue' %>
<%= f.submit "Sign up", class: 'block w-full px-4 py-4 mt-4 text-sm font-medium leading-5 text-center text-white transition-colors duration-150 bg-notebook-blue border border-transparent rounded-lg active:bg-blue-500 hover:bg-blue-500 hover:bg-blue-700 focus:outline-none focus:shadow-outline-blue cursor-pointer' %>
<% end %>
<div class="mt-4 text-center text-sm">
<%= render "devise/shared/links" %>
<div class="mt-4 text-center text-sm font-bold">
Already have an account?
<%= link_to 'Sign in instead.', new_user_session_path, class: 'text-notebook-blue hover:border-notebook-blue border-b-2' %>
</div>
</div>
</div>

View File

@ -12,7 +12,8 @@
</div>
<div>
<%= f.label :remember_me, class: 'inline-flex items-center cursor-pointer' do %>
<input id="customCheckLogin" type="checkbox" class="form-checkbox border-0 rounded text-blueGray-700 ml-1 w-5 h-5 ease-linear transition-all duration-150"><span class="ml-2 text-sm font-semibold text-blueGray-600">
<input id="customCheckLogin" type="checkbox" class="form-checkbox border-0 rounded text-blueGray-700 ml-1 w-5 h-5 ease-linear transition-all duration-150">
<span class="ml-2 text-sm font-semibold text-blueGray-600">
Remember me
</span>
<% end %>