diaspora/app/views/layouts/application.html.haml
2010-11-30 13:01:53 -08:00

114 lines
4.1 KiB
Text

-# Copyright (c) 2010, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
!!!
%html{:lang => I18n.locale.to_s}
%head
%meta{:charset => 'utf-8'}
%title
- if current_user
= "#{current_user.name} | DIASPORA*"
- else
DIASPORA*
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
%link{:rel => 'shortcut icon', :href => '/favicon.ico'}
%link{:rel => 'apple-touch-icon', :href => '/apple-touch-icon.png'}
/ Social Media Icons are by Paul Robert Lloyd @ http://paulrobertlloyd.com/2009/06/social_media_icons
= stylesheet_link_tag "blueprint/screen", :media => 'screen'
= stylesheet_link_tag "blueprint/print", :media => 'print'
= include_stylesheets :default, :media => 'all'
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
:javascript
!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/vendor/jquery144.min.js"%3E%3C/script%3E'))
- unless @landing_page
= include_javascripts :main
- if current_user
= include_javascripts :flash_socket unless modern_browser?
= javascript_include_tag 'web-socket-receiver'
= render 'js/websocket_js'
= csrf_meta_tag
= yield(:head)
= csrf_meta_tag
-if APP_CONFIG[:google_a_site]
:javascript
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '#{APP_CONFIG[:google_a_site]}']);
_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);
})();
-if APP_CONFIG[:piwik_id]
:javascript
var pkBaseURL = (("https:" == document.location.protocol) ? "https://#{APP_CONFIG[:piwik_url]}/" : "http://#{APP_CONFIG[:piwik_url]}/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", #{APP_CONFIG[:piwik_id]});
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
- if current_user
%link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.name}"}
%body
-unless @landing_page
#notification
- flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}"
%header{:class=>('landing' unless current_user)}
= render 'layouts/header'
.container
.span-24.last
= yield
.clearfix
%footer
.container
.brandon= t('.powered_by')
%ul#footer_nav
%li= link_to '@joindiaspora', "http://twitter.com/joindiaspora"
%li= link_to 'github', "https://github.com/diaspora/diaspora"
%li= link_to t('layouts.header.blog'), "http://blog.joindiaspora.com"
%li= link_to t('layouts.header.code'), "#{root_url}source.tar.gz"
-unless @landing_page
: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);