Add better error pages

This commit is contained in:
calzoneman 2015-10-27 20:44:40 -07:00
parent 26e8660af4
commit 88236e036c
5 changed files with 57 additions and 5 deletions

View file

@ -24,7 +24,8 @@ html(lang="en")
li A malicious user has attempted to tamper with your session
li Your browser does not support cookies, or they are not enabled
| If the problem persists, please contact an administrator.
a(href=path) Return to previous page
if referer
a(href=referer) Return to previous page
include footer
mixin footer()

36
templates/httperror.jade Normal file
View file

@ -0,0 +1,36 @@
mixin notfound()
h1 Not Found
p The page you were looking for doesn't seem to exist. Please check that you typed the URL correctly.
mixin forbidden()
h1 Forbidden
p You don't have permission to access <code>#{path}</code>
mixin genericerror()
h1 Oops
p Your request could not be processed. Status code: <code>#{status}</code>, message: <code>#{message}</code>
doctype html
html(lang="en")
head
include head
mixin head()
body
#wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav
mixin navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
mixin navdefaultlinks(path)
mixin navloginlogout(path)
section#mainpage.container
.col-md-12
.alert.alert-danger
if status == 404
mixin notfound()
else if status == 403
mixin forbidden()
else
mixin genericerror()
include footer
mixin footer()