diff --git a/modules/web.js b/modules/web.js index 2f7c1f0..b188487 100644 --- a/modules/web.js +++ b/modules/web.js @@ -18,23 +18,23 @@ var webInterface = function(dbot) { // Lists the quote categories app.get('/quotes', function(req, res) { - res.render('quotelist', { 'quotelist': Object.keys(dbot.db.quoteArrs) }); + res.render('quotelist', { 'name': dbot.name, 'quotelist': Object.keys(dbot.db.quoteArrs) }); }); // Lists quotes in a category app.get('/quotes/:key', function(req, res) { var key = req.params.key.toLowerCase(); if(dbot.db.quoteArrs.hasOwnProperty(key)) { - res.render('quotes', { 'quotes': dbot.db.quoteArrs[key], locals: { 'url_regex': RegExp.prototype.url_regex() } }); + res.render('quotes', { 'name': dbot.name, 'quotes': dbot.db.quoteArrs[key], locals: { 'url_regex': RegExp.prototype.url_regex() } }); } else { - res.render('error', { 'message': 'No quotes under that key.' }); + res.render('error', { 'name': dbot.name, 'message': 'No quotes under that key.' }); } }); // Load random quote category page app.get('/rq', function(req, res) { var rCategory = Object.keys(dbot.db.quoteArrs).random(); - res.render('quotes', { 'quotes': dbot.db.quoteArrs[rCategory], locals: { 'url_regex': RegExp.prototype.url_regex() } }); + res.render('quotes', { 'name': dbot.name, 'quotes': dbot.db.quoteArrs[rCategory], locals: { 'url_regex': RegExp.prototype.url_regex() } }); }); app.listen(443); diff --git a/views/layout.jade b/views/layout.jade index fe4fd48..9fd0226 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -3,7 +3,7 @@ html(lang='en') head meta(charset='utf-8') link(rel='stylesheet', type='text/css', href='/styles.css') - title Depressionbot web interface + title #{name} web interface body div#page div#title