From 3d89e1f203adccaf1115103edbd54e7bf9f883d5 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Wed, 19 Jan 2011 23:06:54 -0800 Subject: [PATCH] login page cleanup. totally simple. changed link color to something less jarring --- app/views/devise/sessions/new.haml | 72 +++++++++---------- app/views/layouts/application.html.haml | 4 +- config/locales/devise/devise.en.yml | 1 - config/locales/diaspora/en.yml | 1 + public/stylesheets/sass/application.sass | 88 +++++++++++++++++++++--- 5 files changed, 117 insertions(+), 49 deletions(-) diff --git a/app/views/devise/sessions/new.haml b/app/views/devise/sessions/new.haml index 277330678..4b56378c1 100644 --- a/app/views/devise/sessions/new.haml +++ b/app/views/devise/sessions/new.haml @@ -2,43 +2,43 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. -.span-10.append-1.last - .floating - %h3 - = t('.login') += content_for :head do + :css + header{ display:none; } + +.container{:style => 'text-align:center;'} + #login + = image_tag('logo_caps.png') + %br + %br = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| - #user - %p.username - = f.label :username , t('username') - = f.text_field :username - %p.user_network + %p + = f.label :username , t('username') + = f.text_field :username + %span.pod_location ="@#{AppConfig[:pod_uri].host}" - %p - = f.label :password , t('password') - = f.password_field :password - %p.checkbox_select - - if devise_mapping.rememberable? - = f.check_box :remember_me - = f.label :remember_me , t('.remember_me') - %br - = f.submit t('.sign_in') - - %p - = render :partial => "devise/shared/links" - %p - = link_to t('.have_a_problem'), 'http://diaspora.shapado.com/' - -.span-13.last - %h1 - = t('.alpha_software') - - %h3 - = t('.bugs_and_feedback') - - %h4 - %span.brandon DIASPORA* - = t('.modern_browsers') - = image_tag('modern_browsers.png') - + %p + = f.label :password , t('password') + = f.password_field :password + %span + - if devise_mapping.recoverable? && controller_name != 'passwords' + = link_to t('devise.shared.links.forgot_your_password'), new_password_path(resource_name) + - else + \. + /%p.checkbox_select + /- if devise_mapping.rememberable? + /= f.check_box :remember_me + /= f.label :remember_me , t('.remember_me') + %p.submit + = f.submit t('.sign_in') + %span + - if !AppConfig[:registrations_closed] && devise_mapping.registerable? && controller_name != 'registrations' + = link_to t('devise.shared.links.sign_up'), new_registration_path(resource_name) + - else + \. + %br + %p.shared_links + /= render :partial => "devise/shared/links" + /- if !AppConfig[:registrations_closed] && devise_mapping.registerable? && controller_name != 'registrations' diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 11e12af88..3122c5840 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -90,13 +90,15 @@ /=render :partial => 'layouts/debug.haml' %footer .container - = image_tag 'powered_by_diaspora.png', :height => "11px", :width => "145px" %ul#footer_nav %li= link_to '@joindiaspora', "http://twitter.com/joindiaspora" %li= link_to 'github', "https://github.com/diaspora/diaspora" %li= link_to t('layouts.header.blog'), "http://blog.joindiaspora.com" %li= link_to t('layouts.header.code'), "#{root_url.chomp('/')}/source.tar.gz" unless request.url.match(/joindiaspora.com/) %li= link_to t('.whats_new'), 'https://github.com/diaspora/diaspora/wiki/Changelog' + = image_tag 'powered_by_diaspora.png', :height => "11px", :width => "145px" + %br + = link_to t('.have_a_problem'), 'http://diaspora.shapado.com/' -if !@landing_page && request.url.match(/joindiaspora.com/) :javascript diff --git a/config/locales/devise/devise.en.yml b/config/locales/devise/devise.en.yml index 5f6c19109..a86b8dee1 100644 --- a/config/locales/devise/devise.en.yml +++ b/config/locales/devise/devise.en.yml @@ -20,7 +20,6 @@ en: username: 'Username' password: 'Password' sign_in: 'Sign in' - have_a_problem: "Have a problem? Find an answer here" remember_me: "Remember me" alpha_software: 'You are about to use alpha software.' bugs_and_feedback: 'Be advised, you will experience bugs. We encourage you to use the Feedback button on the right hand side of your browser to report any hiccups! We will work as fast as we can to resolve any issues you report.' diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index ba72fa121..7812e9609 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -93,6 +93,7 @@ en: application: powered_by: "POWERED BY DIASPORA*" whats_new: "what's new?" + have_a_problem: "Have a problem? Find an answer here" shared: publisher: posting: "Posting..." diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 40ea5bf29..85fba8d30 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -3,6 +3,8 @@ // the COPYRIGHT file. +$blue: #3F8FBA + body :padding 2em :margin 0 @@ -10,6 +12,7 @@ body :background-color rgb(252,252,252) a :color #107FC9 + :color $blue :text :decoration none &:hover @@ -201,7 +204,7 @@ header :height 100% &:hover :background - :color #107FC9 + :color $blue :color #fff &.active @@ -378,7 +381,7 @@ header &:hover div.info, .time, .from h5 a - :color #107FC9 + :color $blue &:hover :color #22AAE0 &:active @@ -1747,33 +1750,38 @@ ul#request_result :right 1em footer - :margin - :top 40px - :text - :align center :width 100% :left 0 :bottom 0 :color #999 .container + :margin + :top 4em :padding 0 - :top 2em + :top 0.5em :border :top 1px solid #ddd + img + :position relative + :top 2px + ul#footer_nav :margin 0 :padding 0 + :display inline-block + :float right > li :display inline :margin :right 1em + + &:last-child + :margin 0 a :color #777 - :font - :weight bold &:hover :color #ccc @@ -1790,7 +1798,7 @@ ul#landing_nav :margin :right 0.5em a - :color #107FC9 + :color $blue &.login :padding 5px 8px @@ -1863,7 +1871,7 @@ ul#landing_nav :height 47px :margin 0 :background - :color #107FC9 + :color $blue :-webkit-border-radius 0 5px 5px 0 :-moz-border-radius 0 5px 5px 0 @@ -2246,3 +2254,61 @@ ul.show_comments :margin :right 4px :top 5px + +#login + :width 600px + :padding + :top 10% + :bottom 20% + :text + :align center + :display inline-block + + form + input, + label + :font + :size 21px + :display inline + + label + :top 13px + :text-shadow 0 1px 1px #ccc + + input[type='text'], + input[type='password'] + :-webkit-box-shadow 0 1px 0px #fff, 0 -1px 0px #888 + :-moz-box-shadow 0 1 0px #fff + :box-shadow 0 0 4px #fff + :width 180px + :max-width 180px + + p + :display inline-block + :position relative + :width 200px + + &:last-child + :margin + :left 3px + + span + :display block + :color #fff + &.pod_location + :color #888 + + &.submit + :width 100px + + input + :width 100px + :position relative + :height 40px + :top 0px + :color #666 + :margin + :bottom 10px + &:hover + :color #444 +