Looking to optimize my Login screen for mobile responsiveness. I am working on a project in ROR, so I have an html.erb
file for the view:
<body class="app flex-row align-items-center">
<div class="container">
<div class="row ">
<div class="col-md-8">
<div class="card-group login-margin">
<div class="card p-4">
<div class="card-body">
<h1>Login</h1>
<p class="text-muted">Sign In to your account</p>
<%= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="icon-user"></i>
</span>
</div>
<%= f.text_field :email, required: false, placeholder: 'Email', class: 'form-control', type: 'text' %>
</div>
<div class="input-group mb-4">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="icon-lock"></i>
</span>
</div>
<%= f.text_field :password, required: false, placeholder: 'Password', class: 'form-control', type: 'password' %>
</div>
<%= f.input :remember_me, as: :boolean if devise_mapping.rememberable? %>
<div class="row">
<div class="col-6">
<%= f.button :submit, "Login", :class => 'mt-4 btn btn-md btn-primary' %>
</div>
<div class="col-6 text-right forget-link-margin">
<%= render "devise/shared/links" %>
</div>
</div>
<% end %>
</div>
</div>
</div>
</div>
</div>
</div>
Seeking to optimize the layout by reducing overall length and making the card more prominent and centered to enhance its appearance on mobile devices.
UPDATE: For further inspection of the page, feel free to visit this link.