From 59b5dd8954d06b7c9cea17a766b57c49f28d013c Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Tue, 13 Feb 2018 21:21:45 +0100 Subject: [PATCH] More theme refactor --- app.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 1ea9c7a..2588a4a 100644 --- a/app.js +++ b/app.js @@ -78,19 +78,22 @@ handlebars = handlebars.create({ helpers: { perRowClass: function(numProducts){ if(parseInt(numProducts) === 1){ - return'col-md-12 col-xl-12 product-item'; + return'col-md-12 col-xl-12 col m12 xl12 product-item'; } if(parseInt(numProducts) === 2){ - return'col-md-6 col-xl-6 product-item'; + return'col-md-6 col-xl-6 col m6 xl6 product-item'; } if(parseInt(numProducts) === 3){ - return'col-md-4 col-xl-4 product-item'; + return'col-md-4 col-xl-4 col m4 xl4 product-item'; } if(parseInt(numProducts) === 4){ - return'col-md-3 col-xl-3 product-item'; + return'col-md-3 col-xl-3 col m3 xl3 product-item'; } - return'col-md-6 col-xl-6 product-item'; + return'col-md-6 col-xl-6 col m6 xl6 product-item'; + }, + getTheme: function(view){ + return`themes/${config.theme}/${view}`; }, formatAmount: function(amt){ if(amt){