add error handler pages for 400, 404, 500
This commit is contained in:
14
incorporealcms/templates/400.html
Normal file
14
incorporealcms/templates/400.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
<a href="/">{{ config.TITLE_SUFFIX }}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
<h1>BAD REQUEST</h1>
|
||||
<p>You're doing something you're not supposed to. Stop it?</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
19
incorporealcms/templates/404.html
Normal file
19
incorporealcms/templates/404.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
<a href="/">{{ config.TITLE_SUFFIX }}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
<h1>NOT FOUND</h1>
|
||||
<p>Sorry, <b><tt>{{ request.path }}</tt></b> does not seem to exist, at least not anymore.</p>
|
||||
<p>It's possible you followed a dead link on this site, in which case I would appreciate it if you could email me via:
|
||||
bss @ <this domain> and I can take a look. I make an effort to symlink old content to its new location,
|
||||
so old links and URLs should, generally speaking, work.</p>
|
||||
<p>Otherwise, I suggest you go <a href="/">to the index</a> and navigate your way (hopefully) to what
|
||||
you're looking for.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
14
incorporealcms/templates/500.html
Normal file
14
incorporealcms/templates/500.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
<a href="/">{{ config.TITLE_SUFFIX }}</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
<h1>INTERNAL SERVER ERROR</h1>
|
||||
<p>Something bad happened! Please email me at bss @ <this domain> and tell me what happened.</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -12,6 +12,7 @@
|
||||
<link rel="icon" href="{{ url_for('static', filename='img/favicon.png') }}">
|
||||
|
||||
<div class="site-wrap">
|
||||
{% block header %}
|
||||
<div class="header">
|
||||
<div class="nav">
|
||||
{% for nav in navs %}
|
||||
@@ -24,11 +25,14 @@
|
||||
<a href="?style=light">[light]</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
{{ content }}
|
||||
</div>
|
||||
<footer>
|
||||
<i>Last modified: {{ mtime }}</i>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
</div>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user