Skip to content

Commit 72df05e

Browse files
committed
fix 404 meta redirect
1 parent 168ad09 commit 72df05e

File tree

1 file changed

+54
-7
lines changed

1 file changed

+54
-7
lines changed

public/404.html

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,67 @@
1919
if (resource.includes('blog')) {
2020
sessionStorage.redirect = resource
2121

22-
refresh = new HTMLMetaElement();
23-
refresh.content = "0;URL='/'";
24-
refresh.httpEquiv = 'refresh';
22+
refresh = document.createElement('meta')
23+
refresh.content = '0;URL=\'/\''
24+
refresh.httpEquiv = 'refresh'
2525

26-
document.head.append(refresh);
26+
document.head.append(refresh)
2727
}
2828
</script>
29+
30+
<style>
31+
* {
32+
transition: all 0.6s;
33+
}
34+
35+
html {
36+
height: 100%;
37+
}
38+
39+
body {
40+
font-family: 'Lato', sans-serif;
41+
color: #888;
42+
margin: 0;
43+
}
44+
45+
#main {
46+
display: table;
47+
width: 100%;
48+
height: 100vh;
49+
text-align: center;
50+
}
51+
52+
.fof {
53+
display: table-cell;
54+
vertical-align: middle;
55+
}
56+
57+
.fof h1 {
58+
font-size: 50px;
59+
display: inline-block;
60+
padding-right: 12px;
61+
animation: type .5s alternate infinite;
62+
}
63+
64+
@keyframes type {
65+
from {
66+
box-shadow: inset -3px 0 0 #888;
67+
}
68+
to {
69+
box-shadow: inset -3px 0 0 transparent;
70+
}
71+
}
72+
</style>
2973
</head>
3074

3175

3276
<body>
33-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
34-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
35-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
77+
<div id="main">
78+
<div class="fof">
79+
<h1>Error 404</h1>
80+
<p>Parece que essa página foi perdida.</p>
81+
</div>
82+
</div>
3683
</body>
3784

3885

0 commit comments

Comments
 (0)