Take JS out of landing page

This commit is contained in:
Raphael 2010-11-28 16:45:23 -08:00
parent c35be73978
commit ec6f42eaf0
2 changed files with 23 additions and 19 deletions

View file

@ -8,6 +8,7 @@ class HomeController < ApplicationController
if current_user
redirect_to aspects_path
else
@landing_page = true
render :show
end
end

View file

@ -28,10 +28,11 @@
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
= javascript_include_tag "vendor/jquery144.min"
:javascript
!window.jQuery && document.write(unescape('%3Cscript src="js/libs/jquery-1.4.4.js"%3E%3C/script%3E'))
!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
@ -60,6 +61,7 @@
%link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.real_name}"}
%body
-unless @landing_page
#notification
- flash.each do |name, msg|
@ -82,6 +84,7 @@
%li= link_to 'github', "https://github.com/diaspora/diaspora"
%li= link_to t('layouts.header.blog'), "http://blog.joindiaspora.com"
-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/";