146 lines
5.0 KiB
HTML
146 lines
5.0 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>pages.js</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
|
<link rel="stylesheet" media="all" href="docco.css" />
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="background"></div>
|
|
|
|
<ul id="jump_to">
|
|
<li>
|
|
<a class="large" href="javascript:void(0);">Jump To …</a>
|
|
<a class="small" href="javascript:void(0);">+</a>
|
|
<div id="jump_wrapper">
|
|
<div id="jump_page">
|
|
|
|
|
|
<a class="source" href="api.html">
|
|
api.js
|
|
</a>
|
|
|
|
|
|
<a class="source" href="auth.html">
|
|
auth.js
|
|
</a>
|
|
|
|
|
|
<a class="source" href="pages.html">
|
|
pages.js
|
|
</a>
|
|
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="sections">
|
|
|
|
<li id="title">
|
|
<div class="annotation">
|
|
<h1>pages.js</h1>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
<li id="section-1">
|
|
<div class="annotation">
|
|
|
|
<div class="pilwrap ">
|
|
<a class="pilcrow" href="#section-1">¶</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="content"><div class='highlight'><pre><span class="keyword">var</span> nconf = require(<span class="string">'nconf'</span>);
|
|
<span class="keyword">var</span> express = require(<span class="string">'express'</span>);
|
|
<span class="keyword">var</span> router = <span class="keyword">new</span> express.Router();
|
|
<span class="keyword">var</span> _ = require(<span class="string">'lodash'</span>);</pre></div></div>
|
|
|
|
</li>
|
|
|
|
|
|
<li id="section-2">
|
|
<div class="annotation">
|
|
|
|
<div class="pilwrap ">
|
|
<a class="pilcrow" href="#section-2">¶</a>
|
|
</div>
|
|
<p>-------- App --------</p>
|
|
|
|
</div>
|
|
|
|
<div class="content"><div class='highlight'><pre>router.get(<span class="string">'/'</span>, <span class="keyword">function</span>(req, res) {
|
|
<span class="keyword">return</span> res.render(<span class="string">'index'</span>, {
|
|
title: <span class="string">'HabitRPG | Your Life, The Role Playing Game'</span>,
|
|
env: res.locals.habitrpg
|
|
});
|
|
});
|
|
|
|
router.get(<span class="string">'/partials/tasks'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.render(<span class="string">'tasks/index'</span>, {env: res.locals.habitrpg});
|
|
});
|
|
|
|
router.get(<span class="string">'/partials/options'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.render(<span class="string">'options'</span>, {env: res.locals.habitrpg});
|
|
});</pre></div></div>
|
|
|
|
</li>
|
|
|
|
|
|
<li id="section-3">
|
|
<div class="annotation">
|
|
|
|
<div class="pilwrap ">
|
|
<a class="pilcrow" href="#section-3">¶</a>
|
|
</div>
|
|
<p>-------- Marketing --------</p>
|
|
|
|
</div>
|
|
|
|
<div class="content"><div class='highlight'><pre>router.get(<span class="string">'/splash.html'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.redirect(<span class="string">'/static/front'</span>);
|
|
});
|
|
|
|
router.get(<span class="string">'/static/front'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.render(<span class="string">'static/front'</span>, {env: res.locals.habitrpg});
|
|
});
|
|
|
|
router.get(<span class="string">'/static/about'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.redirect(<span class="string">'http://community.habitrpg.com/node/97'</span>);
|
|
});
|
|
|
|
router.get(<span class="string">'/static/team'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.redirect(<span class="string">'http://community.habitrpg.com/node/96'</span>);
|
|
});
|
|
|
|
router.get(<span class="string">'/static/extensions'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.redirect(<span class="string">'http://community.habitrpg.com/extensions'</span>);
|
|
});
|
|
|
|
router.get(<span class="string">'/static/faq'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.redirect(<span class="string">'http://community.habitrpg.com/faq-page'</span>);
|
|
});
|
|
|
|
router.get(<span class="string">'/static/privacy'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.render(<span class="string">'static/privacy'</span>, {env: res.locals.habitrpg});
|
|
});
|
|
|
|
router.get(<span class="string">'/static/terms'</span>, <span class="keyword">function</span>(req, res) {
|
|
res.render(<span class="string">'static/terms'</span>, {env: res.locals.habitrpg});
|
|
});
|
|
|
|
|
|
module.exports = router;</pre></div></div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|