-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path404.html
More file actions
92 lines (91 loc) · 2.32 KB
/
Copy path404.html
File metadata and controls
92 lines (91 loc) · 2.32 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ranpin - 学术分享</title>
<style>
body {
font-family: 'Inter', sans-serif;
margin: 0;
padding: 0;
background: #fafaf9;
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh;
}
.container {
text-align: center;
max-width: 500px;
padding: 40px 20px;
}
.icon {
font-size: 64px;
margin-bottom: 20px;
}
h1 {
color: #1f2937;
margin-bottom: 10px;
}
p {
color: #6b7280;
margin-bottom: 30px;
line-height: 1.6;
}
.btn {
display: inline-block;
background: #3b82f6;
color: white;
padding: 12px 24px;
text-decoration: none;
border-radius: 8px;
font-weight: 500;
transition: background 0.2s;
}
.btn:hover {
background: #2563eb;
}
.loading {
margin-top: 20px;
color: #9ca3af;
font-size: 14px;
}
</style>
<script type="text/javascript">
// GitHub Pages SPA 重定向脚本
(function(l) {
if (l.search[1] === '/' ) {
var decoded = l.search.slice(1).split('&').map(function(s) {
return s.replace(/~and~/g, '&')
}).join('?');
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
}(window.location))
</script>
</head>
<body>
<div class="container">
<div class="icon">🎓</div>
<h1>正在跳转...</h1>
<p>页面正在重定向到首页,请稍候...</p>
<a href="./index.html" class="btn">立即前往首页</a>
<div class="loading">如果页面没有自动跳转,请点击上方按钮</div>
</div>
<script type="text/javascript">
// GitHub Pages 路径重定向
var pathSegmentsToKeep = 0;
var l = window.location;
l.replace(
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') +
'/?/' +
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
l.hash
);
</script>
</body>
</html>