2013-08-29 05:45:19 +00:00
|
|
|
var nconf = require('nconf');
|
|
|
|
|
var express = require('express');
|
|
|
|
|
var router = new express.Router();
|
|
|
|
|
var _ = require('lodash');
|
|
|
|
|
|
2013-09-01 16:56:43 +00:00
|
|
|
// -------- App --------
|
2013-08-29 05:45:19 +00:00
|
|
|
router.get('/', function(req, res) {
|
|
|
|
|
return res.render('index', {
|
|
|
|
|
title: 'HabitRPG | Your Life, The Role Playing Game',
|
|
|
|
|
env: res.locals.habitrpg
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/partials/tasks', function(req, res) {
|
2013-09-06 17:50:14 +00:00
|
|
|
res.render('tasks/index', {env: res.locals.habitrpg});
|
2013-08-29 05:45:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/partials/options', function(req, res) {
|
2013-09-06 17:50:14 +00:00
|
|
|
res.render('options', {env: res.locals.habitrpg});
|
2013-08-29 05:45:19 +00:00
|
|
|
});
|
|
|
|
|
|
2013-09-01 16:56:43 +00:00
|
|
|
// -------- Marketing --------
|
|
|
|
|
|
|
|
|
|
router.get('/splash.html', function(req, res) {
|
2013-09-06 17:50:14 +00:00
|
|
|
res.redirect('/static/front', {env: res.locals.habitrpg});
|
2013-09-01 16:56:43 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/front', function(req, res) {
|
|
|
|
|
res.render('static/front', {env: res.locals.habitrpg});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/about', function(req, res) {
|
|
|
|
|
res.redirect('http://community.habitrpg.com/node/97');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/team', function(req, res) {
|
|
|
|
|
res.redirect('http://community.habitrpg.com/node/96');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/extensions', function(req, res) {
|
|
|
|
|
res.redirect('http://community.habitrpg.com/extensions');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/faq', function(req, res) {
|
|
|
|
|
res.redirect('http://community.habitrpg.com/faq-page');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/privacy', function(req, res) {
|
|
|
|
|
res.render('static/privacy', {env: res.locals.habitrpg});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
router.get('/static/terms', function(req, res) {
|
|
|
|
|
res.render('static/terms', {env: res.locals.habitrpg});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
2013-08-29 05:45:19 +00:00
|
|
|
module.exports = router;
|