Changed jade templating engine to pug
This commit is contained in:
parent
173dc8c694
commit
7ce61a6c27
|
@ -14,10 +14,10 @@
|
||||||
"express": "^4.12.4",
|
"express": "^4.12.4",
|
||||||
"express-less": "0.0.7",
|
"express-less": "0.0.7",
|
||||||
"iconv-lite": "^0.4.11",
|
"iconv-lite": "^0.4.11",
|
||||||
"jade": "^1.11.0",
|
|
||||||
"mongodb": "^1.4.38",
|
"mongodb": "^1.4.38",
|
||||||
"mongoskin": "^1.4.13",
|
"mongoskin": "^1.4.13",
|
||||||
"nedb": "^1.1.3",
|
"nedb": "^1.1.3",
|
||||||
|
"pug": "^2.0.0-beta3",
|
||||||
"socks5-http-client": "^1.0.1",
|
"socks5-http-client": "^1.0.1",
|
||||||
"socks5-https-client": "^1.1.1"
|
"socks5-https-client": "^1.1.1"
|
||||||
}
|
}
|
||||||
|
|
16
web.js
16
web.js
|
@ -27,9 +27,9 @@ var time = require('./time');
|
||||||
var app = express();
|
var app = express();
|
||||||
|
|
||||||
//Set up jade rendering engine.
|
//Set up jade rendering engine.
|
||||||
app.set('view engine', 'jade');
|
app.set('view engine', 'pug');
|
||||||
config().env == 'dev' ? app.disable('view cache') : null; //If the environment is set on 'dev' then view cache should be disabled.
|
config().env == 'dev' ? app.disable('view cache') : null; //If the environment is set on 'dev' then view cache should be disabled.
|
||||||
app.set('views', __dirname + '/resources/jade');
|
app.set('views', __dirname + '/resources/pug');
|
||||||
|
|
||||||
//Give the app some configuration information
|
//Give the app some configuration information
|
||||||
app.locals.linkbar = config().linkbar;
|
app.locals.linkbar = config().linkbar;
|
||||||
|
@ -53,21 +53,15 @@ app.post('/', redirecter);
|
||||||
//Initialising behavior for searching.
|
//Initialising behavior for searching.
|
||||||
app.param('search', lookup.get);
|
app.param('search', lookup.get);
|
||||||
|
|
||||||
app.get('/rooster/:search', [auth.is, schedule.get, function (req, res) {
|
app.get('/rooster/:search', [auth.is, schedule.get, (req, res) => res.render('schedule', req)]);
|
||||||
res.render('schedule', req);
|
|
||||||
}]);
|
|
||||||
|
|
||||||
//Initialising behavior for searching through lists.
|
//Initialising behavior for searching through lists.
|
||||||
app.param('list', lookup.list);
|
app.param('list', lookup.list);
|
||||||
|
|
||||||
app.get('/klassenlijst/:list',[auth.is, function (req, res) {
|
app.get('/klassenlijst/:list',[auth.is, (req, res) => res.render('list', req)]);
|
||||||
res.render('list', req);
|
|
||||||
}]);
|
|
||||||
|
|
||||||
//Initialising login page frontend.
|
//Initialising login page frontend.
|
||||||
app.get('/login', function (req, res) {
|
app.get('/login', (req, res) => res.render('login', req));
|
||||||
res.render('login', req);
|
|
||||||
});
|
|
||||||
|
|
||||||
//Initialising login/logout behavior.
|
//Initialising login/logout behavior.
|
||||||
app.post('/login', auth.login);
|
app.post('/login', auth.login);
|
||||||
|
|
Loading…
Reference in a new issue