custom error page support

This commit is contained in:
Naman Sood 2021-02-17 00:57:16 -05:00
parent 8afaaa10d2
commit 2cf6d91ff5
5 changed files with 139 additions and 0 deletions

16
templates/error.html Normal file
View file

@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/css/error.css">
<title>oh no &ndash; Naman Sood</title>
</head>
<body>
<h1>That was <em>not</em> supposed to happen.</h1>
<p>Calm down. Take a deep breath. Error {{code}}s can happen to anyone. Seriously. It's alright.</p>
<p>Try again in a while, or check out my <a href="https://nsood.in">website</a>, which should not have these issues. Probably.</p>
</body>
</html>

17
templates/notfound.html Normal file
View file

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/css/error.css">
<title>something something princess in other castle &ndash; Naman Sood</title>
</head>
<body>
<h1>Uncaught ReferenceError: {{path}} is not defined</h1>
<p>Haha, just kidding. No, but really, there's no page here. This is what the kids call an &ldquo;Error 404&rdquo; situation.</p>
<p>Consider visiting <a href='/'>my homepage</a>, which is guaranteed to exist.</p>
</body>
</html>