From 6d13e4ee07a98c896e343e906df59bfbe92745dd Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Thu, 15 Sep 2011 12:50:40 +0100 Subject: [PATCH] quote list --- modules/web.js | 4 ++++ views/quotelist.jade | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 views/quotelist.jade diff --git a/modules/web.js b/modules/web.js index 5af942f..f05cbd5 100644 --- a/modules/web.js +++ b/modules/web.js @@ -23,6 +23,10 @@ var webInterface = function(dbot) { } }); + app.get('/quotes/', function(req, res) { + res.render('quotelist', { 'quotes': Object.keys(dbot.db.quoteArrs); }); + }); + app.listen(1337); return { diff --git a/views/quotelist.jade b/views/quotelist.jade new file mode 100644 index 0000000..19be852 --- /dev/null +++ b/views/quotelist.jade @@ -0,0 +1,3 @@ +ul#quotes + -each quote in quotes + li a(href='http://identi.ca/#{quote}') #{quote}