Node.js based forum software built for the modern web
helpers.generateCategoryBackground
psychobunny82ac542f5583
diff --git a/public/src/modules/helpers.js b/public/src/modules/helpers.jsindex 9f643d8736..e09534b55d 100644--- a/public/src/modules/helpers.js+++ b/public/src/modules/helpers.js@@ -43,6 +43,24 @@return JSON.stringify(obj).replace(/&/gm,"&").replace(/</gm,"<").replace(/>/gm,">").replace(/"/g, '"');};+ helpers.generateCategoryBackground = function(category) {+ var style = [];++ if (category.backgroundImage) {+ style.push('background-image: url(' + category.backgroundImage + ')');+ }++ if (category.bgColor) {+ style.push('background-color: ' + category.bgColor + ';');+ }++ if (category.color) {+ style.push('color: ' + category.color + ';');+ }++ return style.join(' ');+ };+// Groups helpershelpers.membershipBtn = function(groupObj) {if (groupObj.isMember) {