jshinting controllers/index.js; adding back meta tags to home page

v1.18.x
psychobunny 11 years ago
parent 8df33e65ac
commit 3eb9f65c2e

@ -1,3 +1,5 @@
"use strict";
var topicsController = require('./topics'), var topicsController = require('./topics'),
categoriesController = require('./categories'), categoriesController = require('./categories'),
usersController = require('./users'), usersController = require('./users'),
@ -7,13 +9,14 @@ var topicsController = require('./topics'),
nconf = require('nconf'), nconf = require('nconf'),
auth = require('./../routes/authentication'), auth = require('./../routes/authentication'),
meta = require('./../meta'), meta = require('./../meta'),
user = require('./../user'),
plugins = require('./../plugins'), plugins = require('./../plugins'),
categories = require('./../categories'), categories = require('./../categories'),
categoryTools = require('./../categoryTools'); categoryTools = require('./../categoryTools');
Controllers = { var Controllers = {
topics: topicsController, topics: topicsController,
categories: categoriesController, categories: categoriesController,
users: usersController, users: usersController,
@ -25,23 +28,19 @@ Controllers = {
Controllers.home = function(req, res, next) { Controllers.home = function(req, res, next) {
async.parallel({ async.parallel({
header: function (next) { header: function (next) {
/*app.build_header({ res.locals.metaTags = [{
req: req, name: "title",
res: res, content: meta.config.title || 'NodeBB'
metaTags: [{ }, {
name: "title", name: "description",
content: meta.config.title || 'NodeBB' content: meta.config.description || ''
}, { }, {
name: "description", property: 'og:title',
content: meta.config.description || '' content: 'Index | ' + (meta.config.title || 'NodeBB')
}, { }, {
property: 'og:title', property: "og:type",
content: 'Index | ' + (meta.config.title || 'NodeBB') content: 'website'
}, { }];
property: "og:type",
content: 'website'
}]
}, next);*/
next(null); next(null);
}, },
@ -91,7 +90,7 @@ Controllers.login = function(req, res, next) {
num_strategies = login_strategies.length, num_strategies = login_strategies.length,
emailersPresent = plugins.hasListeners('action:email.send'); emailersPresent = plugins.hasListeners('action:email.send');
if (num_strategies == 0) { if (num_strategies === 0) {
data = { data = {
'login_window:spansize': 'col-md-12', 'login_window:spansize': 'col-md-12',
'alternate_logins': false 'alternate_logins': false
@ -100,7 +99,7 @@ Controllers.login = function(req, res, next) {
data = { data = {
'login_window:spansize': 'col-md-6', 'login_window:spansize': 'col-md-6',
'alternate_logins': true 'alternate_logins': true
} };
} }
data.authentication = login_strategies; data.authentication = login_strategies;
@ -119,7 +118,7 @@ Controllers.register = function(req, res, next) {
login_strategies = auth.get_login_strategies(), login_strategies = auth.get_login_strategies(),
num_strategies = login_strategies.length; num_strategies = login_strategies.length;
if (num_strategies == 0) { if (num_strategies === 0) {
data = { data = {
'register_window:spansize': 'col-md-12', 'register_window:spansize': 'col-md-12',
'alternate_logins': false 'alternate_logins': false
@ -128,7 +127,7 @@ Controllers.register = function(req, res, next) {
data = { data = {
'register_window:spansize': 'col-md-6', 'register_window:spansize': 'col-md-6',
'alternate_logins': true 'alternate_logins': true
} };
} }
data.authentication = login_strategies; data.authentication = login_strategies;

Loading…
Cancel
Save