diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0d5c4d449f0079f7ec6d47a378374edd3eb1f26c..1cc2805779209b3b92f9810ca91e8a07e6ecf975 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 diff --git a/app/views/photos/_photo.haml b/app/views/photos/_photo.haml index d39fd0666d7f2cd1fa839b9f460bd6120fe71d80..5e86e32a6dd02c1564125dba7ee295eb131617ee 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 + diff --git a/app/views/shared/_aspect_nav.haml b/app/views/shared/_aspect_nav.haml index 4c4a501d20ebe4e39c4f410dbc4c5df336262c28..dc01afd20aeeac4df5a967f28108b6cf5d769ff8 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/app/views/status_messages/show.html.haml b/app/views/status_messages/show.html.haml index ae4ece073bcf9540e73b2bfeae35e2681edf86e7..3d78dd29edffd9a7b0e6d818079f01a1520b636e 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/javascripts/stream.js b/public/javascripts/stream.js index e8db10abd4c6ec077b2fad9ee81d83b4ebea99a0..7811fb1a393fa0bfec5c0f73778e75e3502edbb4 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 42b61f5138c2b4ea0fe3f04450e5e4aaea3c68c2..27f5543f11fc163dd146f4251d136750dda5a964 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -118,6 +118,9 @@ header { header #session_action ul li:last-child { margin-right: 0; } header #aspect_header { + -webkit-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; } @@ -143,7 +146,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 { @@ -160,7 +165,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; @@ -262,7 +268,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 { @@ -387,13 +393,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; } @@ -528,10 +536,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; } @@ -692,19 +700,25 @@ 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; padding: 0; list-style: none; } .aspect_tag ul li { - display: inline; + 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 71589e3cc31da896e3d52e0ef825ff30623646a8..a3873d4c85b58c037a334d0034b4b33b4e7590f9 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -146,6 +146,11 @@ header :right 0 #aspect_header + :-webkit-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 @@ -182,9 +187,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 @@ -209,6 +219,7 @@ li.message .content :padding :left 65px + :width 600px span.from :color #000 @@ -355,7 +366,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 @@ -515,15 +526,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 @@ -712,11 +725,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 @@ -890,15 +903,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 @@ -908,7 +927,7 @@ ul#settings_nav :style none li - :display inline + :display inline-block :margin :right 2px :padding