-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
index.html
88 lines (87 loc) · 2.39 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<meta HTTP-EQUIV="expires" CONTENT="0">
<link rel="stylesheet" href="Css/vue.css">
<link rel="icon" href="./Images/logo.png" sizes="32x32">
<style>
version {
display: block;
text-align: center;
color: #42b983;
}
version select {
width: 63px;
height: 22px;
border: 1px solid #42b983;
color: #42b983;
border-radius: 5px;
position: relative;
top: -2px;
}
.app-nav {
right: 20px;
}
</style>
</head>
<body>
<nav>
<version>
文档版本:
<select id="docVersion" name="docVersion" onchange="docVersionFn(this)">
<option value="v2">v2.*.*</option>
<option value="v1" selected>v1.*.*</option>
<option value="v0">v1.0</option>
</select>
</version>
</nav>
<div id="app"></div>
<script>
window.$docsify = {
name: 'SimpleMemory',
requestHeaders: {
'cache-control': 'no-cache'
},
repo: 'https://github.com/BNDong/Cnblogs-Theme-SimpleMemory',
loadSidebar: true,
subMaxLevel: 3,
maxLevel: 5,
noEmoji: true,
// logo: "/Images/logo.png",
search: {
noData: {
'/': '没有结果'
},
paths: 'auto',
placeholder: {
'/': '搜索'
}
},
}
</script>
<script src="Js/docsify.min.js"></script>
<script src="Js/search.min.js"></script>
<script>
function docVersionFn(e) {
let origin = location.origin;
let pathname = location.pathname;
let pathnameArr = pathname.split('/');
for (let i = pathnameArr.length - 1; i >= 0; i--) {
if (pathnameArr[i] !== "" && /v[0-9]{1}/.test(pathnameArr[i])) {
pathnameArr[i] = e.value;
break;
}
}
window.location.href = origin + pathnameArr.join('/');
}
</script>
</body>
</html>