From 7559e39030f3f935f7c715d503f57bce73dab82d Mon Sep 17 00:00:00 2001 From: Beatrice Olivera Date: Sun, 2 Sep 2018 01:22:03 +0100 Subject: [PATCH] made login/sign up page responsive --- app/assets/stylesheets/devise/_login.scss | 4 ++-- app/assets/stylesheets/pages/_settings.scss | 13 +++++++++++++ app/views/devise/sessions/new.html.erb | 12 ++++++++++-- app/views/devise/shared/_links.html.erb | 4 ++-- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/devise/_login.scss b/app/assets/stylesheets/devise/_login.scss index 702f4ce..0bb8aaf 100644 --- a/app/assets/stylesheets/devise/_login.scss +++ b/app/assets/stylesheets/devise/_login.scss @@ -18,13 +18,13 @@ url('https://unsplash.com/photos/jay5BqVyf5A'); - .login-content { position: relative; - top: -10vh; + // top: -10vh; padding: 50px; background-color: white; width: 25vw; + min-width: 300px; border-radius: 3px; box-shadow: 1px 1px 10px rgba(0,0,0, 0.21); diff --git a/app/assets/stylesheets/pages/_settings.scss b/app/assets/stylesheets/pages/_settings.scss index b7b0f6c..565180a 100644 --- a/app/assets/stylesheets/pages/_settings.scss +++ b/app/assets/stylesheets/pages/_settings.scss @@ -72,6 +72,15 @@ input:checked + .slider:before { color: black; } +.slider.rounded { + border-radius: 3px; +} + +.slider.rounded:before { + border-radius: 3px; +} + + .settings { color: white; } @@ -102,6 +111,10 @@ input:checked + .slider:before { align-items: center; } +.space-between { + justify-content: space-between; +} + .center-screen { display: flex; flex-direction: column; diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 799901f..d584042 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -11,11 +11,19 @@ <%= f.input :password, required: false, input_html: { autocomplete: "current-password" } %> - <%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %> +
+ <%= f.label :remember_me %> + +
+ + <%#= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
- <%= f.button :submit, "Log in", class: "login btn btn-primary" %> + <%= f.button :submit, "Log in", class: "login btn btn-primary vertical-margin" %>
<% end %> diff --git a/app/views/devise/shared/_links.html.erb b/app/views/devise/shared/_links.html.erb index a87593a..eb86934 100644 --- a/app/views/devise/shared/_links.html.erb +++ b/app/views/devise/shared/_links.html.erb @@ -3,11 +3,11 @@ <% end -%> <%- if devise_mapping.registerable? && controller_name != 'registrations' %> - <%#= link_to "Sign up", new_registration_path(resource_name) %> + <%= link_to "Sign up", new_registration_path(resource_name) %> <% end -%> <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> - <%= link_to "Forgot your password?", new_password_path(resource_name) %>
+ <%#= link_to "Forgot your password?", new_password_path(resource_name) %>
<% end -%> <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>