diff --git a/app/views/dashboard/index.html.haml b/app/views/dashboard/index.html.haml index ad9bc6eef..8606f533b 100644 --- a/app/views/dashboard/index.html.haml +++ b/app/views/dashboard/index.html.haml @@ -1,7 +1,7 @@ += render "shared/publisher" %h1 your network stream -= render "status_messages/new_status_message" %ul#stream - for post in @posts = render type_partial(post), :post => post #pagination - = will_paginate @posts \ No newline at end of file + = will_paginate @posts diff --git a/app/views/friends/show.html.haml b/app/views/friends/show.html.haml index 88159f685..444788360 100644 --- a/app/views/friends/show.html.haml +++ b/app/views/friends/show.html.haml @@ -1,5 +1,3 @@ - - .span-15 .span-4.append-1.last %img{:src => "/images/user_picture.jpg", :id => "profile_picture"} diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index be9535559..58c87be19 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -68,7 +68,8 @@ .container #content.span-24.last - .span-3.append-1.last + .span-4.append-1.last + %img{:src => "/images/user_picture.jpg", :id => "user_picture"} %ul#stream_filters %a{ :href => root_path, :title => "Your network stream."} %li home @@ -80,7 +81,7 @@ %li blogs %a{ :href => friends_path, :title => "Your list of connections with other seeds."} %li friends - .span-15.append-1.last + .span-14.append-1.last = yield = render "posts/debug" .span-3.last diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml new file mode 100644 index 000000000..d13173f76 --- /dev/null +++ b/app/views/shared/_publisher.haml @@ -0,0 +1,81 @@ +:css + #publisher{ + height: 300px; + background-color: #eaeaea; + border: 1px solid #666; + padding: 1em; + } + + #new_bookmark { + display: none; + } + #new_blog { + display: none; + } + + ul#publisher_content_pickers { + margin: 0; + padding: 0; + } + + ul#publisher_content_pickers li { + display: inline; + margin-right: 2em; + } + +:javascript + $(document).ready( function() { + + $("#publisher_content_pickers li .status_message").click(function(){ + if( $("#new_status_message").css("display") == "none" ) { + $("#publisher_form form").fadeOut(50); + $("#new_status_message").delay(50).fadeIn(200); + } + }); + + $("#publisher_content_pickers li .bookmark").click(function(){ + if( $("#new_bookmark").css("display") == "none" ) { + $("#publisher_form form").fadeOut(50); + $("#new_bookmark").delay(50).fadeIn(200); + } + }); + + $("#publisher_content_pickers li .blog").click(function(){ + if( $("#new_blog").css("display") == "none" ) { + $("#publisher_form form").fadeOut(50); + $("#new_blog").delay(50).fadeIn(200); + } + }); + + }); + +#publisher + %ul#publisher_content_pickers + %a{ :class => "status_message", :href => '#', :title => "new status message."} + %li status message + %a{ :class => "bookmark", :href => '#', :title => "new bookmark."} + %li bookmark + %a{ :class => "blog", :href => '#', :title => "new blog post."} + %li blog + + #publisher_form + = form_for StatusMessage.new, :remote => true do |f| + = f.error_messages + %p + = f.text_field :message, :value => "Message" + = f.submit :class => 'button' + + + = form_for Bookmark.new, :remote => true do |f| + = f.error_messages + %p + = f.text_field :title, :value => "Title" + = f.text_field :link, :value => "URL" + = f.submit + + = form_for Blog.new, :remote => true do |f| + = f.error_messages + %p + = f.text_field :title, :value => "Title" + = f.text_area :body + = f.submit diff --git a/app/views/status_messages/index.erb.js b/app/views/status_messages/index.erb.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 869e9c240..857458a07 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -204,6 +204,9 @@ ul.comment_set { img#profile_picture { width: 100%; } +img#user_picture { + width: 100%; } + .pagination a { padding: 3px; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index 16a007923..9f2a94f54 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -239,6 +239,9 @@ ul.comment_set img#profile_picture :width 100% + +img#user_picture + :width 100% .pagination a