ADDED 404 page.
UPDATED to v0.1.1.
This commit is contained in:
parent
f4df7112e3
commit
dd8b21bdc8
5
app.js
5
app.js
@ -51,9 +51,7 @@ app.use('/search/', search);
|
||||
|
||||
/// catch 404 and forwarding to error handler
|
||||
app.use(function(req, res, next) {
|
||||
var err = new Error('Not Found');
|
||||
err.status = 404;
|
||||
next(err);
|
||||
res.status(404).sendFile(path.join(__dirname + '/public/errors', '404.html'));
|
||||
});
|
||||
|
||||
/// error handlers
|
||||
@ -81,4 +79,5 @@ app.use(function(err, req, res, next) {
|
||||
});
|
||||
|
||||
|
||||
|
||||
module.exports = app;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@mysticbits/codex-mythica",
|
||||
"version": "0.1.0",
|
||||
"version": "0.1.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "nodejs ./bin/www"
|
||||
@ -10,7 +10,7 @@
|
||||
"cookie-parser": "~1.0.1",
|
||||
"debug": "~0.7.4",
|
||||
"ejs": "^2.5.7",
|
||||
"express": "~4.0.0",
|
||||
"express": "~4.16.0",
|
||||
"jade": "~1.3.0",
|
||||
"morgan": "~1.0.0",
|
||||
"static-favicon": "~1.0.0"
|
||||
|
165
public/errors/404.html
Executable file
165
public/errors/404.html
Executable file
@ -0,0 +1,165 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Mythic Wars | Page Not Found</title>
|
||||
<style>
|
||||
*, *:before, *:after {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
|
||||
html {
|
||||
box-sizing: border-box;
|
||||
font-size: 16px;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
a,
|
||||
a:link {
|
||||
color: #c9bb69;
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: #c57f5d;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #efb88f;
|
||||
}
|
||||
|
||||
a:active {
|
||||
background-color: #8c272d;
|
||||
color: #efb88f;
|
||||
}
|
||||
|
||||
body {
|
||||
background: url("https://mythicwarsgame.com/images/404-bg.jpg") no-repeat center center fixed;
|
||||
background-size: cover;
|
||||
color: #fff;
|
||||
line-height: 1.3em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
background-color: #333333;
|
||||
background-color: rgba(33,33,33,.7);
|
||||
border-radius: 1em;
|
||||
max-width: 30em;
|
||||
width: 100%;
|
||||
padding: 2em;
|
||||
margin: 2em auto;
|
||||
}
|
||||
|
||||
/* google search */
|
||||
|
||||
#goog-fixurl ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#goog-fixurl form {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#goog-wm-qt,
|
||||
#goog-wm-sb {
|
||||
border: 1px solid #bbb;
|
||||
font-size: 16px;
|
||||
line-height: normal;
|
||||
vertical-align: top;
|
||||
color: #444;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#goog-wm-qt {
|
||||
width: 220px;
|
||||
height: 2em;
|
||||
padding: 5px;
|
||||
margin: 5px 10px 0 0;
|
||||
box-shadow: inset 0 1px 1px #ccc;
|
||||
}
|
||||
|
||||
#goog-wm-sb {
|
||||
display: inline-block;
|
||||
height: 32px;
|
||||
padding: 0 10px;
|
||||
margin: 5px 0 0;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
background-color: #f5f5f5;
|
||||
background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
|
||||
background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
|
||||
background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
|
||||
background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
*overflow: visible;
|
||||
*display: inline;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
#goog-wm-sb:hover,
|
||||
#goog-wm-sb:focus {
|
||||
border-color: #aaa;
|
||||
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
#goog-wm-qt:hover,
|
||||
#goog-wm-qt:focus {
|
||||
border-color: #105cb6;
|
||||
outline: 0;
|
||||
color: #222;
|
||||
}
|
||||
|
||||
input::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Media Queries
|
||||
========================================================================== */
|
||||
/*
|
||||
@media print,
|
||||
(-o-min-device-pixel-ratio: 5/4),
|
||||
(-webkit-min-device-pixel-ratio: 1.25),
|
||||
(min-resolution: 120dpi) {
|
||||
body {
|
||||
background-image: url('https://mythicwarsgame.com/images/img/hole-bg-2200x1800-50.jpg');
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 50em) and (-o-min-device-pixel-ratio: 5/4),
|
||||
only screen and (min-width: 50em) and (-webkit-min-device-pixel-ratio: 1.25),
|
||||
only screen and (min-width: 50em) and (min-resolution: 120dpi), {
|
||||
body {
|
||||
background-image: url('https://mythicwarsgame.com/images/img/hole-bg-3200x1800-50.jpg');
|
||||
}
|
||||
}
|
||||
*/
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>Page Not Found</h1>
|
||||
<p>Sorry, but the page you were trying to view does not exist.</p>
|
||||
<p>It looks like this was the result of either:</p>
|
||||
<ul>
|
||||
<li>a mistyped address,</li>
|
||||
<li>an out-of-date link, or</li>
|
||||
<li>a change in the fabric of the universe brought on by the
|
||||
<a href="https://mythicwarsgame.com">Mythic Wars</a>.
|
||||
</li>
|
||||
</ul>
|
||||
<p>You can <a href="javascript:history.go(-1);" title="Go back for science!">go back and try again</a>, or just start over at the <a href="/" title="Give up and go home!">Mythic Wars</a> home page.</p>
|
||||
<script>
|
||||
var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),GOOG_FIXURL_SITE = location.host;
|
||||
</script>
|
||||
<script src="//linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js" async></script>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user