Skip to content

Commit

Permalink
Merge pull request #158 from springload/fix/404-basic-styling
Browse files Browse the repository at this point in the history
Basic 404 page styling
  • Loading branch information
liamjohnston authored Aug 5, 2024
2 parents e0d1f41 + fa4cebe commit 16a5ee8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
8 changes: 8 additions & 0 deletions cdhweb/static_src/global/pages/error-page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.error-page__content {
// big space because page has no hero area
margin-block: 120px;
}

.error-page__blurb {
margin-block-start: 20px;
}
1 change: 1 addition & 0 deletions cdhweb/static_src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
@import './global/pages/search.scss';
@import './global/pages/projects-landing.scss';
@import './global/pages/project-page.scss';
@import './global/pages/error-page.scss';

// Spacing between each type of typographic element.
@import './global/rich-text';
Expand Down
4 changes: 0 additions & 4 deletions templates/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@

{% 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 error-image %}
<img src="{% static 'img/cdh-logo-assets/CDH_logo_notfound.svg' %}" alt="CDH logo with text faded and the words can't find it overlaid">
{% endblock %}
14 changes: 6 additions & 8 deletions templates/error_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
{% block page-title %}Error{% endblock %}

{% block main %}
<article class="error-page">
<h1>{% block error-code %}{% endblock %}</h1>
<p>{% block message %}{% endblock %}</p>
{% block error-image %}
<img src="{% static 'img/cdh-logo-assets/CDH_logo_warped.svg' %}" alt="warped version of CDH logo">
{% endblock %}
</article>

<div class="content-width grid-standard page-layout page-layout--without-sidenav error-page__content">
<div class="page-layout__main-content">
<h1>Error {% block error-code %}{% endblock %}</h1>
<p class="error-page__blurb">{% block message %}{% endblock %}</p>
</div>
</div>
{% endblock %}

0 comments on commit 16a5ee8

Please sign in to comment.