added login, fixed gitignore

This commit is contained in:
psychobunny
2013-04-22 19:01:45 +00:00
parent 2cf0a9045a
commit 3d81f129e3
8 changed files with 92 additions and 15 deletions

View File

@@ -7,17 +7,15 @@ var fs = require('fs');
function loadTemplates(templatesToLoad) {
for (var t in templatesToLoad) {
(function(template) {
console.log(global.configuration.ROOT_DIRECTORY);
fs.readFile(global.configuration.ROOT_DIRECTORY + '/public/templates/' + template + '.tpl', function(err, html) {
global.templates[template] = html;
console.log(html);
});
}(templatesToLoad[t]));
}
}
Templates.init = function() {
loadTemplates(['header', 'footer', 'register', 'home']);
loadTemplates(['header', 'footer', 'register', 'home', 'login']);
}
}(exports));