Skip to content

Commit

Permalink
add base error_html
Browse files Browse the repository at this point in the history
  • Loading branch information
Magdalena Noffke committed Nov 16, 2016
1 parent 8575d46 commit 50d9351
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
27 changes: 5 additions & 22 deletions euth_wagtail/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
{% extends "base.html" %}
{% load static i18n %}
{% extends "base_errors.html" %}
{% load i18n %}

{% block content %}
<div class="error text-center">
<div class="error-banner">
<div class="error-banner-header">
<img src="{% static 'images/error.png'%}">
<div class="error-banner-header-text">
<h1>404</h1>
<h2>{% trans 'Error' %}</h2>
</div>
</div>
</div>
<div class="container">
<div class="error-info">
<p>{% trans 'Sorry, something went wrong.' %}<br>
{% trans 'This page couldn’t be found.' %}</p>
<a href="/" class="button">{% trans 'Get back to OPIN.ME' %}</a>
</div>
</div>
</div>
{% endblock %}
{% block error_status %}404{% endblock %}

{% block error_description %}{% trans 'This page couldn’t be found.' %}{% endblock %}
23 changes: 23 additions & 0 deletions euth_wagtail/templates/base_errors.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{% extends "base.html" %}
{% load i18n static %}

{% block content %}
<div class="error text-center">
<div class="error-banner">
<div class="error-banner-header">
<img src="{% static 'images/error.png'%}">
<div class="error-banner-header-text">
<h1>{% block error_status %}{% endblock %}</h1>
<h2>{% trans 'Error' %}</h2>
</div>
</div>
</div>
<div class="container">
<div class="error-info">
<p>{% trans 'Sorry, something went wrong.' %}<br>
{% block error_description %}{% endblock %}</p>
<a href="/" class="button">{% trans 'Get back to OPIN.ME' %}</a>
</div>
</div>
</div>
{% endblock %}

0 comments on commit 50d9351

Please sign in to comment.