diaspora/app/views/layouts/application.html.haml
2010-06-22 16:23:15 -07:00

97 lines
3 KiB
Text

!!!
%html
%head
%title
= yield(:title) || "Untitled"
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
= stylesheet_link_tag "blueprint/screen", :media => 'screen'
= stylesheet_link_tag "application"
= javascript_include_tag 'jquery142'
/= javascript_include_tag"http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"
= javascript_include_tag 'rails'
= javascript_include_tag 'jquery_form'
- unless request.user_agent.include? "Safari" ||"Chrome"
= javascript_include_tag 'FABridge'
= javascript_include_tag 'swfobject'
= javascript_include_tag 'web_socket'
:javascript
WebSocket.__swfLocation = "/javascripts/WebSocketMain.swf";
= javascript_include_tag 'socket' if user_signed_in?
= csrf_meta_tag
= yield(:head)
:javascript
$(document).ready(function(){
$('a').hover(function(){
$(this).fadeTo(60, 0.5);
}, function(){
$(this).fadeTo(80, 1);
});
$('ul.nav li').hover(function(){
$(this).fadeTo(60, 0.5);
}, function(){
$(this).fadeTo(80, 1);
});
// wait for the DOM to be loaded
// bind 'myForm' and provide a simple callback function
$('#new_status_message').ajaxForm(function() {
alert("Thank you for your comment!");
});
$('#new_bookmark').ajaxForm(function() {
alert("Thank you for your comment!");
});
$('#new_blog').ajaxForm(function() {
alert("Thank you for your comment!");
});
});
%body
%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
- if StatusMessage.my_newest
= StatusMessage.my_newest.message
%nav
%ul.nav
%a{ :href => root_path, :title => "Your network stream."}
%li home
%a{ :href => users_path, :title => "Registered users on your seed."}
%li users
%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
- flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}"
#content
= yield
#debug
.msg