mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 08:20:36 +01:00
install script tweaks so vanilla is default
This commit is contained in:
@@ -158,6 +158,12 @@ var async = require('async'),
|
|||||||
}, {
|
}, {
|
||||||
field: 'maximumProfileImageSize',
|
field: 'maximumProfileImageSize',
|
||||||
value: 256
|
value: 256
|
||||||
|
}, {
|
||||||
|
field: 'theme:type',
|
||||||
|
value: 'local'
|
||||||
|
}, {
|
||||||
|
field: 'theme:id',
|
||||||
|
value: 'nodebb-theme-vanilla'
|
||||||
}];
|
}];
|
||||||
|
|
||||||
async.each(defaults, function (configObj, next) {
|
async.each(defaults, function (configObj, next) {
|
||||||
|
|||||||
@@ -144,8 +144,9 @@ var express = require('express'),
|
|||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
RDB.hmget('config', 'theme:type', 'theme:id', function(err, themeData) {
|
RDB.hmget('config', 'theme:type', 'theme:id', function(err, themeData) {
|
||||||
|
var themeId = (themeData[1] || 'nodebb-theme-vanilla');
|
||||||
|
|
||||||
if (!themeData[0] || themeData[0] === 'local') {
|
if (!themeData[0] || themeData[0] === 'local') {
|
||||||
var themeId = (themeData[1] || 'nodebb-theme-vanilla');
|
|
||||||
if (process.env.NODE_ENV === 'development') winston.info('[themes] Using theme ' + themeId);
|
if (process.env.NODE_ENV === 'development') winston.info('[themes] Using theme ' + themeId);
|
||||||
|
|
||||||
app.use(require('less-middleware')({
|
app.use(require('less-middleware')({
|
||||||
@@ -155,6 +156,18 @@ var express = require('express'),
|
|||||||
yuicompress: true
|
yuicompress: true
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
next();
|
||||||
|
} else {
|
||||||
|
// If not using a local theme (bootswatch, etc), drop back to vanilla
|
||||||
|
if (process.env.NODE_ENV === 'development') winston.info('[themes] Using theme ' + themeId);
|
||||||
|
|
||||||
|
app.use(require('less-middleware')({
|
||||||
|
src: path.join(__dirname, '../node_modules/nodebb-theme-vanilla'),
|
||||||
|
dest: path.join(__dirname, '../public/css'),
|
||||||
|
prefix: nconf.get('relative_path') + '/css',
|
||||||
|
yuicompress: true
|
||||||
|
}));
|
||||||
|
|
||||||
next();
|
next();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user