<commit_before>!!!
%html
  %head
    %title
      = yield(: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.1/jquery.min.js"
    = javascript_include_tag 'jquery142', 'rails', 'view'
    = javascript_include_tag 'tiny_mce/tiny_mce.js'

    
    - 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("<p>" +  str); };

          ws = new WebSocket("ws://#{request.host}:8080/");
          ws.onmessage = function(evt) { 
            var obj = jQuery.parseJSON(evt.data);
             if((location.href.indexOf(obj['class']) != -1 ) || (location.pathname == '/')) {
                $("#stream").prepend($(obj['html']).fadeIn("fast")); 
             };
          }
          ws.onclose = function() { debug("socket closed"); };
          ws.onopen = function() {
          debug("connected...");
          };
          });
  %body
  
    - flash.each do |name, msg|
      = content_tag :div, msg, :id => "flash_#{name}"
    
    %header
      %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
          
    #header_below
      
      - if user_signed_in?
        %h1#user_name
          = link_to User.first.real_name, root_url
          %span.description
            = my_latest_message

        %nav
          %ul.nav
            %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


    #content
      #main
        = yield
        = render "posts/debug"
      #friends_list
        = render 'friends/sidebar'<commit_msg>RS IZ No Friends list before signin<commit_after>!!!
%html
  %head
    %title
      = yield(: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.1/jquery.min.js"
    = javascript_include_tag 'jquery142', 'rails', 'view'
    = javascript_include_tag 'tiny_mce/tiny_mce.js'

    
    - 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("<p>" +  str); };

          ws = new WebSocket("ws://#{request.host}:8080/");
          ws.onmessage = function(evt) { 
            var obj = jQuery.parseJSON(evt.data);
             if((location.href.indexOf(obj['class']) != -1 ) || (location.pathname == '/')) {
                $("#stream").prepend($(obj['html']).fadeIn("fast")); 
             };
          }
          ws.onclose = function() { debug("socket closed"); };
          ws.onopen = function() {
          debug("connected...");
          };
          });
  %body
  
    - flash.each do |name, msg|
      = content_tag :div, msg, :id => "flash_#{name}"
    
    %header
      %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
          
    #header_below
      
      - if user_signed_in?
        %h1#user_name
          = link_to User.first.real_name, root_url
          %span.description
            = my_latest_message

        %nav
          %ul.nav
            %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


    #content
      #main
        = yield
        = render "posts/debug"
      - if user_signed_in?
        #friends_list
        = render 'friends/sidebar'
{'fraction_non_alphanumeric': 0.14914897350412354, 'fraction_numerical': 0.0049131426566064226, 'mean_word_length': 1.9548989113530326, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '917446', 'n_tokens_mistral': 1833, 'n_tokens_neox': 1762, 'n_words': 329}