-
Notifications
You must be signed in to change notification settings - Fork 0
/
404.html
43 lines (40 loc) · 1.14 KB
/
404.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE HTML>
<html>
<head><meta name="generator" content="Hexo 3.8.0">
<title>404 | 找不到页面</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8;">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="robots" content="all">
<meta name="robots" content="index,follow">
<style>
.title {
font-weight: normal;
}
.box {
position: absolute;
text-align: center;
margin: auto;
top: 45%;
left: 0; right: 0;
}
a {
color: #39f;
text-decoration: none;
}
</style>
</head>
<body>
<div class="box">
<h2 class="title">404,页面不存在,请回到
<a href="/">首页</a>
</h2>
</div>
<script>
var title = document.getElementById("title");
var url = window.location.href;
var index = url.slice(0, url.length - 1).lastIndexOf('/') + 1;
title.style.color = '#f34';
title.innerText = decodeURI(url.slice(index).replace(/(\.html|\/)$/, ''));
</script>
</body>
</html>