Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #19 from MRHarrison/master

Jade inheritance wasn't working
  • Loading branch information...
commit 4d60e45f4ca0295efc88d77ebd7e69c97f8ae143 2 parents 34f1334 + 78f2943
@robrighter authored
View
1  templates/app/server.js
@@ -8,6 +8,7 @@ var connect = require('connect')
var server = express.createServer();
server.configure(function(){
server.set('views', __dirname + '/views');
+ server.set('view options', { layout: false });
server.use(connect.bodyParser());
server.use(express.cookieParser());
server.use(express.session({ secret: "shhhhhhhhh!"}));
View
9 templates/views/index.jade
@@ -1,3 +1,6 @@
-div
- a(id='sender')='Send a Message'
- ul(id='reciever')
+extends layout
+
+block content
+ div
+ a(id='sender')='Send a Message'
+ ul(id='reciever')
View
38 templates/views/layout.jade
@@ -17,19 +17,25 @@ html.no-js(lang='en')
meta(name="viewport", content='width=device-width, initial-scale=1')
link(rel='stylesheet', href='/css/style.css')
//-script(src='js/libs/modernizr-2.0.6.min.js')
- body!=body
- script(src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js')
- script
- window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\\/script>')
- //-script(defer, src='js/plugins.js')
- script(defer, src='/js/script.js')
- script(defer, src='/socket.io/socket.io.js')
- script
- var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];
- (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
- g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
- s.parentNode.insertBefore(g,s)}(document,'script'));
- //if lt IE 7
- script(defer, src='//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js')
- script(defer)
- window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
+ body
+ block header
+
+ block content
+
+ block footer
+ footer
+ script(src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js')
+ script
+ window.jQuery || document.write('<script src="js/libs/jquery-1.7.1.min.js"><\\/script>')
+ //-script(defer, src='js/plugins.js')
+ script(defer, src='/js/script.js')
+ script(defer, src='/socket.io/socket.io.js')
+ script
+ var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview'],['_trackPageLoadTime']];
+ (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1;
+ g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
+ s.parentNode.insertBefore(g,s)}(document,'script'));
+ //if lt IE 7
+ script(defer, src='//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js')
+ script(defer)
+ window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})
Please sign in to comment.
Something went wrong with that request. Please try again.