-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from pygame/404
app: templates/error: Add error handler for 404 and 500
- Loading branch information
Showing
2 changed files
with
39 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,23 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{{ code }} - pygame.org</title> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
|
||
<style> | ||
* { | ||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | ||
text-align: center; | ||
color: #111; | ||
} | ||
|
||
h1 { | ||
margin-top: 128px; | ||
font-size: 10em; | ||
margin-bottom: 16px; | ||
} | ||
|
||
h2 { | ||
font-size: 1.9em; | ||
font-weight: 400; | ||
|
||
padding: 0 64px; | ||
} | ||
|
||
h3 { | ||
font-weight: 400; | ||
} | ||
|
||
p { | ||
font-size: 1.2em; | ||
color: #444; | ||
} | ||
|
||
a { | ||
color: #337ab7; | ||
text-decoration: none; | ||
} | ||
|
||
img { | ||
height: 100px; | ||
} | ||
</style> | ||
|
||
</head> | ||
<body{% block body_attribs %}{% endblock body_attribs %}> | ||
|
||
<div id="container"> | ||
<img src="https://www.pygame.org/docs/pygame_logo.gif"> | ||
<h1>{{ code }}</h1> | ||
<h2>{{ message }}</h2> | ||
<h3>{{ sub }}</h3> | ||
<p><a href="/">Home</a> - <a href="/docs">Docs</a> - <a | ||
target="_blank" href="https://github.com/pygame/pygameweb/issues/new" | ||
>Report This</a></p> | ||
</div> | ||
|
||
</body> | ||
</html> | ||
{% extends "base.html" %} | ||
|
||
{% block title -%} | ||
{% cache 60*5, 'error_page_title', code|string, message, sub -%} | ||
Error, {{ code }}, {{ message }} | ||
{% endcache -%} | ||
{% endblock -%} | ||
|
||
{% block content %} | ||
{% cache 60*5, 'error_page', code|string, message, sub %} | ||
<section class="error"> | ||
<h1>{{ code }}</h1> | ||
<h2>{{ message }}</h2> | ||
<h3>{{ sub }}</h3> | ||
|
||
<p><a href="/">Home</a> - <a href="/docs">Docs</a> - <a | ||
target="_blank" href="https://github.com/pygame/pygameweb/issues/new" | ||
>Help Fix This</a></p> | ||
</section> | ||
{% endcache %} | ||
{% endblock %} | ||
|
||
{% block body_attribs %}{{ super() }}{% endblock body_attribs %} |