From bf15514bc969d272e32182038062debc3ace0b48 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 10:23:03 -0700 Subject: [PATCH 1/9] redirect users#public to root_url if user does not exist. --- app/controllers/users_controller.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0d5c4d449..1cc280577 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -31,10 +31,16 @@ class UsersController < ApplicationController def public user = User.find_by_username(params[:username]) - director = Diaspora::Director.new - ostatus_builder = Diaspora::OstatusBuilder.new(user) - render :xml => director.build(ostatus_builder) + if user + director = Diaspora::Director.new + ostatus_builder = Diaspora::OstatusBuilder.new(user) + + render :xml => director.build(ostatus_builder) + else + flash[:error] = "User #{params[:username]} does not exist!" + redirect_to root_url + end end private From 241ea4559ab69c55110a2834d9814bf98dde5c47 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 10:41:38 -0700 Subject: [PATCH 2/9] gradients on aspect tags on status messages --- public/stylesheets/application.css | 12 +++++++++--- public/stylesheets/sass/application.sass | 10 ++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 42b61f513..5b8a656da 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -692,12 +692,18 @@ ul#settings_nav { cursor: default; } .public_aspect_tag { - background-color: #fffc7f; } + background: -moz-linear-gradient(19% 75% 90deg, #fffa75, #fff8ba); + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff8ba), to(#fffa75)); + background-color: #fffc7f; + border-top: 1px solid #ebe66c; } .aspect_tag { - background-color: #eeeeee; + background: -moz-linear-gradient(19% 75% 90deg, #e0e0e0, #f0f0f0); + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f0f0f0), to(#e0e0e0)); + background-color: #eeeeee; color: #999999; - text-shadow: 0 1px white; } + text-shadow: 0 1px white; + border-top: 1px solid #dddddd; } .aspect_tag ul { display: inline; margin: 0; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 71589e3cc..0fcc6eab2 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -890,15 +890,21 @@ ul#settings_nav :cursor default .public_aspect_tag - :background + :background -moz-linear-gradient(19% 75% 90deg,#FFFA75, #FFF8BA) + :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFF8BA), to(#FFFA75)) :color #FFFC7F + :border + :top 1px solid #EBE66C .aspect_tag - :background + :background -moz-linear-gradient(19% 75% 90deg,#E0E0E0, #F0F0F0) + :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F0F0F0), to(#E0E0E0)) :color #eee :color #999 :text :shadow 0 1px #fff + :border + :top 1px solid #ddd ul :display inline From b068eaf15cd0e550eb2287fd07f819a08d9235e7 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 10:48:45 -0700 Subject: [PATCH 3/9] limit content width to 600px --- public/stylesheets/application.css | 3 ++- public/stylesheets/sass/application.sass | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 5b8a656da..92944841c 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -160,7 +160,8 @@ li.message { li.message .delete:hover { background: #eeeeee; } li.message .content { - padding-left: 65px; } + padding-left: 65px; + width: 600px; } li.message .content span.from { color: black; font-weight: normal; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 0fcc6eab2..b86ddc1bf 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -209,6 +209,7 @@ li.message .content :padding :left 65px + :width 600px span.from :color #000 From 577b5545bf66730cfb4fe3f0b792779da4926249 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 11:50:13 -0700 Subject: [PATCH 4/9] comment blocks slide --- public/javascripts/stream.js | 4 ++-- public/stylesheets/application.css | 4 ++-- public/stylesheets/sass/application.sass | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/javascripts/stream.js b/public/javascripts/stream.js index e8db10abd..7811fb1a3 100644 --- a/public/javascripts/stream.js +++ b/public/javascripts/stream.js @@ -21,10 +21,10 @@ $(".show_post_comments").live('click', function(event) { if( $this.hasClass( "visible")) { $this.html($(this).html().replace("hide", "show")); - $this.closest("li").children(".content").children(".comments").fadeOut(100); + $this.closest("li").children(".content").children(".comments").slideUp(150); } else { $this.html($(this).html().replace("show", "hide")); - $this.closest("li").children(".content").children(".comments").fadeIn(100); + $this.closest("li").children(".content").children(".comments").slideDown(150); } $(this).toggleClass( "visible" ); }); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 92944841c..afaebdb29 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -263,7 +263,7 @@ ul.comment_set { margin-bottom: 0.5em; background-color: rgba(10, 81, 109, 0.05); padding: 0.6em; - border-bottom: 1px solid #cccccc; } + border-bottom: 1px solid #dddddd; } ul.comment_set li.comment .from { font-size: 1em; } ul.comment_set li.comment div.time { @@ -711,7 +711,7 @@ ul#settings_nav { padding: 0; list-style: none; } .aspect_tag ul li { - display: inline; + display: inlinte; margin-right: 2px; padding-right: 4px; border-right: 1px solid #cccccc; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b86ddc1bf..f7c58beac 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -356,7 +356,7 @@ ul.comment_set :color rgba(10,81,109,0.05) :padding 0.6em :border - :bottom 1px solid #ccc + :bottom 1px solid #ddd .from :font @@ -915,7 +915,7 @@ ul#settings_nav :style none li - :display inline + :display inlinte :margin :right 2px :padding From 0a34c24f226dac74b9e640009b9d5af23293ce45 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 11:51:52 -0700 Subject: [PATCH 5/9] tag fix --- public/stylesheets/application.css | 2 +- public/stylesheets/sass/application.sass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index afaebdb29..7c8c9beb4 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -711,7 +711,7 @@ ul#settings_nav { padding: 0; list-style: none; } .aspect_tag ul li { - display: inlinte; + display: inline-block; margin-right: 2px; padding-right: 4px; border-right: 1px solid #cccccc; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index f7c58beac..b7af588fe 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -915,7 +915,7 @@ ul#settings_nav :style none li - :display inlinte + :display inline-block :margin :right 2px :padding From 4627c5338ee3eeea3cffdd427f9eeb30c568ffc0 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 12:29:35 -0700 Subject: [PATCH 6/9] found placement of all aspects tab confusing; moved it to be the first tab --- app/views/shared/_aspect_nav.haml | 4 ++-- public/stylesheets/application.css | 10 +++++++--- public/stylesheets/sass/application.sass | 12 +++++++++--- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml index 4c4a501d2..dc01afd20 100644 --- a/app/views/shared/_aspect_nav.haml +++ b/app/views/shared/_aspect_nav.haml @@ -4,11 +4,11 @@ #aspect_nav %ul + %li{:class => ("selected" if @aspect == :all)} + = link_to t('.all_aspects'), root_url - for aspect in @aspects %li{:class => ("selected" if current_aspect?(aspect))} = link_for_aspect aspect - %li{:class => ("selected" if @aspect == :all)} - = link_to t('.all_aspects'), root_url %ul{ :style => "position:absolute;right:0;bottom:0.01em;"} %li{:class => ("selected" if @aspect == :public)} diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 7c8c9beb4..18e6ce4ba 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -118,6 +118,10 @@ header { header #session_action ul li:last-child { margin-right: 0; } header #aspect_header { + -webkit-box-shadow: 0px -4px 6px -2px #777777; + -moz-box-shadow: 0px -4px 6px -2px #777777; + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f7f7f7), to(#eeeeee)); + background: -moz-linear-gradient(19% 75% 90deg, #eeeeee, #f7f7f7); background-color: #eeeeee; border-top: 1px solid white; padding: 20px 0; } @@ -529,10 +533,10 @@ h1.big_text { line-height: 18px; font-weight: bold; background-color: #eeeeee; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#eeeeee)); - background: -moz-linear-gradient(19% 75% 90deg, #eeeeee, white); + background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#f7f7f7)); + background: -moz-linear-gradient(19% 75% 90deg, #f7f7f7, white); border: 1px solid white; - border-bottom: 1px solid #eeeeee; + border-bottom: 1px solid #f7f7f7; color: black; } #aspect_nav ul > li.selected a:hover { background-color: #efefef; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b7af588fe..b3397e68c 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -146,6 +146,12 @@ header :right 0 #aspect_header + :-webkit-box-shadow 0px -4px 6px -2px #777 + :-moz-box-shadow 0px -4px 6px -2px #777 + + :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F7F7F7), to(#EEEEEE)) + :background -moz-linear-gradient(19% 75% 90deg, #eee, #f7f7f7) + :background :color #eee :border @@ -713,11 +719,11 @@ h1.big_text :background :color #eee - :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#eee)) - :background -moz-linear-gradient(19% 75% 90deg, #eee, #fff) + :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#F7F7F7)) + :background -moz-linear-gradient(19% 75% 90deg, #f7f7f7, #fff) :border 1px solid #fff - :bottom 1px solid #eee + :bottom 1px solid #F7F7F7 :color #000 &:hover :background From e0159aaaeb8737771095e4cfe0da9620cd49e963 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 12:58:34 -0700 Subject: [PATCH 7/9] small visual tweaks --- app/views/status_messages/show.html.haml | 1 + public/stylesheets/application.css | 14 +++++++++----- public/stylesheets/sass/application.sass | 15 +++++++++++---- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index ae4ece073..3d78dd29e 100644 --- a/app/views/status_messages/show.html.haml +++ b/app/views/status_messages/show.html.haml @@ -7,6 +7,7 @@ = @status_message.message %h4= "#{t('.comments')} (#{@status_message.comments.count})" + = render "comments/comments", :post => @status_message %p diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 18e6ce4ba..2b752f9ce 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -147,7 +147,9 @@ ul#stream { padding: 12px 0; border-bottom: 1px solid #eeeeee; } ul#stream > li:hover { - background-color: #fafafa; } + background: -webkit-gradient(linear, 0% 0%, 0% 50%, from(#fafafa), to(#fcfcfc)); + background-color: #fafafa; + border-bottom: 1px solid #dddddd; } ul#stream > li:hover .destroy_link { display: inline; } ul#stream .right { @@ -392,13 +394,15 @@ label { height: 42px; margin-top: 0; margin-bottom: 0; - box-shadow: 0 1px white; - -moz-box-shadow: 0 1px white; - -webkit-box-shadow: 0 1px white; } + box-shadow: 0 1px 2px white; + -moz-box-shadow: 0 1px 2px white; + -webkit-box-shadow: 0 1px 2px white; } #publisher .button { margin-left: 100px; } #publisher img { - -webkit-box-shadow: 0 1px 0 white; + box-shadow: 0 1px 2px white; + -moz-box-shadow: 0 1px 2px white; + -webkit-box-shadow: 0 1px 2px white; border: 1px solid #bbbbbb; border-top: 1px solid #666666; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index b3397e68c..abf7bd147 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -188,9 +188,14 @@ ul#stream :bottom 1px solid #eee &:hover + :background -webkit-gradient(linear, 0% 0%, 0% 50%, from(#FAFAFA), to(#FCFCFC)) + :background :color #fafafa + :border + :bottom 1px solid #ddd + .destroy_link :display inline @@ -522,15 +527,17 @@ label :top 0 :bottom 0 - :box-shadow 0 1px #fff - :-moz-box-shadow 0 1px #fff - :-webkit-box-shadow 0 1px #fff + :box-shadow 0 1px 2px #fff + :-moz-box-shadow 0 1px 2px #fff + :-webkit-box-shadow 0 1px 2px #fff .button :margin-left 100px img - :-webkit-box-shadow 0 1px 0 #fff + :box-shadow 0 1px 2px #fff + :-moz-box-shadow 0 1px 2px #fff + :-webkit-box-shadow 0 1px 2px #fff :border 1px solid #bbb :top 1px solid #666 From f5a57a6f4afed5dc7b0e017628b8a5e69d22f69e Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 13:05:58 -0700 Subject: [PATCH 8/9] photo partial now has labels --- app/views/photos/_photo.haml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml index d39fd0666..5e86e32a6 100644 --- a/app/views/photos/_photo.haml +++ b/app/views/photos/_photo.haml @@ -22,3 +22,13 @@ \-- = link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments" = render "comments/comments", :post => post + + - if post.public? + .public_aspect_tag + public + - else + .aspect_tag + %ul + - for aspect in current_user.aspects_with_post( post.id ) + %li= aspect.name + From fa8cc5b8769dc2ee6cf8b870c0687087b32a0e1d Mon Sep 17 00:00:00 2001 From: danielvincent Date: Tue, 28 Sep 2010 23:24:04 -0400 Subject: [PATCH 9/9] moz box shadow does not like negative blur --- public/stylesheets/application.css | 1 - public/stylesheets/sass/application.sass | 1 - 2 files changed, 2 deletions(-) diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 2b752f9ce..27f5543f1 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -119,7 +119,6 @@ header { margin-right: 0; } header #aspect_header { -webkit-box-shadow: 0px -4px 6px -2px #777777; - -moz-box-shadow: 0px -4px 6px -2px #777777; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f7f7f7), to(#eeeeee)); background: -moz-linear-gradient(19% 75% 90deg, #eeeeee, #f7f7f7); background-color: #eeeeee; diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index abf7bd147..a3873d4c8 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -147,7 +147,6 @@ header #aspect_header :-webkit-box-shadow 0px -4px 6px -2px #777 - :-moz-box-shadow 0px -4px 6px -2px #777 :background -webkit-gradient(linear, 0% 0%, 0% 100%, from(#F7F7F7), to(#EEEEEE)) :background -moz-linear-gradient(19% 75% 90deg, #eee, #f7f7f7)