1
0
Fork 0
forked from OpenNeo/impress

Very basic login form polish

This commit is contained in:
Emi Matchu 2024-04-11 08:54:42 -07:00
parent 2cc6cee542
commit 724f22e602
2 changed files with 34 additions and 10 deletions

View file

@ -1,4 +1,26 @@
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
background: linear-gradient(#ebb233, #f6e250, #ebb233)
color: #111

View file

@ -9,30 +9,32 @@
<% end %>
<% end %>
<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= form_with(model: resource, url: session_path(resource_name),
class: "login-form") do |f| %>
<div class="field input-field">
<%= f.label :name, 'Username' %><br />
<%= f.text_field :name, autofocus: true, autocomplete: "username" %>
</div>
<div class="field">
<div class="field input-field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "current-password" %>
</div>
<% if devise_mapping.rememberable? %>
<div class="field">
<div class="field checkbox-field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end %>
<div class="actions">
<%= f.submit "Log in" %>
</div>
<% 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 %>
<%= stylesheet_link_tag "devise/sessions/new" %>