diff --git a/public/src/client/account/settings.js b/public/src/client/account/settings.js index 434072a0b0..23afc2f5c0 100644 --- a/public/src/client/account/settings.js +++ b/public/src/client/account/settings.js @@ -61,6 +61,13 @@ define('forum/account/settings', ['forum/account/header'], function(header) { return false; }); + + $('#bootswatchSkin').on('change', function() { + var css = $('#bootswatchCSS'), + val = $(this).val() === 'default' ? config['theme:src'] : 'http://maxcdn.bootstrapcdn.com/bootswatch/latest/' + $(this).val() + '/bootstrap.min.css'; + + css.attr('href', val); + }); }; return AccountSettings; diff --git a/src/controllers/api.js b/src/controllers/api.js index c09a96490d..cc51bfce52 100644 --- a/src/controllers/api.js +++ b/src/controllers/api.js @@ -63,6 +63,7 @@ apiController.getConfig = function(req, res, next) { config.postsPerPage = meta.config.postsPerPage || 20; config.maximumFileSize = meta.config.maximumFileSize; config['theme:id'] = meta.config['theme:id']; + config['theme:src'] = meta.config['theme:src']; config.defaultLang = meta.config.defaultLang || 'en_GB'; config.userLang = req.query.lang || config.defaultLang; config.environment = process.env.NODE_ENV;