Skip to content

Commit c914d34

Browse files
committed
feat: Improve My MLH sign-in button
1 parent 1b96e6d commit c914d34

File tree

5 files changed

+118
-7
lines changed

5 files changed

+118
-7
lines changed

app/assets/images/my-mlh.svg

Lines changed: 57 additions & 0 deletions
Loading

app/assets/stylesheets/general/_button.sass

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1+
/*
2+
* Regular button
3+
*/
4+
15
.button, input[type=submit]
26
background: $button--background
37
border: 1px solid $button--border
48
cursor: pointer
59
display: inline-block
6-
padding: 0.6em 1.3em !important
10+
padding: 0.6em 1.3em
711
font-size: 15px
812
text-transform: uppercase
913
color: $button--text
10-
font-weight: 600 !important
14+
font-weight: 600
1115
text-align: center
1216
text-decoration: none
1317
-webkit-appearance: none
@@ -50,3 +54,49 @@
5054

5155
.button-overlay
5256
margin-top: -100px
57+
58+
/*
59+
* My MLH CTA button
60+
*/
61+
.my-mlh-cta__button
62+
display: flex
63+
flex-flow: row nowrap
64+
padding: 0px
65+
height: 40px
66+
align-items: center
67+
justify-content: space-between
68+
width: 267px
69+
margin: 2em auto 2em
70+
transition: transform color 0.1s ease-out
71+
box-sizing: content-box
72+
73+
&:hover
74+
transform: scale(1.04)
75+
background: $button--background
76+
@include box-shadow(0 4px 18px rgba($button--background, 0.35))
77+
78+
.my-mlh-cta__text
79+
flex: 1
80+
text-align: center
81+
padding-left: 2px
82+
83+
.my-mlh-cta__image-wrapper
84+
background: rgba(255, 255, 255, 0.95)
85+
display: flex
86+
align-items: center
87+
flex-flow: row nowrap
88+
color: $button--background
89+
padding: 0px 9px
90+
justify-content: center
91+
border-radius: 0 2px 2px 0
92+
93+
.my-mlh-cta__image
94+
height: 40px
95+
padding: 13px 0
96+
width: 90px
97+
margin-right: 6px
98+
99+
.my-mlh-cta__icon
100+
transition: transform 0.1s ease-out
101+
.my-mlh-cta__button:hover &
102+
transform: scale(1.02) translateX(1px)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%a.button.my-mlh-cta__button{href: user_mlh_omniauth_authorize_path}
2+
%span.my-mlh-cta__text Continue with
3+
%span.my-mlh-cta__image-wrapper
4+
= image_tag 'my-mlh.svg', alt: 'My MLH', class: 'my-mlh-cta__image'
5+
%span.fa.fa-chevron-right.my-mlh-cta__icon

app/views/devise/registrations/_form.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
= simple_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
22
.form-actions
33
.center
4-
= btn_link_to "Continue with My MLH »".html_safe, user_mlh_omniauth_authorize_path
4+
= render 'my_mlh_cta'
55
%p
6-
%em or create an account:
6+
%em or continue manually:
77
.form-inputs
88
= f.input :email, required: true, autofocus: true
99
= f.input :password, required: true

app/views/devise/sessions/_form.html.haml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
= simple_form_for(resource, as: resource_name, url: session_path(resource_name)) do |f|
22
.form-actions
33
.center
4+
= render 'my_mlh_cta'
45
%p
5-
= btn_link_to "Continue with My MLH »".html_safe, user_mlh_omniauth_authorize_path
6-
%p
7-
%em or use an account:
6+
%em or use an email & password:
87
.form-inputs
98
= f.input :email, required: false, input_html: { autofocus: true }
109
= f.input :password, required: false

0 commit comments

Comments
 (0)