From b211da433f03c0840a2e177b5b4df54f60ee91f1 Mon Sep 17 00:00:00 2001 From: Sergey Nartimov Date: Fri, 23 Mar 2012 10:30:00 +0300 Subject: [PATCH] style github auth link --- app/views/devise/sessions/new.html.haml | 4 +++- public/images/github.png | Bin 0 -> 1983 bytes public/stylesheets/application.css | 4 +++- spec/acceptance/login_spec.rb | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 public/images/github.png diff --git a/app/views/devise/sessions/new.html.haml b/app/views/devise/sessions/new.html.haml index 97ea781..9d13daf 100644 --- a/app/views/devise/sessions/new.html.haml +++ b/app/views/devise/sessions/new.html.haml @@ -2,7 +2,9 @@ - auth_key = Devise.authentication_keys.first - if Errbit::Config.github_authentication - = link_to "Sign in with Github", user_omniauth_authorize_path(:github) + - content_for :action_bar do + %div.action-bar + %span.github= link_to "Sign in with GitHub", user_omniauth_authorize_path(:github), :style => 'background: url(/images/github.png) no-repeat 5px 5px' = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| .required diff --git a/public/images/github.png b/public/images/github.png new file mode 100644 index 0000000..ab2adc4 Binary files /dev/null and b/public/images/github.png differ diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c29cea6..cce4171 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -829,4 +829,6 @@ table.errs tr td.message .inline_comment em.commenter { } .current.asc:after { content: ' ↑'; } -.current.desc:after { content: ' ↓'; } \ No newline at end of file +.current.desc:after { content: ' ↓'; } + +span.github a { background: url(../images/github.png) no-repeat 5px 5px; } diff --git a/spec/acceptance/login_spec.rb b/spec/acceptance/login_spec.rb index d175afb..10787a4 100644 --- a/spec/acceptance/login_spec.rb +++ b/spec/acceptance/login_spec.rb @@ -6,9 +6,9 @@ feature 'Log in' do Fabricate(:user, :github_login => 'nashby') end - scenario 'log in via Github' do + scenario 'log in via GitHub' do visit '/' - click_link 'Sign in with Github' + click_link 'Sign in with GitHub' page.should have_content 'Successfully authorized from Github account' end end -- libgit2 0.21.2