From 58c9e84f78350fa555779fe2c655041b115de508 Mon Sep 17 00:00:00 2001 From: Esther Date: Mon, 22 Jun 2020 17:42:04 +0100 Subject: [PATCH] Made error page look more fancy --- public/javascript/error.js | 4 ++++ views/error.pug | 32 +++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 public/javascript/error.js diff --git a/public/javascript/error.js b/public/javascript/error.js new file mode 100644 index 0000000..85e03ef --- /dev/null +++ b/public/javascript/error.js @@ -0,0 +1,4 @@ +$(document).ready(function () { + var eCode = $("#error-code h2").text(); + $(document).attr("title", "ESTR // " + eCode); +}); \ No newline at end of file diff --git a/views/error.pug b/views/error.pug index 3b25cfa..10ad72f 100644 --- a/views/error.pug +++ b/views/error.pug @@ -1,6 +1,32 @@ extends layout +block nav-links + li.nav-item + a.nav-link(href='/') + span Home + li.nav-item + a.nav-link(href='#') + span About + li.nav-item + a.nav-link(href='#') + span CV + li.nav-item + a.nav-link(href='https://git.pastel.codes/Blankie') + span Projects + li.nav-item + a.nav-link(href='https://blog.pastel.codes') + span Blog + li.nav-item + a.nav-link(href='#') + span Contact + block content - h1= message - h2= error.status - pre #{error.stack} + .center-v-h.ef + .error + h1= message + #error-code + h2= error.status + //pre #{error.stack} + +block scripts + script(src="/javascript/error.js") \ No newline at end of file