.span-9 %img{:height => "64", :src => "/images/logo.png", :style => "float:left"}/ %p.body{:style => "padding-top:20px;padding-left:80px"} Hackety Hack .span-4.prepend-5.last - if logged_in? %ul %li{:style => "display:inline"} %a{:href => "/hackers/#{current_user.username.to_slug}"} My Page | %li{:style => "display:inline"} %a{:href => "/logout"} Log out - else %a{:href => "/login"} Log in .span-18 %ul#input_list %li{:style => "display:inline"} %a#question_button.button{:href => "#"} Ask a question %li{:style => "display:inline"} %a#link_button.button{:href => "#"} Share a link %li{:style => "display:inline"} %a#post_button.button{:href => "#"} Tell everyone something %form#link_form{:action => "/content", :style => "display:none", :method => "POST"} %label{:for => "link"} Share a link %a.cancel{:href => "#"} x %br/ %input#link{ :name => "content[body]", :size => "76", :type => "textbox"}/ %input{ :name => "content[type]", :type => "hidden", :value => "link"}/ %br/ %input.button{:type => "submit"} %form#post_form{:action => "/content", :style => "display:none", :method => "POST"} %label{:for => "post"} Tell everyone something %a.cancel{:href => "#"} x %br/ %textarea#post{ :name => "content[body]" } %input{ :name => "content[type]", :type => "hidden", :value => "post"}/ %br/ %input.button{:type => "submit"} %form#question_form{:action => "/content", :style => "display:none", :method => "POST"} %label{:for => "question"} Ask a question %a.cancel{:href => "#"} x %br/ %textarea#question{:name => "content[body]"} %input{ :name => "content[type]", :type => "hidden", :value => "question"}/ %br/ %input.button{:type => "submit"} .span-18 %h2 Here's what everyone else is up to! %ul{:style => "list-style:none"} - @content_list.each do |content| %li{:style => "height:70px"} %img{:height => "64", :src => content.image, :style => "float:left"}/ %p{:class => "vertical-center-text"} %a{:href => "/hackers/#{content.author}"}= content.author shared a %a{:href => "/content/#{content.id}"}= content.type - content_for :head do :javascript $(function() { $( ".button").button(); $("#question_button").click(function() { $('form').each(function(idx, elem) { if($(elem).is(':visible')) { $(elem).hide("blind"); } }); $("#question_form").show("blind"); }); $("#post_button").click(function() { $('form').each(function(idx, elem) { if($(elem).is(':visible')) { $(elem).hide("blind"); } }); $("#post_form").show("blind"); }); $("#link_button").click(function() { $('form').each(function(idx, elem) { if($(elem).is(':visible')) { $(elem).hide("blind"); } }); $("#link_form").show("blind"); }); $("a.cancel").click(function() { //$("#input_list").show("blind"); $('form').each(function(idx, elem) { if($(elem).is(':visible')) { $(elem).hide("blind"); } }); }); });