Skip to content

Commit

Permalink
Remove the Decaf Sucks brown from the login buttons. Restructure the …
Browse files Browse the repository at this point in the history
…CSS so that the buttons can be used anywhere, not just in the #auth div.
  • Loading branch information
timriley committed Oct 10, 2010
1 parent 1d66d17 commit 7faf091
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 64 deletions.
4 changes: 0 additions & 4 deletions TODO.md
@@ -1,9 +1,5 @@
# TODO

* Change the colours of the big login buttons (make them blue-ish)
* Make the CSS less heirarchy specific (so the buttons can work outside the #oauth div)
* Publish to rubygems.org

* Do I need a Gemfile in this project?
* Add a USAGE file to the generator
* Perhaps add a generator option to skip the migration (or split the generator into tasks for initializer, migration and file copies)
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/omnisocial/auth_helper.rb
Expand Up @@ -5,11 +5,11 @@ def auth_request_path(options = {})
end

def big_twitter_login_button
content_tag(:a, content_tag(:span, 'Sign in with Twitter'), :class => 'twitter', :href => auth_request_path(:service => 'twitter'))
content_tag(:a, content_tag(:span, 'Sign in with Twitter'), :class => 'omnisocial-button twitter', :href => auth_request_path(:service => 'twitter'))
end

def big_facebook_login_button
content_tag(:a, content_tag(:span, 'Sign in with Facebook'), :class => 'facebook', :href => auth_request_path(:service => 'facebook'))
content_tag(:a, content_tag(:span, 'Sign in with Facebook'), :class => 'omnisocial-button facebook', :href => auth_request_path(:service => 'facebook'))
end

def twitter_login_button
Expand Down
2 changes: 1 addition & 1 deletion app/views/omnisocial/auth/new.html.erb
@@ -1,4 +1,4 @@
<div id="oauth">
<div id="omnisocial-login">
<% if flash[:error] -%>
<div class="error">
<p>
Expand Down
125 changes: 68 additions & 57 deletions lib/generators/omnisocial/templates/assets/stylesheets/omnisocial.css
@@ -1,57 +1,68 @@
/*----- Auth ------------------------ */
#oauth {
overflow: hidden; }
#oauth a {
text-decoration: none; }
#oauth a:hover span {
text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0px;
background: #413e31;
background: -webkit-gradient(linear, left top, left bottom, from(#535044), to(#413e31));
border-color: #343125;
color: #e4d9ac;
-o-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
-moz-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0; }
#oauth span {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-width: 1px;
border-style: solid;
font-weight: bold;
font-family: "proxima-nova-condensed-1", "proxima-nova-condensed-2", Helvetica, Arial, Verdana, sans-serif;
font-size: 16px;
cursor: pointer;
display: inline-block;
line-height: 1;
margin-top: 1px;
padding: 8px 10px 9px;
position: relative;
text-decoration: none;
text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0px;
background: #847539;
background: -webkit-gradient(linear, left top, left bottom, from(#9c8a46), to(#847539));
border-color: #5f5324;
color: white;
float: none;
font-size: 18px;
position: absolute; }
#oauth .information {
float: left;
margin-right: 40px;
width: 450px; }
#oauth .twitter {
background: url(/images/omnisocial/twitter.gif) center center no-repeat;
float: left;
height: 255px;
width: 200px; }
#oauth .twitter span {
margin: 240px 0 0 25px; }
#oauth .facebook {
background: url(/images/omnisocial/facebook.png) center center no-repeat;
float: left;
margin-left: 40px;
height: 255px;
width: 200px; }
#oauth .facebook span {
margin: 240px 0 0 11px; }
#omnisocial-login {
overflow: hidden;
}

#omnisocial-login .information {
float: left;
margin-right: 40px;
width: 450px;
}

a.omnisocial-button {
text-decoration: none;
}
a.omnisocial-button span {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-width: 1px;
border-style: solid;
font-weight: bold;
font-family: "proxima-nova-condensed-1", "proxima-nova-condensed-2", Helvetica, Arial, Verdana, sans-serif;
font-size: 16px;
cursor: pointer;
display: inline-block;
line-height: 1;
margin-top: 1px;
padding: 8px 10px 9px;
position: relative;
text-decoration: none;
text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0px;
background: #3583cf;
background: -webkit-gradient(linear, left top, left bottom, from(#629ed9), to(#3583cf));
border-color: #bbe2f8;
color: white;
float: none;
font-size: 18px;
position: absolute;
}
a:hover.omnisocial-button span {
text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0px;
background: #6ca520;
background: -webkit-gradient(linear, left top, left bottom, from(#90bb58), to(#6ca520));
border-color: #dcf1bf;
-o-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
-webkit-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
-moz-box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
box-shadow: rgba(0, 0, 0, 0.5) 0 0 5px 0;
}

a.omnisocial-button.twitter {
background: url(/images/omnisocial/twitter.gif) center center no-repeat;
float: left;
height: 255px;
width: 200px;
}
a.omnisocial-button.twitter span {
margin: 240px 0 0 25px;
}

a.omnisocial-button.facebook {
background: url(/images/omnisocial/facebook.png) center center no-repeat;
float: left;
margin-left: 40px;
height: 255px;
width: 200px;
}
a.omnisocial-button.facebook span {
margin: 240px 0 0 11px;
}

0 comments on commit 7faf091

Please sign in to comment.