Feature(pages): Add 404 page

To prevent loops, server errors will lead here instead of map page
This page can be static to prevent infinite loops
closes #9463
This commit is contained in:
Berkeley Martinez
2016-07-14 17:32:44 -07:00
parent 0995e3bba6
commit 822eb541de
2 changed files with 22 additions and 2 deletions

View File

@ -16,9 +16,9 @@ export default function redirectLang(app) {
if (supportedLanguages[langCode]) { if (supportedLanguages[langCode]) {
req.flash('errors', { req.flash('errors', {
msg: `404: We couldn't find path ${ path }` msg: `We couldn't find path ${ path }`
}); });
return res.redirect('/map'); return res.render('404', { title: '404'});
} }
// language aware redirect // language aware redirect

20
server/views/404.jade Normal file
View File

@ -0,0 +1,20 @@
extends ./layout
block content
.spacer
.row
.col-sm-6.col-sm-offset-3
hr
.text-center
h1 404
.row
.col-sm-6.col-sm-offset-3
.text-center
h2 Ooops, we couldn't find that page.
.spacer
.row
.col-sm-6.col-sm-offset-3
.text-center
a.btn.signup-btn.btn-block(href='/map') Head to the Map
hr
.spacer