templates/application_layout.rb in prologue-0.4.0 vs templates/application_layout.rb in prologue-0.5.0
- old
+ new
@@ -29,44 +29,90 @@
end
create_file 'app/views/shared/_end_scripts.html.haml' do
<<-FILE
= include_javascripts :common
+= yield(:end_scripts)
+- if Rails.env == 'production'
+ :javascript
+ var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
+ (function(d, t) {
+ var g = d.createElement(t),
+ s = d.getElementsByTagName(t)[0];
+ g.async = true;
+ g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ s.parentNode.insertBefore(g, s);
+ })(document, 'script');
FILE
end
run 'rm app/views/layouts/application.html.erb'
create_file 'app/views/layouts/application.html.haml' do
<<-FILE
!!! 5
-%html
+-# paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
+<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
+<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
+<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
+<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
+<!--[if (gte IE 9)|!(IE)]><!-->
+%html.no-js{ :lang => "en" }
+ <!--<![endif]-->
%head
%meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
%meta{'http-equiv' => 'X-UA-Compatible', :content => 'IE=edge,chrome=1'}
- %title
+ %title<
#{app_name.humanize}
= yield(:title)
%meta{:name => 'description', :content => ''}
%meta{:name => 'author', :content => ''}
%meta{:name => 'viewport', :content => 'width=device-width initial-scale=1.0 maximum-scale=1.0'}
%meta{:name => 'apple-mobile-web-app-capable', :content => 'yes'}
= csrf_meta_tag
- %link{:rel => "shortcut icon", :href => "/images/favicon.ico", :type => "image/x-icon"}
+ %link{:rel => "shortcut icon", :href => "/favicon.ico", :type => "image/x-icon"}
%link{:rel => "apple-touch-icon", :href => "/images/ati.png"}
/[if lt IE 9]
%script{:type => "text/javascript", :src => "/javascripts/shiv.js"}
= include_stylesheets :main, :media => 'all'
= yield(:head)
- /[if IE 7]
- = stylesheet_link_tag 'ie7', :media => 'all'
- /[if IE 8]
- = stylesheet_link_tag 'ie8', :media => 'all'
%body
#container
= render :partial => "shared/header"
%section#content
= yield
- #pusher
= render :partial => "shared/footer"
= render :partial => "shared/end_scripts"
+FILE
+end
+
+create_file 'public/maintenance.html' do
+<<-FILE
+<!DOCTYPE html>
+<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
+<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
+<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
+<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
+<!--[if (gte IE 9)|!(IE)]><!-->
+<html class='no-js' lang='en'>
+ <!--<![endif]-->
+ <head>
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
+ <meta content='IE=edge,chrome=1' http-equiv='X-UA-Compatible'>
+ <title>#{app_name.humanize} is down for maintenance</title>
+ <meta content='width=device-width initial-scale=1.0 maximum-scale=1.0' name='viewport'>
+ <link href='/favicon.ico' rel='shortcut icon' type='image/x-icon'>
+ <!--[if lt IE 9]>
+ <script src='/javascripts/shiv.js' type='text/javascript'></script>
+ <![endif]-->
+ <link href="/stylesheets/reset.css" media="all" rel="stylesheet" type="text/css" />
+ <link href="/stylesheets/main.css" media="all" rel="stylesheet" type="text/css" />
+ </head>
+ <body>
+ <div id='container'>
+ <section id='content'>
+ <h1>#{app_name.humanize} is down for maintenance</h1>
+ </section>
+ </div>
+ </body>
+</html>
FILE
end