Skip to content

Commit

Permalink
added google button in login / register form
Browse files Browse the repository at this point in the history
  • Loading branch information
devton committed Mar 17, 2012
1 parent 4630ece commit 0d6d3c8
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 38 deletions.
17 changes: 16 additions & 1 deletion app/stylesheets/_login.sass
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,19 @@
&:hover, &:focus
+box-shadow(rgba(black,0.75) 0px 0px 5px inset !important)
&:active
+box-shadow(rgba(black, 1) 0px 0px 15px inset !important)
+box-shadow(rgba(black, 1) 0px 0px 15px inset !important)
.with_google
float: left
clear: both
width: 100%
input[type='submit']
float: left
.login_with_google
float: left
margin-left: 10px
a.provider
float: left
margin-top: -6px
p
float: left
margin-top: 13px
14 changes: 12 additions & 2 deletions app/views/layouts/_login.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,13 @@
%p.input
= f.label :password_confirmation
= f.password_field :password_confirmation
%p.action
.action.with_google
= f.submit t('registrations.new.submit')
%div.login_with_google
= link_to image_tag('auth/google_128.png', :title => 'Google'), 'google', :class => 'provider'
%p= t('or_sign_in_with_google')
.clearfix
.clearfix
.links
= link_to t('devise.links.sign_in'), 'javascript:void(0);', :class => 'new_session_link'
%br/
Expand All @@ -47,8 +52,13 @@
%p.input.check
= f.check_box :remember_me, :checked => 'checked'
= f.label :remember_me, t('layouts.login.remember_me')
%p.action
.action.with_google
= f.submit t('devise.sessions.new.submit')
%div.login_with_google
= link_to image_tag('auth/google_128.png', :title => 'Google'), 'google', :class => 'provider'
%p= t('or_sign_in_with_google')
.clearfix
.clearfix
.links
= link_to t('devise.links.sign_up'), 'javascript:void(0);', :class => 'new_registration_link'
%br/
Expand Down
5 changes: 3 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
en:
"no": "No"
"yes": "Yes"
or_sign_in_with_google: "Or sign in with google"
accept_terms_html: "I have read and accepted the %{link}."
active_admin:
dashboard: Dashboard
Expand Down Expand Up @@ -113,7 +114,7 @@ en:
subject: "Confirmation instructions"
reset_password_instructions:
subject: "Reset password instructions"
alt: ~
alt: "Reset password instructions"
unlock_instructions:
subject: "Unlock Instructions"
omniauth_callbacks:
Expand Down Expand Up @@ -454,7 +455,7 @@ en:
comments: Comments
updates: Updates
share:
embed: "Embed this project"
embed: embed
embed_title: "Embed this project on your site"
link: Link
link_title: "Share the link"
Expand Down
1 change: 1 addition & 0 deletions config/locales/pt.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pt:
"no": Não
"yes": Sim
or_sign_in_with_google: Ou entre utilizando o google
accept_terms_html: "Eu li e estou de acordo com os %{link}."
active_admin:
dashboard: "Painel de controle"
Expand Down
91 changes: 58 additions & 33 deletions public/stylesheets/screen.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* line 17, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 17, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
Expand All @@ -20,45 +20,45 @@ time, mark, audio, video {
vertical-align: baseline;
}

