diff --git a/app/assets/images/neopass_icon.png b/app/assets/images/neopass_icon.png new file mode 100644 index 00000000..70a2590e Binary files /dev/null and b/app/assets/images/neopass_icon.png differ diff --git a/app/assets/stylesheets/devise/sessions/new.sass b/app/assets/stylesheets/devise/sessions/new.sass new file mode 100644 index 00000000..356c355a --- /dev/null +++ b/app/assets/stylesheets/devise/sessions/new.sass @@ -0,0 +1,17 @@ +body.devise-sessions, body.devise-sessions-new + .log-in-with-neopass-button + background: linear-gradient(#ebb233, #f6e250, #ebb233) + color: #111 + font-size: 1rem + text-shadow: none + font-family: "Arial Black", sans-serif + margin-bottom: 1em + + &:hover + color: #111 // override default DTI styles + filter: brightness(105%) + + .neopass-icon + vertical-align: middle + height: 2em + width: 2em diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 87928f91..53774e6b 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,15 +1,12 @@

Log in

<% if can_use_neopass %> - 🌟✨🌟✨🌟✨🌟✨🌟 -
- <%= button_to "Log in with NeoPass", - auth_user_neopass_omniauth_authorize_path(intent: "login"), - data: {turbo: false} # Turbo can't handle this redirect! + <%= button_to auth_user_neopass_omniauth_authorize_path(intent: "login"), + data: {turbo: false}, class: "log-in-with-neopass-button" do %> - 🌟✨🌟✨🌟✨🌟✨🌟 -
-
+ Log in with + <%= image_tag "neopass_icon.png", alt: "NeoPass", class: "neopass-icon" %> + <% end %> <% end %> <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> @@ -36,3 +33,7 @@ <% end %> <%= render "devise/shared/links" %> + +<% content_for :stylesheets do %> + <%= stylesheet_link_tag "devise/sessions/new" %> +<% end %>