Baris Soner Usakli 12 years ago
commit 6e0c84f9e5

1
.gitignore vendored

@ -8,5 +8,6 @@ sftp-config.json
config.json config.json
public/config.json public/config.json
public/css/*.css public/css/*.css
public/themes/*
*.sublime-project *.sublime-project
*.sublime-workspace *.sublime-workspace

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -89,14 +89,17 @@ var nodebb_admin = (function(nodebb_admin) {
for(var x=0,numThemes=themes.length;x<numThemes;x++) { for(var x=0,numThemes=themes.length;x<numThemes;x++) {
liEl.setAttribute('data-theme', themes[x].id); liEl.setAttribute('data-theme', themes[x].id);
liEl.setAttribute('data-css', themes[x].src); liEl.setAttribute('data-css', themes[x].src);
liEl.innerHTML = '<img src="' + themes[x].thumbnail + '" />' + liEl.innerHTML = '<img src="' + themes[x].screenshot + '" />' +
'<div>' + '<div>' +
'<div class="pull-right">' + '<div class="pull-right">' +
'<button class="btn btn-primary" data-action="use">Use</button> ' + '<button class="btn btn-primary" data-action="use">Use</button> ' +
'<button class="btn" data-action="preview">Preview</button>' + '<button class="btn" data-action="preview">Preview</button>' +
'</div>' + '</div>' +
'<h4>' + themes[x].name + '</h4>' + '<h4>' + themes[x].name + '</h4>' +
'<p>' + themes[x].description + '</p>' + '<p>' +
themes[x].description +
(themes[x].url ? ' (<a href="' + themes[x].url + '">Homepage</a>)' : '') +
'</p>' +
'</div>' + '</div>' +
'<div class="clear">'; '<div class="clear">';
themeFrag.appendChild(liEl.cloneNode(true)); themeFrag.appendChild(liEl.cloneNode(true));

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="title" CONTENT="NodeBB"> <meta name="title" CONTENT="NodeBB">
<meta name="keywords" content="" /> <meta name="keywords" content="" />
<meta name="description" content="" /> <meta name="description" content="{meta.description}" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes" />
<link href="{cssSrc}" rel="stylesheet" media="screen"> <link href="{cssSrc}" rel="stylesheet" media="screen">

@ -61,6 +61,8 @@ var utils = require('./../public/src/utils.js'),
fs.readFile(themeConfPath, function(err, conf) { fs.readFile(themeConfPath, function(err, conf) {
conf = JSON.parse(conf); conf = JSON.parse(conf);
conf.src = global.nconf.get('url') + 'themes/' + themeDir + '/' + conf.src; 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); themeArr.push(conf);
next(); next();
}); });

@ -31,7 +31,10 @@ var express = require('express'),
cssSrc: global.config['theme:src'] || global.nconf.get('relative_path') + '/vendor/bootstrap/css/bootstrap.min.css', cssSrc: global.config['theme:src'] || global.nconf.get('relative_path') + '/vendor/bootstrap/css/bootstrap.min.css',
title: global.config['title'] || 'NodeBB', title: global.config['title'] || 'NodeBB',
csrf:res.locals.csrf_token, csrf:res.locals.csrf_token,
relative_path: global.nconf.get('relative_path') relative_path: global.nconf.get('relative_path'),
meta: {
description: 'test'
}
}); });
}; };

Loading…
Cancel
Save