!!! %html %head %title = "diaspora" %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ %meta{"http-equiv"=> "X-UA-Compatible", :content =>"chrome=1" } = stylesheet_link_tag "blueprint/screen", :media => 'screen' = stylesheet_link_tag "application" /= javascript_include_tag"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" = javascript_include_tag 'jquery142', 'rails', 'view' = javascript_include_tag 'tiny_mce/tiny_mce.js' :javascript var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-17207587-1']); _gaq.push(['_setDomainName', '#{root_url}']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - unless request.user_agent.include? "Safari" ||"Chrome" = javascript_include_tag 'FABridge', 'swfobject', 'web_socket' :javascript WebSocket.__swfLocation = "/javascripts/WebSocketMain.swf"; = csrf_meta_tag = yield(:head) - if user_signed_in? :javascript $(document).ready(function(){ function debug(str){ $("#debug").append("
" + str); }; ws = new WebSocket("ws://#{request.host}:8080/"); ws.onmessage = function(evt) { var obj = jQuery.parseJSON(evt.data); debug("got a " + obj['class']); if((location.href.indexOf(obj['class']) != -1 ) || (location.pathname == '/')) { $("#stream").prepend($(obj['html']).fadeIn("fast")); }; }; ws.onclose = function() { debug("socket closed"); }; ws.onopen = function() { ws.send(location.pathname); debug("connected..."); }; $("#stream li").hover(function() { $(this).children(".destroy_link").fadeIn(0); }, function() { $(this).children(".destroy_link").fadeOut(0); }); }); /= javascript_include_tag 'satisfaction' , 'satisfaction-display' :javascript var is_ssl = ("https:" == document.location.protocol); var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/"; document.write(unescape("%3Cscript src='" + asset_host + "javascripts/feedback-v2.js' type='text/javascript'%3E%3C/script%3E")); :javascript var feedback_widget_options = {}; feedback_widget_options.display = "overlay"; feedback_widget_options.company = "diaspora"; feedback_widget_options.placement = "right"; feedback_widget_options.color = "#222"; feedback_widget_options.style = "idea"; var feedback_widget = new GSFN.feedback_widget(feedback_widget_options); %body - flash.each do |name, msg| = content_tag :div, msg, :id => "flash_#{name}" %header .container %a#diaspora_text{:href => root_path} %img{:src => '/images/diaspora_white.png'} #session_action - if user_signed_in? =User.first.email | = link_to "logout", destroy_user_session_path - else = link_to "login", new_user_session_path .container - if user_signed_in? %h1#user_name = link_to User.first.real_name, root_url %span.description = my_latest_message #content.span-24.last .span-5.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 %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 %a{ :href => friends_path, :title => "Your list of connections with other seeds."} %li friends = render 'friends/sidebar' if user_signed_in? .span-18 = yield = render "posts/debug"