Skip to content

Commit

Permalink
Change 400 image to be background, Add styling and 500.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Edb83 committed Jun 2, 2021
1 parent 4aa7433 commit 1451a1f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 19 deletions.
15 changes: 8 additions & 7 deletions static/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -535,20 +535,21 @@ input[type=number] {

/* 404 page */

.background-404 {
background-image: url('/media/404.svg');
background-size: 25vh;
background-repeat: no-repeat;
background-position: bottom;
background-position-x: right;
}

.dead-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

.bottom-right {
position: absolute;
top: 80%;
left: 84%;
transform: translate(-50%, -50%);
}

/* Media queries */

@media (min-width: 1024px) {
Expand Down
24 changes: 12 additions & 12 deletions templates/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
{% load static %}
{% block extra_title %} - 404{% endblock %}
{% block content %}
<div class="dead-center">
<h1>Oops! Page not found!</h1>
<div>
<a href="{% url 'products' %}" class="btn btn-outline-dark mt-5">
<span class="icon">
<i class="fas fa-chevron-left"></i>
</span>
Juices
</a>
<div class="background-404">
<div class="dead-center">
<h1>Oops! Page not found!</h1>
<div>
<a href="{% url 'products' %}" class="btn btn-outline-dark mt-2">
<span class="icon">
<i class="fas fa-chevron-left"></i>
</span>
Back to the Juice!
</a>
</div>
</div>
</div>
<div class="bottom-right">
<img src="{{ MEDIA_URL }}404.svg" alt="">
</div>

{% endblock %}
19 changes: 19 additions & 0 deletions templates/500.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% extends "base.html" %}
{% load static %}
{% block extra_title %} - 500{% endblock %}
{% block content %}
<div class="background-404">
<div class="dead-center">
<h1>Uh oh! Problems here...</h1>
<div>
<a href="{% url 'products' %}" class="btn btn-outline-dark mt-2">
<span class="icon">
<i class="fas fa-chevron-left"></i>
</span>
Back to the Juice!
</a>
</div>
</div>
</div>

{% endblock %}

0 comments on commit 1451a1f

Please sign in to comment.