Error pages

This commit is contained in:
Raphael Michel
2018-07-08 18:15:14 +02:00
parent 32f401e423
commit 50aa186197
6 changed files with 95 additions and 60 deletions

View File

@@ -2,7 +2,8 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Bad Request" %}{% endblock %} {% block title %}{% trans "Bad Request" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-frown-o big-icon"></i> <i class="fa fa-frown-o fa-fw big-icon"></i>
<div class="error-details">
<h1>{% trans "Bad Request" %}</h1> <h1>{% trans "Bad Request" %}</h1>
<p>{% trans "We were unable to parse your request." %}</p> <p>{% trans "We were unable to parse your request." %}</p>
<p>{{ exception }}</p> <p>{{ exception }}</p>
@@ -10,4 +11,5 @@
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a> &middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p> </p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,7 +2,8 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Permission denied" %}{% endblock %} {% block title %}{% trans "Permission denied" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-lock big-icon"></i> <i class="fa fa-fw fa-lock big-icon"></i>
<div class="error-details">
<h1>{% trans "Permission denied" %}</h1> <h1>{% trans "Permission denied" %}</h1>
<p>{% trans "You do not have access to this page." %}</p> <p>{% trans "You do not have access to this page." %}</p>
<p>{{ exception }}</p> <p>{{ exception }}</p>
@@ -10,4 +11,5 @@
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a> &middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p> </p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,11 +2,13 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Not found" %}{% endblock %} {% block title %}{% trans "Not found" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-meh-o big-icon"></i> <i class="fa fa-meh-o fa-fw big-icon"></i>
<div class="error-details">
<h1>{% trans "Not found" %}</h1> <h1>{% trans "Not found" %}</h1>
<p>{% trans "I'm afraid we could not find the the resource you requested." %}</p> <p>{% trans "I'm afraid we could not find the the resource you requested." %}</p>
<p>{{ exception }}</p> <p>{{ exception }}</p>
<p class="links"> <p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p> </p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,7 +2,8 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Internal Server Error" %}{% endblock %} {% block title %}{% trans "Internal Server Error" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-bolt big-icon"></i> <i class="fa fa-bolt big-icon fa-fw"></i>
<div class="error-details">
<h1>{% trans "Internal Server Error" %}</h1> <h1>{% trans "Internal Server Error" %}</h1>
<p>{% trans "We had trouble processing your request." %}</p> <p>{% trans "We had trouble processing your request." %}</p>
<p>{% trans "If this problem persists, please contact us." %}</p> <p>{% trans "If this problem persists, please contact us." %}</p>
@@ -20,4 +21,5 @@
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
&middot; <a id='reload' href='#'>{% trans "Try again" %}</a> &middot; <a id='reload' href='#'>{% trans "Try again" %}</a>
</p> </p>
</div>
{% endblock %} {% endblock %}

View File

@@ -2,10 +2,12 @@
{% load i18n %} {% load i18n %}
{% block title %}{% trans "Verification failed" %}{% endblock %} {% block title %}{% trans "Verification failed" %}{% endblock %}
{% block content %} {% block content %}
<i class="fa fa-frown-o big-icon"></i> <i class="fa fa-frown-o big-icon fa-fw"></i>
<div class="error-details">
<h1>{% trans "Verification failed" %}</h1> <h1>{% trans "Verification failed" %}</h1>
<p>{% blocktrans trimmed %} <p>{% blocktrans trimmed %}
We could not verify that this request really was sent from you. For security reasons, we therefore cannot process it. We could not verify that this request really was sent from you. For security reasons, we therefore cannot
process it.
{% endblocktrans %}</p> {% endblocktrans %}</p>
{% if no_referer %} {% if no_referer %}
<p>{{ no_referer1 }}</p> <p>{{ no_referer1 }}</p>
@@ -15,10 +17,12 @@
<p>{{ no_cookie2 }}</p> <p>{{ no_cookie2 }}</p>
{% else %} {% else %}
<p>{% blocktrans trimmed %} <p>{% blocktrans trimmed %}
Please go back to the last page, refresh this page and then try again. If the problem persists, please get in touch with us. Please go back to the last page, refresh this page and then try again. If the problem persists, please
get in touch with us.
{% endblocktrans %}</p> {% endblocktrans %}</p>
{% endif %} {% endif %}
<p class="links"> <p class="links">
<a id='goback' href='#'>{% trans "Take a step back" %}</a> <a id='goback' href='#'>{% trans "Take a step back" %}</a>
</p> </p>
</div>
{% endblock %} {% endblock %}

View File

@@ -5,12 +5,35 @@
body { body {
background: #ececec; background: #fbf7fc;
text-align: center;
padding: 50px 0; padding: 50px 0;
} }
.big-icon { .big-icon {
font-size: 200px; font-size: 200px;
color: $brand-primary; color: $navbar-inverse-bg;
display: block;
float: left;
}
.error-details {
margin-left: 260px;
}
.container {
width: 90%;
max-width: 800px;
}
@media(max-width: 600px) {
body {
text-align: center;
}
.big-icon {
margin: auto;
float: none;
}
.error-details {
margin-left: 0;
}
} }