diff --git a/.gitignore b/.gitignore index 7ae63a58f6..93d4ccda41 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,6 @@ sftp-config.json config.json public/config.json public/css/*.css +public/themes/* *.sublime-project *.sublime-workspace diff --git a/public/images/themes/default.png b/public/images/themes/default.png new file mode 100644 index 0000000000..2b2e6a05e7 Binary files /dev/null and b/public/images/themes/default.png differ diff --git a/public/src/forum/admin/themes.js b/public/src/forum/admin/themes.js index 54d0140be2..66b04a9de2 100644 --- a/public/src/forum/admin/themes.js +++ b/public/src/forum/admin/themes.js @@ -89,14 +89,17 @@ var nodebb_admin = (function(nodebb_admin) { for(var x=0,numThemes=themes.length;x' + + liEl.innerHTML = '' + '
' + '
' + ' ' + '' + '
' + '

' + themes[x].name + '

' + - '

' + themes[x].description + '

' + + '

' + + themes[x].description + + (themes[x].url ? ' (Homepage)' : '') + + '

' + '
' + '
'; themeFrag.appendChild(liEl.cloneNode(true)); diff --git a/public/templates/header.tpl b/public/templates/header.tpl index 896c009e74..2215f0b742 100644 --- a/public/templates/header.tpl +++ b/public/templates/header.tpl @@ -5,7 +5,7 @@ - + diff --git a/src/meta.js b/src/meta.js index c0e868569b..130edb312e 100644 --- a/src/meta.js +++ b/src/meta.js @@ -61,6 +61,8 @@ var utils = require('./../public/src/utils.js'), fs.readFile(themeConfPath, function(err, conf) { conf = JSON.parse(conf); conf.src = global.nconf.get('url') + 'themes/' + themeDir + '/' + conf.src; + if (conf.screenshot) conf.screenshot = global.nconf.get('url') + 'themes/' + themeDir + '/' + conf.screenshot; + else conf.screenshot = global.nconf.get('url') + 'images/themes/default.png'; themeArr.push(conf); next(); }); diff --git a/src/webserver.js b/src/webserver.js index 3c692a5812..3065d71b99 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -31,7 +31,10 @@ var express = require('express'), cssSrc: global.config['theme:src'] || global.nconf.get('relative_path') + '/vendor/bootstrap/css/bootstrap.min.css', title: global.config['title'] || 'NodeBB', csrf:res.locals.csrf_token, - relative_path: global.nconf.get('relative_path') + relative_path: global.nconf.get('relative_path'), + meta: { + description: 'test' + } }); };