-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (81 loc) · 2.36 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
89
90
91
<!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">
<style>
.sidebar-nav a:before,
.app-sub-sidebar li:before {
content: none !important;
}
::-webkit-scrollbar {
width: 6px !important;
height: 6px !important;
}
body::-webkit-scrollbar {
width: 6 px !important;
height: 6px !important;
}
::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.8) !important;
border-radius: 8px !important;
}
::-webkit-scrollbar-thumb {
background-color: #585B62 !important;
min-height: 50px;
border-radius: 5px !important;
}
html.in-iframe,
html.in-iframe body,
html.in-iframe .sidebar {
background-color: transparent !important;
--sidebar-toggle-background: transparent;
}
</style>
</head>
<body>
<div id="app"></div>
<script>
function addCss(href) {
var link = document.createElement('link');
link.href = href
link.rel = 'stylesheet'
document.documentElement.appendChild(link)
}
const theme = location.hash.match(/theme=(.+)/)?.[1] ?? location.search.match(/theme=(.+)/)?.[1];
console.log(theme)
addCss(theme == 'light' ? 'docsify/light.css' : 'docsify/dark.css')
// https://docsify.js.org/#/zh-cn/configuration
// https://jhildenbiddle.github.io/docsify-themeable/#/customization?id=theme-styles
window.$docsify = {
name: '',
repo: '',
maxLevel: 4,
subMaxLevel: 2,
loadSidebar: true,
loadNavbar: true,
alias: {
'/.*/_navbar.md': '/_navbar.md',
// '/en/(.*)': 'https://raw.githubusercontent.com/en/$1'
}
}
</script>
<script src="docsify/docsify.min.js"></script>
<script>
window.addEventListener('click', (event) => {
const target = event.target;
const href = target && event.target.getAttribute("href");
if (href && href.startsWith("#") && !href.includes("?id")) {
scrollTo(0, 0)
}
})
if (window.self !== window.top) {
document.documentElement.classList.add('in-iframe');
}
</script>
</body>
</html>