-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (54 loc) · 1.67 KB
/
Copy pathindex.html
File metadata and controls
56 lines (54 loc) · 1.67 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
<style>
body {
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
text-align: center;
padding: 2rem;
background: #f5f5f5;
}
.container {
max-width: 500px;
margin: 0 auto;
background: white;
padding: 2rem;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
a {
color: #0366d6;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
<script>
// fetch browser language
const userLang = navigator.language || navigator.userLanguage;
const cnPath = '/cn/home.html';
const enPath = '/en/home.html';
// jump to English or Chines home page based on detected browser language
let targetPath = enPath; // default in English
if (userLang && userLang.toLowerCase().startsWith('en')) {
targetPath = enPath;
}
window.location.replace(targetPath);
</script>
</head>
<body>
<div class="container">
<p>Redirecting to the appropriate language version...</p>
<p>If you are not redirected automatically, please choose manually:</p>
<p>
<a href="/cn/home.html">中文</a> |
<a href="/en/home.html">English</a>
</p>
</div>
</body>
</html>