diff --git a/html/404.ejs b/html/404.ejs index 0e988c07..e9a1a1ce 100644 --- a/html/404.ejs +++ b/html/404.ejs @@ -1,78 +1,4 @@ - - - - 1984!!1 - PokeTube - - - - - - - - - - - - -
- - -
- - -

- 404!!1 -

-

- Very 1984 Innit? I dont think that this webpage exist :p u can search for something else~ -

-
- - - -
- - - - - \ No newline at end of file +<%- include('error.ejs', { + error: "404", + description: "Very 1984 Innit? I dont think this webpage exist :p u can search for something else~ " +}) %> \ No newline at end of file diff --git a/html/502.ejs b/html/502.ejs new file mode 100644 index 00000000..fe9d095f --- /dev/null +++ b/html/502.ejs @@ -0,0 +1,4 @@ +<%- include('error.ejs', { + error: "502", + description: "An error has occurred. Try again or come back later." +}) %> \ No newline at end of file diff --git a/html/error.ejs b/html/error.ejs new file mode 100644 index 00000000..9f0d6183 --- /dev/null +++ b/html/error.ejs @@ -0,0 +1,94 @@ + + + + PokeTube + + + + + + + +

<%=error%>

+
+

<%=error%>

+

<%=description%>

+
+ + + + + \ No newline at end of file diff --git a/src/libpoketube/init/pages-static.js b/src/libpoketube/init/pages-static.js index 429f5eb3..ed01ddf4 100644 --- a/src/libpoketube/init/pages-static.js +++ b/src/libpoketube/init/pages-static.js @@ -48,6 +48,10 @@ module.exports = function (app, config, renderTemplate) { } }); + app.get("/502", function (req, res) { + renderTemplate(res, req, "502.ejs"); + }); + app.get("/143", function (req, res) { var number_easteregg = getRandomArbitrary(0, 143);