mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: push the theme name into body class
This commit is contained in:
@@ -4,6 +4,8 @@ const winston = require('winston');
|
|||||||
const validator = require('validator');
|
const validator = require('validator');
|
||||||
const slugify = require('../slugify');
|
const slugify = require('../slugify');
|
||||||
|
|
||||||
|
const meta = require('../meta');
|
||||||
|
|
||||||
const helpers = module.exports;
|
const helpers = module.exports;
|
||||||
|
|
||||||
helpers.try = function (middleware) {
|
helpers.try = function (middleware) {
|
||||||
@@ -54,6 +56,8 @@ helpers.buildBodyClass = function (req, res, templateData = {}) {
|
|||||||
|
|
||||||
parts.push(`page-status-${res.statusCode}`);
|
parts.push(`page-status-${res.statusCode}`);
|
||||||
|
|
||||||
|
parts.push(`theme-${meta.config['theme:id'].split('-')[2]}`);
|
||||||
|
|
||||||
if (req.loggedIn) {
|
if (req.loggedIn) {
|
||||||
parts.push('user-loggedin');
|
parts.push('user-loggedin');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user