habitica/src/routes/pages.js

57 lines
1.5 KiB
JavaScript
Raw Normal View History

var nconf = require('nconf');
var express = require('express');
var router = new express.Router();
var _ = require('lodash');
// -------- App --------
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});
});
router.get('/partials/options', function(req, res) {
2013-09-06 17:50:14 +00:00
res.render('options', {env: res.locals.habitrpg});
});
// -------- Marketing --------
router.get('/splash.html', function(req, res) {
2013-09-06 17:50:14 +00:00
res.redirect('/static/front', {env: res.locals.habitrpg});
});
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});
});
module.exports = router;