Take JS out of landing page
This commit is contained in:
parent
c35be73978
commit
ec6f42eaf0
2 changed files with 23 additions and 19 deletions
|
|
@ -8,6 +8,7 @@ class HomeController < ApplicationController
|
||||||
if current_user
|
if current_user
|
||||||
redirect_to aspects_path
|
redirect_to aspects_path
|
||||||
else
|
else
|
||||||
|
@landing_page = true
|
||||||
render :show
|
render :show
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,11 @@
|
||||||
|
|
||||||
|
|
||||||
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"
|
||||||
= javascript_include_tag "vendor/jquery144.min"
|
|
||||||
|
|
||||||
:javascript
|
: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
|
= include_javascripts :main
|
||||||
|
|
||||||
- if current_user
|
- 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}"}
|
%link{:rel => "alternate", :href => "#{current_user.public_url}", :type => "application/atom+xml", :title => "Public Diaspora Feed for #{current_user.real_name}"}
|
||||||
|
|
||||||
%body
|
%body
|
||||||
|
-unless @landing_page
|
||||||
#notification
|
#notification
|
||||||
|
|
||||||
- flash.each do |name, msg|
|
- flash.each do |name, msg|
|
||||||
|
|
@ -82,6 +84,7 @@
|
||||||
%li= link_to 'github', "https://github.com/diaspora/diaspora"
|
%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.blog'), "http://blog.joindiaspora.com"
|
||||||
|
|
||||||
|
-unless @landing_page
|
||||||
:javascript
|
:javascript
|
||||||
var is_ssl = ("https:" == document.location.protocol);
|
var is_ssl = ("https:" == document.location.protocol);
|
||||||
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
|
var asset_host = is_ssl ? "https://s3.amazonaws.com/getsatisfaction.com/" : "http://s3.amazonaws.com/getsatisfaction.com/";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue