Skip to content

Node.js based forum software built for the modern web

update buildCategoryLabel

Barış Soner Uşaklı28ed6c923c88
diff --git a/public/src/modules/helpers.common.js b/public/src/modules/helpers.common.js
index 8945850228..10571404a1 100644
--- a/public/src/modules/helpers.common.js
+++ b/public/src/modules/helpers.common.js
@@ -98,8 +98,8 @@ module.exports = function (utils, Benchpress, relative_path) {
return '';
}
- return `<span class="badge px-1 ${className}" style="${generateCategoryBackground(category)}">
- ${category.icon ? `<i class="fa fa-fw ${category.icon}"></i>` : ''}
+ return `<span class="badge px-1 ${className}" style="color: ${category.color};background-color: ${category.bgColor};border-color: ${category.bgColor};">
+ ${category.icon && category.icon !== 'fa-nbb-none' ? `<i class="fa fa-fw ${category.icon}"></i>` : ''}
${category.name}
</span>`;
}