Skip to content

Commit cb57190

Browse files
committed
added 404 and 500 error page
1 parent b2fcf8d commit cb57190

File tree

3 files changed

+138
-0
lines changed

3 files changed

+138
-0
lines changed

static/error/css/style.css

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
* {
2+
-webkit-box-sizing: border-box;
3+
box-sizing: border-box;
4+
}
5+
6+
body {
7+
padding: 0;
8+
margin: 0;
9+
}
10+
11+
#notfound {
12+
position: relative;
13+
height: 100vh;
14+
}
15+
16+
#notfound .notfound {
17+
position: absolute;
18+
left: 50%;
19+
top: 50%;
20+
-webkit-transform: translate(-50%, -50%);
21+
-ms-transform: translate(-50%, -50%);
22+
transform: translate(-50%, -50%);
23+
}
24+
25+
.notfound {
26+
max-width: 410px;
27+
width: 100%;
28+
text-align: center;
29+
}
30+
31+
.notfound .notfound-404 {
32+
height: 280px;
33+
position: relative;
34+
z-index: -1;
35+
}
36+
37+
.notfound .notfound-404 h1 {
38+
font-family: 'Montserrat', sans-serif;
39+
font-size: 230px;
40+
margin: 0px;
41+
font-weight: 900;
42+
position: absolute;
43+
left: 50%;
44+
-webkit-transform: translateX(-50%);
45+
-ms-transform: translateX(-50%);
46+
transform: translateX(-50%);
47+
background: url('../img/bg.jpg') no-repeat;
48+
-webkit-background-clip: text;
49+
-webkit-text-fill-color: transparent;
50+
background-size: cover;
51+
background-position: center;
52+
}
53+
54+
55+
.notfound h2 {
56+
font-family: 'Montserrat', sans-serif;
57+
color: #000;
58+
font-size: 24px;
59+
font-weight: 700;
60+
text-transform: uppercase;
61+
margin-top: 0;
62+
}
63+
64+
.notfound p {
65+
font-family: 'Montserrat', sans-serif;
66+
color: #000;
67+
font-size: 14px;
68+
font-weight: 400;
69+
margin-bottom: 20px;
70+
margin-top: 0px;
71+
}
72+
73+
.notfound a {
74+
font-family: 'Montserrat', sans-serif;
75+
font-size: 14px;
76+
text-decoration: none;
77+
text-transform: uppercase;
78+
background: #0046d5;
79+
display: inline-block;
80+
padding: 15px 30px;
81+
border-radius: 40px;
82+
color: #fff;
83+
font-weight: 700;
84+
-webkit-box-shadow: 0px 4px 15px -5px #0046d5;
85+
box-shadow: 0px 4px 15px -5px #0046d5;
86+
}
87+
88+
89+
@media only screen and (max-width: 767px) {
90+
.notfound .notfound-404 {
91+
height: 142px;
92+
}
93+
.notfound .notfound-404 h1 {
94+
font-size: 112px;
95+
}
96+
}

static/error/img/bg.jpg

497 KB
Loading

templates/error.html

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
{% load static %}
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
9+
10+
<title>{{ message }}</title>
11+
12+
<!-- Google font -->
13+
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,900" rel="stylesheet">
14+
15+
<!-- Custom stlylesheet -->
16+
<link type="text/css" rel="stylesheet" href="{% static 'error/css/style.css' %}" />
17+
18+
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
19+
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
20+
<!--[if lt IE 9]>
21+
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
22+
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
23+
<![endif]-->
24+
25+
</head>
26+
27+
<body>
28+
29+
<div id="notfound">
30+
<div class="notfound">
31+
<div class="notfound-404">
32+
<h1>Oops!</h1>
33+
</div>
34+
<h2>{{ message }}</h2>
35+
<p>The page you are looking for might have been removed had its name changed or is temporarily unavailable.</p>
36+
<a href="{% url 'home' %}">Go To Homepage</a>
37+
</div>
38+
</div>
39+
40+
</body> -->
41+
42+
</html>

0 commit comments

Comments
 (0)