routes: add a new 404 page.

* Fix a bug where non-GET 404 requests weren't handled.
* Fix a bug where non-HTML 404 requests weren't handled.
* Show a random image from a specified pool on the 404 page.
This commit is contained in:
evazion
2020-12-24 00:07:19 -06:00
parent 039ccfa3af
commit c17678d509
8 changed files with 76 additions and 37 deletions

View File

@@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Page not found</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" media="screen" href="/assets/application.css" title="default" />
</head>
<body>
<div style="text-align: center;">
<h1>That page does not exist</h1>
<p><a href="/">Return to index</a></p>
</div>
</body>
</html>

View File

@@ -1,15 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Failbooru</title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" media="screen" href="/assets/application.css" title="default" />
</head>
<body>
<div style="text-align: center;">
<h1>Something broke</h1>
<p><a href="/">Return to index</a></p>
</div>
</body>
</html>