added post button, post window, added click handler to toaster alert, started on posts and topics schema and code

This commit is contained in:
psychobunny
2013-04-24 20:40:34 +00:00
parent dfd5c9960b
commit d711a4e334
10 changed files with 290 additions and 89 deletions

View File

@@ -7,35 +7,23 @@ var express = require('express'),
(function(app) {
var templates = global.templates;
function refreshTemplates() {
//need a better solution than copying this code on every call. is there an "onconnect" event?
if (DEVELOPMENT === true) {
// refreshing templates
modules.templates.init();
}
}
app.get('/', function(req, res) {
refreshTemplates();
res.send(templates['header'] + templates['home'] + templates['footer']);
});
app.get('/login', function(req, res) {
refreshTemplates();
res.send(templates['header'] + templates['login'] + templates['footer']);
});
app.get('/reset/:code', function(req, res) {
refreshTemplates();
res.send(templates['header'] + templates['reset_code'].parse({ reset_code: req.params.code }) + templates['footer']);
});
app.get('/reset', function(req, res) {
refreshTemplates();
res.send(templates['header'] + templates['reset'] + templates['footer']);
});
app.get('/register', function(req, res) {
refreshTemplates();
res.send(templates['header'] + templates['register'] + templates['footer']);
});