diff --git a/admin/admin.js b/admin/admin.js index 4a95c8b..4bf6292 100644 --- a/admin/admin.js +++ b/admin/admin.js @@ -27,22 +27,18 @@ module.exports= */ main: function(request, clientAddress, templateContext, filename) { - console.log("admin main called"); return new Promise(function(resolve, reject) { //if logged in if(request.session && request.session.user) { - console.log(filename); templateContext.loggedIn = true; utils.getPostData(request).then(function (postData) { - console.log("temp 1"); var page = "./adminHome.js"; if(filename.includes('/downloads')) { page = "./adminDownloads.js"; - console.log("downloads time") } else if(filename.includes("/posts")) { diff --git a/admin/login/login.js b/admin/login/login.js index 663a3c2..220f369 100644 --- a/admin/login/login.js +++ b/admin/login/login.js @@ -23,7 +23,7 @@ const processLogin = function(request, clientAddress, templateContext) { if(DEBUG) { - //what actually logs in the user + //logs in as first user in DB request.session.user = 1; console.log("user has logged in"); templateContext.goodLoginAttempt = true; diff --git a/includes/css/bootstrap.css b/includes/css/bootstrap.css index e871786..af31572 100644 --- a/includes/css/bootstrap.css +++ b/includes/css/bootstrap.css @@ -9706,5 +9706,5 @@ footer .footer-col footer .footer-below { padding: 25px 0; - background-color: #2C3E50; + background-color: #1a252f; } diff --git a/sites/admin.js b/sites/admin.js index 2abc64a..5d1f777 100644 --- a/sites/admin.js +++ b/sites/admin.js @@ -40,12 +40,13 @@ module.exports= const file = "../admin/admin.js"; var templateContext = Object(); - Promise.all([includes.printAdminHeader(templateContext), + Promise.all([includes.fetchTemplate("admin/adminMain.html")], + includes.printAdminHeader(templateContext), require(file).main(request, clientAddress, templateContext, filename), - includes.printFooter(templateContext), - includes.fetchTemplate("admin/adminMain.html")]).then(function(content) + includes.printFooter(templateContext) + ).then(function(content) { - result.write(whiskers.render(content.join(''), templateContext)); + result.write(whiskers.render(content[0], templateContext)); result.end(); }).catch(function(err)