mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: closes #11671, allow custom classes on body
res.render('myplugin', { bodyClasses: ['myplugin', 'special']});
This commit is contained in:
@@ -59,6 +59,10 @@ helpers.buildBodyClass = function (req, res, templateData = {}) {
|
||||
});
|
||||
}
|
||||
|
||||
if (templateData && templateData.bodyClasses) {
|
||||
parts.push(...templateData.bodyClasses);
|
||||
}
|
||||
|
||||
parts.push(`page-status-${res.statusCode}`);
|
||||
|
||||
parts.push(`theme-${meta.config['theme:id'].split('-')[2]}`);
|
||||
|
||||
Reference in New Issue
Block a user