Skip to content

Commit 5d8842d

Browse files
nkprince007hemangsk
authored andcommitted
Add custom 404 page
Fixes #360
1 parent 936951b commit 5d8842d

File tree

3 files changed

+113
-0
lines changed

3 files changed

+113
-0
lines changed

404.html

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
---
3+
<!DOCTYPE html>
4+
<html>
5+
<head>
6+
<title>Page Not Found | {{ site.title }}</title>
7+
<meta charset="utf-8">
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
9+
<style>
10+
.hidden-until-ready {
11+
visibility: hidden;
12+
}
13+
</style>
14+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
15+
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script>
16+
<link rel="stylesheet" href="resources/vendors/materialize/css/materialize.css">
17+
<link rel="stylesheet" href="resources/css/404.css">
18+
<link rel="stylesheet" href="https://rawgit.com/coala/coalaCSS/master/coala.css">
19+
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:300,300i,400,400i,700,700i|Roboto:100,200,300,400,500,600,700,800,900|Ubuntu+Mono|Overpass+Mono|Inconsolata" rel="stylesheet">
20+
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
21+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
22+
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
23+
</head>
24+
<body class="hidden-until-ready">
25+
<main>
26+
<div class="coala-book container">
27+
<img src="resources/images/coala-404.png" alt="missing coala in shock">
28+
</div>
29+
<div class="error container">
30+
<h3 class="message">Oops! That was unexpected...</h3>
31+
<p><span>coala</span> couldn't find the page you're looking for.</p>
32+
<div class="buttons center">
33+
<a href="/" class="btn home">Crawl back home</a>
34+
</div>
35+
</div>
36+
</main>
37+
<footer class="page-footer footer-light transparent">
38+
<div class="row">
39+
<div class="col m6 s12 offset-m3 center"> <img class="footer-logo" src="https://api.coala.io/en/latest/_static/images/coala_logo.svg" alt="coala"> <span class="footer-title">{{ site.organization }}</span> </div>
40+
</div>
41+
<div class="footer-small-title center"> <span class="blue-grey-text text-lighten-3 uppercase"> Licensed under {{ site.license }}</span> </div>
42+
</footer>
43+
<script>
44+
window.onload = (e) => {
45+
document.querySelectorAll(".hidden-until-ready").forEach(el => {
46+
el.classList.remove('hidden-until-ready');
47+
});
48+
};
49+
</script>
50+
</body>
51+
</html>

resources/css/404.css

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
html, body {
2+
padding: 0;
3+
margin: 0;
4+
width: 100%;
5+
height: 100%;
6+
overflow-x: hidden;
7+
}
8+
main {
9+
display: flex;
10+
flex-direction: row;
11+
justify-content: center;
12+
align-items: center;
13+
background-color: #fafafa;
14+
}
15+
main .container {
16+
padding: 3% 5%;
17+
}
18+
.error {
19+
margin-left: -12.5%;
20+
font-family: "Open Sans","Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;
21+
}
22+
.error .message {
23+
display: block;
24+
font-weight: bold;
25+
font-size: 4.5vw;
26+
color: #004D40;
27+
}
28+
.error p {
29+
font-size: 2vw;
30+
font-weight: 200;
31+
}
32+
.error p span {
33+
font-weight: 400;
34+
}
35+
.error .home {
36+
text-transform: uppercase;
37+
}
38+
.error .buttons {
39+
padding: 3%;
40+
}
41+
.coala-book {
42+
text-align: center;
43+
opacity: 0.85;
44+
}
45+
.coala-book img {
46+
width: 80%;
47+
}
48+
@media only screen and (max-width:760px) {
49+
main {
50+
flex-direction: column;
51+
}
52+
.error {
53+
margin-left: auto;
54+
text-align: center;
55+
}
56+
.error p {
57+
font-size: 3.5vw;
58+
}
59+
.coala-book img {
60+
width: 100%;
61+
}
62+
}

resources/images/coala-404.png

16.8 KB
Loading

0 commit comments

Comments
 (0)