Very basic login form polish
This commit is contained in:
parent
2cc6cee542
commit
724f22e602
2 changed files with 34 additions and 10 deletions
|
@ -1,4 +1,26 @@
|
||||||
body.devise-sessions, body.devise-sessions-new
|
body.devise-sessions, body.devise-sessions-new
|
||||||
|
.login-form
|
||||||
|
margin-bottom: 1em
|
||||||
|
|
||||||
|
.field
|
||||||
|
margin-bottom: .5em
|
||||||
|
|
||||||
|
.input-field label
|
||||||
|
font-weight: bold
|
||||||
|
|
||||||
|
.checkbox-field
|
||||||
|
display: flex
|
||||||
|
gap: .25em
|
||||||
|
font-size: 85%
|
||||||
|
input[type=checkbox]
|
||||||
|
height: 1em
|
||||||
|
width: 1em
|
||||||
|
|
||||||
|
.login-links
|
||||||
|
font-size: 85%
|
||||||
|
display: flex
|
||||||
|
gap: .5em
|
||||||
|
|
||||||
.log-in-with-neopass-button
|
.log-in-with-neopass-button
|
||||||
background: linear-gradient(#ebb233, #f6e250, #ebb233)
|
background: linear-gradient(#ebb233, #f6e250, #ebb233)
|
||||||
color: #111
|
color: #111
|
||||||
|
|
|
@ -9,30 +9,32 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
|
<%= form_with(model: resource, url: session_path(resource_name),
|
||||||
<div class="field">
|
class: "login-form") do |f| %>
|
||||||
|
<div class="field input-field">
|
||||||
<%= f.label :name, 'Username' %><br />
|
<%= f.label :name, 'Username' %><br />
|
||||||
<%= f.text_field :name, autofocus: true, autocomplete: "username" %>
|
<%= f.text_field :name, autofocus: true, autocomplete: "username" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field">
|
<div class="field input-field">
|
||||||
<%= f.label :password %><br />
|
<%= f.label :password %><br />
|
||||||
<%= f.password_field :password, autocomplete: "current-password" %>
|
<%= f.password_field :password, autocomplete: "current-password" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if devise_mapping.rememberable? %>
|
<div class="field checkbox-field">
|
||||||
<div class="field">
|
<%= f.check_box :remember_me %>
|
||||||
<%= f.check_box :remember_me %>
|
<%= f.label :remember_me %>
|
||||||
<%= f.label :remember_me %>
|
</div>
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<%= f.submit "Log in" %>
|
<%= f.submit "Log in" %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= render "devise/shared/links" %>
|
<div class="login-links">
|
||||||
|
<%= link_to "Sign up", new_auth_user_path %>
|
||||||
|
<%= link_to "Forgot your password?", new_auth_user_password_path %>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% content_for :stylesheets do %>
|
<% content_for :stylesheets do %>
|
||||||
<%= stylesheet_link_tag "devise/sessions/new" %>
|
<%= stylesheet_link_tag "devise/sessions/new" %>
|
||||||
|
|
Loading…
Reference in a new issue