-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (47 loc) · 1.43 KB
/
index.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
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Changbai's Wiki</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">
</head>
<body>
<nav>
<a id=nav-en>EN</a>
<a id="nav-zh">中文</a>
</nav>
<script>
var navZH = document.querySelector("#nav-zh")
navZH.addEventListener("click", (e)=>{
var hashPath = location.hash.split('#/')[1]
if (hashPath.substr(0,5) !== "zh-cn") hashPath = '/zh-cn/' + hashPath
location.hash = (`#${hashPath}`)
})
var navEN = document.querySelector("#nav-en")
navEN.addEventListener("click", (e)=>{
var hashPath = location.hash.split('#/')[1]
if (hashPath.substr(0,5) === "zh-cn") hashPath = hashPath.substr(5)
location.hash = (`#${hashPath}`)
})
</script>
<div id="app"></div>
<script>
window.$docsify = {
name: "",
repo: "https://github.com/dotcli/knowledge/",
loadSidebar: true,
// routerMode: 'history'
// alias: {
// '/zh-cn/(.*)': '/zh-cn/(.*)'
// }
}
</script>
<!-- Development -->
<script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<!-- Docsify v4 -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
</body>
</html>