diff --git a/app/assets/stylesheets/devise/sessions/new.sass b/app/assets/stylesheets/devise/sessions/new.sass index 356c355a..6d4b7b3e 100644 --- a/app/assets/stylesheets/devise/sessions/new.sass +++ b/app/assets/stylesheets/devise/sessions/new.sass @@ -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 diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 53774e6b..44571b5c 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -9,30 +9,32 @@ <% end %> <% end %> -<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> -
+<%= form_with(model: resource, url: session_path(resource_name), + class: "login-form") do |f| %> +
<%= f.label :name, 'Username' %>
<%= f.text_field :name, autofocus: true, autocomplete: "username" %>
-
+
<%= f.label :password %>
<%= f.password_field :password, autocomplete: "current-password" %>
- <% if devise_mapping.rememberable? %> -
- <%= f.check_box :remember_me %> - <%= f.label :remember_me %> -
- <% end %> +
+ <%= f.check_box :remember_me %> + <%= f.label :remember_me %> +
<%= f.submit "Log in" %>
<% end %> -<%= render "devise/shared/links" %> + <% content_for :stylesheets do %> <%= stylesheet_link_tag "devise/sessions/new" %>