diff --git a/locales/en_US.json b/locales/en_US.json index b737da1..8167558 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -366,5 +366,8 @@ "cancel": "Cancel", "confirm": "Confirm", "close": "Close" + }, + "notfound":{ + "description": "Oops! We could not find this page." } } diff --git a/public/assets/css/404.css b/public/assets/css/404.css new file mode 100644 index 0000000..03512c3 --- /dev/null +++ b/public/assets/css/404.css @@ -0,0 +1,24 @@ +.title404{ + text-align: center; + font-size: 8rem; + padding-top: 60px; + color: var(--text-shade-1); +} +.dis404{ + text-align: center; + font-size: 1.7rem; + margin-top: -10px; + color: var(--text-shade-1); +} +.shockedbandwidth{ + display: block; + margin-left: auto; + margin-right: auto; + margin-top: 70px; + margin-bottom: -120px; +} +@media screen and (max-width: 900px) { + .shockedbandwidth{ + margin-bottom: -100px; + } +} \ No newline at end of file diff --git a/public/assets/images/shockedbandwidth.svg b/public/assets/images/shockedbandwidth.svg new file mode 100644 index 0000000..702169c --- /dev/null +++ b/public/assets/images/shockedbandwidth.svg @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/server.js b/src/server.js index c26f332..456b79f 100644 --- a/src/server.js +++ b/src/server.js @@ -99,10 +99,10 @@ app.use('/nso-legacy-pack', routes.aprilfools); logger.info('Creating 404 status handler'); // This works because it is the last router created // Meaning the request could not find a valid router -app.use((request, response, next) => { +app.use((request, response) => { const fullUrl = util.fullUrl(request); + response.render('404'); logger.warn(`HTTP 404 at ${fullUrl}`); - next(); }); logger.info('Setting up handlebars engine'); diff --git a/views/404.handlebars b/views/404.handlebars new file mode 100644 index 0000000..0a4cd31 --- /dev/null +++ b/views/404.handlebars @@ -0,0 +1,11 @@ + + +{{> header}} + +
+
404
+
{{ locale.notfound.description }}
+ + {{> footer }} +
+