Commit 86c6cdca authored by maxwell's avatar maxwell
Browse files

Merge branch 'master' of github.com:diaspora/diaspora_rails

parents ba984009 c27bc09e
......@@ -40,9 +40,10 @@ module ApplicationHelper
def owner_picture
default = "#{root_url}images/user/default.jpg"
image = "#{root_url}images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg"
unless File.exist?(image)
if File.exist?("public/images/user/#{User.first.profile.last_name.gsub(/ /,'').downcase}.jpg")
image_tag image, :id => "user_picture"
else File.exist?(image)
else
image_tag default, :id => "user_picture"
end
end
......
%h3 your friends
%ul#friend_stream
%ul#friend_stream.nav
- for friend in @friends
= link_to friend.real_name, friend_path(friend)
%br
%br
%hr
= link_to "add a new friend", new_friend_path
%li= link_to friend.real_name, friend_path(friend)
/= link_to "add a new friend", new_friend_path
......@@ -42,19 +42,16 @@
= link_to User.first.real_name, root_url
%span.description
= my_latest_message
#content.span-24.last
.span-5.append-1.last
= link_to owner_picture, root_path
%ul#stream_filters
%a{ :href => status_messages_path, :title => "Recent status messages."}
%li status messages
%a{ :href => bookmarks_path, :title => "Recently shared links."}
%li bookmarks
%a{ :href => blogs_path, :title => "Recent blog posts."}
%li blogs
%ul#stream_filters.nav
%li= link_to "status messages", status_messages_path
%li= link_to "bookmarks", bookmarks_path
%li= link_to "blogs", blogs_path
= render 'friends/sidebar' if user_signed_in?
.span-18
= yield
= render "posts/debug"
......@@ -32,20 +32,19 @@
.selected {
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border: 1px solid #ccc;
border-top: 1px solid #333;
-webkit-box-shadow: 0 2px 1px #fff;
background-color: rgba( 255, 255, 255, 0.5);
-webkit-box-shadow: 0 2px 1px #fff;
-moz-box-shadow: 0 2px 1px #fff;
}
#publisher
%ul#publisher_content_pickers
%a{ :class => "status_message", :href => '#', :title => "new status message."}
%li{ :class => "selected" } status message
%a{ :class => "bookmark", :href => '#', :title => "new bookmark."}
%li bookmark
%a{ :class => "blog", :href => '#', :title => "new blog post."}
%li blog
%li{ :class => "status_message selected" }= link_to "status message", "#"
%li{ :class => "bookmark" }= link_to "bookmark", "#"
%li{ :class => "blog" }= link_to "blog", "#"
#publisher_form
= form_for StatusMessage.new, :remote => true do |f|
......
......@@ -2,30 +2,30 @@
$("#publisher_content_pickers .status_message").click(function(){
if( $("#new_status_message").css("display") == "none" ) {
$("#publisher_content_pickers").children("a").children("li").removeClass("selected");
$("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50);
$(this).children("a > li").toggleClass("selected");
$(this).toggleClass("selected");
$("#new_status_message").delay(50).fadeIn(200);
}
});
$("#publisher_content_pickers .bookmark").click(function(){
$("#publisher_content_pickers .bookmark").click(function(){
if( $("#new_bookmark").css("display") == "none" ) {
$("#publisher_content_pickers").children("a").children("li").removeClass("selected");
$("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50);
$(this).children("li").toggleClass("selected");
$(this).toggleClass("selected");
$("#new_bookmark").delay(50).fadeIn(200);
}
});
$("#publisher_content_pickers .blog").click(function(){
if( $("#new_blog").css("display") == "none" ) {
$("#publisher_content_pickers").children("a").children("li").removeClass("selected");
$("#publisher_content_pickers").children("li").removeClass("selected");
$("#publisher_form form").fadeOut(50);
$(this).children("li").toggleClass("selected");
$(this).toggleClass("selected");
$("#new_blog").delay(50).fadeIn(200);
}
});
......
......@@ -229,3 +229,6 @@ label {
position: absolute;
top: 3px;
left: 0.48em; }
ul.nav li > a {
display: block; }
......@@ -271,3 +271,6 @@ label
:position absolute
:top 3px
:left 0.48em
ul.nav li > a
:display block
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment