From 2990c9e8fe3a06750829424da96b3e7187e7885e Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Sun, 11 Feb 2018 13:44:45 +0100 Subject: [PATCH] Theme now defaults to Cloth to avoid duplicate code --- lib/common.js | 6 +- views/checkout.hbs | 5 -- views/index.hbs | 117 ----------------------------------- views/page.hbs | 64 ------------------- views/pay.hbs | 65 -------------------- views/payment_complete.hbs | 21 ------- views/product.hbs | 122 ------------------------------------- 7 files changed, 4 insertions(+), 396 deletions(-) delete mode 100644 views/checkout.hbs delete mode 100644 views/index.hbs delete mode 100644 views/page.hbs delete mode 100644 views/pay.hbs delete mode 100644 views/payment_complete.hbs delete mode 100644 views/product.hbs diff --git a/lib/common.js b/lib/common.js index 8f896b2..42cf8c5 100644 --- a/lib/common.js +++ b/lib/common.js @@ -202,10 +202,12 @@ exports.getConfig = () => { // setup theme config.themeViews = ''; - if(typeof config.theme !== 'undefined' && config.theme !== ''){ - config.themeViews = '../public/themes/' + config.theme + '/'; + if(typeof config.theme === 'undefined' || config.theme === ''){ + config.theme = 'Cloth'; // Default to Cloth theme } + config.themeViews = '../public/themes/' + config.theme + '/'; + // if db set to mongodb override connection with MONGODB_CONNECTION_STRING env var config.databaseConnectionString = process.env.MONGODB_CONNECTION_STRING || config.databaseConnectionString; diff --git a/views/checkout.hbs b/views/checkout.hbs deleted file mode 100644 index 614b069..0000000 --- a/views/checkout.hbs +++ /dev/null @@ -1,5 +0,0 @@ -
-
- {{> cart}} -
-
\ No newline at end of file diff --git a/views/index.hbs b/views/index.hbs deleted file mode 100644 index bd81ff9..0000000 --- a/views/index.hbs +++ /dev/null @@ -1,117 +0,0 @@ -
-
-
- {{#ifCond config.menuEnabled '==' 'true'}} - {{#ifCond config.menuLocation '==' "side"}} -