From EJS to Jade
This commit is contained in:
@@ -1,10 +1,7 @@
|
||||
var pejs = require('pejs');
|
||||
views = pejs();
|
||||
|
||||
module.exports.index = function(req, res) {
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
|
||||
views.render('bouncing', res.locals, function(err, result) {
|
||||
res.render('index.jade', res.locals, function(err, result) {
|
||||
console.log(err);
|
||||
res.send(result);
|
||||
});
|
||||
|
||||
13
controllers/bouncing/views/index.jade
Normal file
13
controllers/bouncing/views/index.jade
Normal file
@@ -0,0 +1,13 @@
|
||||
extends ../../../views/withjs
|
||||
block title
|
||||
title #{title} - Bouncing cube
|
||||
|
||||
block extrajs
|
||||
script(src="/static/js/bouncing/BouncingMain.js")
|
||||
|
||||
block content
|
||||
h2 Bouncing cube
|
||||
|
||||
p Click on the cube to make it jump !
|
||||
|
||||
#container
|
||||
Reference in New Issue
Block a user