add a ton of static page, beef up the footer, make this website look
official! @zakkain, I hope I didn't break anything!
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
module.exports.splash = (req, res, next) ->
|
||||
unless req.query?.play? or req.getModel().get('_userId')
|
||||
res.redirect('/splash.html')
|
||||
isStatic = req.url.split('/')[1] is 'static'
|
||||
unless req.query?.play? or req.getModel().get('_userId') or isStatic
|
||||
res.redirect('/static/front')
|
||||
else
|
||||
next()
|
||||
|
||||
|
||||
@@ -7,10 +7,18 @@ derby = require 'derby'
|
||||
# ---------- Static Pages ------------
|
||||
staticPages = derby.createStatic path.dirname(path.dirname(__dirname))
|
||||
|
||||
router.get '/privacy', (req, res) ->
|
||||
staticPages.render 'privacy', res
|
||||
beforeEach = (req, res, next) ->
|
||||
req.getModel().set '_view', {nodeEnv: 'production'} # we don't want cheat buttons on static pages
|
||||
next()
|
||||
|
||||
router.get '/terms', (req, res) ->
|
||||
staticPages.render 'terms', res
|
||||
router.get '/splash.html', (req, res) -> return res.redirect('/static/front')
|
||||
router.get '/static/front', beforeEach, (req, res) -> staticPages.render 'static/front', res
|
||||
router.get '/static/about', beforeEach, (req, res) -> staticPages.render 'static/about', res
|
||||
router.get '/static/team', beforeEach, (req, res) -> staticPages.render 'static/team', res
|
||||
router.get '/static/extensions', beforeEach, (req, res) -> staticPages.render 'static/extensions', res
|
||||
router.get '/static/faq', beforeEach, (req, res) -> staticPages.render 'static/faq', res
|
||||
|
||||
router.get '/static/privacy', beforeEach, (req, res) -> staticPages.render 'static/privacy', res
|
||||
router.get '/static/terms', beforeEach, (req, res) -> staticPages.render 'static/terms', res
|
||||
|
||||
module.exports = router
|
||||
|
||||
Reference in New Issue
Block a user