/* line 20, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 20, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
body {
line-height: 1;
}

/* line 22, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 22, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
ol, ul {
list-style: none;
}

/* line 24, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 24, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
table {
border-collapse: collapse;
border-spacing: 0;
}

/* line 26, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 26, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
caption, th, td {
text-align: left;
font-weight: normal;
vertical-align: middle;
}

/* line 28, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 28, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q, blockquote {
quotes: none;
}
/* line 101, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 101, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
q:before, q:after, blockquote:before, blockquote:after {
content: "";
content: none;
}

/* line 30, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 30, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
a img {
border: none;
}

/* line 114, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
/* line 114, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/reset/_utilities.scss */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block;
}
Expand Down Expand Up @@ -889,6 +889,31 @@ body#platform #login .facebook_start:active {
-o-box-shadow: black 0px 0px 15px inset !important;
box-shadow: black 0px 0px 15px inset !important;
}
/* line 97, ../../app/stylesheets/_login.sass */
body#platform #login .with_google {
float: left;
clear: both;
width: 100%;
}
/* line 101, ../../app/stylesheets/_login.sass */
body#platform #login .with_google input[type='submit'] {
float: left;
}
/* line 103, ../../app/stylesheets/_login.sass */
body#platform #login .with_google .login_with_google {
float: left;
margin-left: 10px;
}
/* line 106, ../../app/stylesheets/_login.sass */
body#platform #login .with_google .login_with_google a.provider {
float: left;
margin-top: -6px;
}
/* line 109, ../../app/stylesheets/_login.sass */
body#platform #login .with_google .login_with_google p {
float: left;
margin-top: 13px;
}
/* line 47, ../../app/stylesheets/screen.sass */
body#platform #pre_header {
background-color: #0084b9;
Expand Down Expand Up @@ -997,7 +1022,7 @@ body#platform #menu ul {
overflow: hidden;
*zoom: 1;
}
/* line 60, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 60, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #menu ul li {
list-style-image: none;
list-style-type: none;
Expand All @@ -1008,15 +1033,15 @@ body#platform #menu ul li {
padding-left: 12px;
padding-right: 12px;
}
/* line 48, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #menu ul li:first-child, body#platform #menu ul li.first {
padding-left: 0;
}
/* line 49, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 49, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #menu ul li:last-child {
padding-right: 0;
}
/* line 50, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 50, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #menu ul li.last {
padding-right: 0;
}
Expand Down Expand Up @@ -1656,7 +1681,7 @@ body#platform .project_box .project_progress .progress_info ul {
overflow: hidden;
*zoom: 1;
}
/* line 60, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 60, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform .project_box .project_progress .progress_info ul li {
list-style-image: none;
list-style-type: none;
Expand All @@ -1667,15 +1692,15 @@ body#platform .project_box .project_progress .progress_info ul li {
padding-left: 4px;
padding-right: 4px;
}
/* line 48, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform .project_box .project_progress .progress_info ul li:first-child, body#platform .project_box .project_progress .progress_info ul li.first {
padding-left: 0;
}
/* line 49, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 49, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform .project_box .project_progress .progress_info ul li:last-child {
padding-right: 0;
}
/* line 50, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 50, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform .project_box .project_progress .progress_info ul li.last {
padding-right: 0;
}
Expand Down Expand Up @@ -2011,7 +2036,7 @@ body#platform #project_description #project_video #project_share ul {
width: 452px;
margin: 0 auto;
}
/* line 60, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 60, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_video #project_share ul li {
list-style-image: none;
list-style-type: none;
Expand All @@ -2022,15 +2047,15 @@ body#platform #project_description #project_video #project_share ul li {
padding-left: 6px;
padding-right: 6px;
}
/* line 48, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_video #project_share ul li:first-child, body#platform #project_description #project_video #project_share ul li.first {
padding-left: 0;
}
/* line 49, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 49, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_video #project_share ul li:last-child {
padding-right: 0;
}
/* line 50, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 50, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_video #project_share ul li.last {
padding-right: 0;
}
Expand Down Expand Up @@ -2229,7 +2254,7 @@ body#platform #project_description #project_menu ul {
overflow: hidden;
*zoom: 1;
}
/* line 60, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 60, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_menu ul li {
list-style-image: none;
list-style-type: none;
Expand All @@ -2240,15 +2265,15 @@ body#platform #project_description #project_menu ul li {
padding-left: 2px;
padding-right: 2px;
}
/* line 48, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_menu ul li:first-child, body#platform #project_description #project_menu ul li.first {
padding-left: 0;
}
/* line 49, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 49, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_menu ul li:last-child {
padding-right: 0;
}
/* line 50, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 50, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #project_description #project_menu ul li.last {
padding-right: 0;
}
Expand Down Expand Up @@ -3584,7 +3609,7 @@ body#platform #footer #footer_menu ul {
overflow: hidden;
*zoom: 1;
}
/* line 60, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 60, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #footer_menu ul li {
list-style-image: none;
list-style-type: none;
Expand All @@ -3595,15 +3620,15 @@ body#platform #footer #footer_menu ul li {
padding-left: 12px;
padding-right: 12px;
}
/* line 48, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #footer_menu ul li:first-child, body#platform #footer #footer_menu ul li.first {
padding-left: 0;
}
/* line 49, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 49, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #footer_menu ul li:last-child {
padding-right: 0;
}
/* line 50, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 50, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #footer_menu ul li.last {
padding-right: 0;
}
Expand Down Expand Up @@ -3633,7 +3658,7 @@ body#platform #footer #social_menu ul {
overflow: hidden;
*zoom: 1;
}
/* line 60, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 60, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #social_menu ul li {
list-style-image: none;
list-style-type: none;
Expand All @@ -3644,15 +3669,15 @@ body#platform #footer #social_menu ul li {
padding-left: 12px;
padding-right: 12px;
}
/* line 48, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 48, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #social_menu ul li:first-child, body#platform #footer #social_menu ul li.first {
padding-left: 0;
}
/* line 49, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 49, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #social_menu ul li:last-child {
padding-right: 0;
}
/* line 50, ../../../../../../Users/danielweinmann/.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
/* line 50, ../../../../../.rvm/gems/ruby-1.9.2-p290@catarse/gems/compass-0.11.5/frameworks/compass/stylesheets/compass/typography/lists/_horizontal-list.scss */
body#platform #footer #social_menu ul li.last {
padding-right: 0;
}
Expand Down

0 comments on commit 0d6d3c8

Please sign in to comment.