forked from Princeton-CDH/cdh-web
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #178 from springload/fix/error-templates-fix
udpate 404 and 500 error templates
- Loading branch information
Showing
6 changed files
with
44 additions
and
33 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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,7 +1,12 @@ | ||
{% extends 'error_base.html' %} | ||
{% load static %} | ||
{% load static wagtailcore_tags %} | ||
{# defaults to 404, but pass error code and message for alternate use #} | ||
{% block page-title %}{{ page_title|default:'Not Found' }}{% endblock %} | ||
{% firstof page_title 'Not Found' as title %} | ||
|
||
{% block error-code %}{{ error_code|default:'404' }}{% endblock %} | ||
{% block message %}{{ message|default:"We can’t seem to find the page you’re looking for." }}{% endblock %} | ||
{% block content %} | ||
{% with desc=message|default:"We can't seem to find the page you're looking for." %} | ||
{% with image_src='images/cdh_404.webp' %} | ||
{% include 'includes/error_hero.html' with title='Error 404' description=desc image_src=image_src %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% endblock %} |
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,23 +1,12 @@ | ||
{% load static wagtailuserbar wagtailcore_tags wagtailimages_tags %} | ||
<!DOCTYPE html> | ||
<html class="no-js" lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Error 500</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<script type="text/javascript"> window.staticRoot = "{% static 'dist/' %}"; </script> | ||
|
||
</head> | ||
<body class="{% block body_class %}{% endblock %}"> | ||
|
||
<div class="grid-full error-page-content"> | ||
<h1>Error 500</h1> | ||
<p>Something went wrong. Please try reloading the page, or <a href="/">return to home</a>.</p> | ||
</div> | ||
|
||
{% if SENTRY_DSN_FED %} | ||
<script>Raven.config('{{ SENTRY_DSN_FED }}').install()</script> | ||
{% endif %} | ||
</body> | ||
</html> | ||
{% extends 'error_base.html' %} | ||
{% load static wagtailcore_tags %} | ||
{# defaults to 404, but pass error code and message for alternate use #} | ||
{% firstof page_title 'Not Found' as title %} | ||
|
||
{% block content %} | ||
{% with desc=message|default:"Something went wrong. Please try reloading the page, or return to home" %} | ||
{% with image_src='images/cdh_500.webp' %} | ||
{% include 'includes/error_hero.html' with title='Error 500' description=desc %} | ||
{% endwith %} | ||
{% endwith %} | ||
{% endblock %} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% load static wagtailcore_tags wagtailimages_tags l10n %} | ||
|
||
<div class="standard-hero content-width grid-standard"> | ||
|
||
<h1 class="standard-hero__title">{{ title }}</h1> | ||
<div class="standard-hero__description"> | ||
{% if description %} | ||
{{ description | richtext }} | ||
{% endif %} | ||
</div> | ||
|
||
<picture class="standard-hero__img"> | ||
<img | ||
src="{% static image_src %}" | ||
alt="" | ||
/> | ||
</picture> | ||
</div> |