-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
177 lines (176 loc) · 6.01 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>xuetengfei</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"
/>
<link
rel="shortcut icon"
href="https://loremxuetengfei.oss-cn-beijing.aliyuncs.com/xtf-favicon-1558630625.ico"
/>
<link rel="stylesheet" href="./_set/vue.css" />
<link rel="stylesheet" href="./_set/xue.css" />
<link
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css"
/>
<script>
(function (doc, win) {
return;
var docEl = doc.documentElement,
resizeEvt =
'orientationchange' in window ? 'orientationchange' : 'resize',
recalc = function () {
var clientWidth = docEl.clientWidth;
if (!clientWidth) return;
docEl.style.fontSize = 20 * (clientWidth / 750) + 'px';
};
recalc();
if (!doc.addEventListener) return;
win.addEventListener(resizeEvt, recalc, false);
})(document, window);
</script>
</head>
<body>
<nav>
<ul>
<li><a href="#/">Home</a></li>
<li><a href="#/React/react">React</a></li>
<li>
<a href="https://xtf-bookmarks.vercel.app/" target="_blank"
>Bookmarks</a
>
</li>
<li>
<a href="#" id="Mode">Mode</a>
</li>
</ul>
</nav>
<div id="app">Welcome to visit My Blog,Please wait...</div>
<script>
window.$docsify = {
name: '',
repo: 'https://github.com/xuetengfei/xuetengfei.github.io',
// loadNavbar: true,
loadSidebar: true,
subMaxLevel: 1,
auto2top: true,
autoHeader: true,
themeColor: '#439DD8',
mergeNavbar: true,
formatUpdated: '{YYYY}-{MM}-{DD} {HH}:{mm}',
pagination: {
previousText: '上一章节',
nextText: '下一章节',
crossChapter: true,
},
search: {
maxAge: 864000000, // 过期时间,单位毫秒,默认一天
paths: 'auto',
placeholder: {
'/': 'search',
},
noData: 'No Results!',
depth: 6,
},
plugins: [
function (hook) {
hook.init(function () {
// 初始化完成后调用,只调用一次,没有参数。
console.log('初始化完成后调用,只调用一次,没有参数。init');
// window.$('.content').createTOC({
// title: 'jQueryScript',
// insert: '.sidebar',
// });
});
// const footer = '';
hook.beforeEach(function (content) {
// const pageHash = window.location.hash.slice(2);
// return content;
});
hook.doneEach(function () {});
hook.ready(function () {
// const footer = '<div id="gitalk-container">xxxx</div>';
// console.log('初始化完成后调用,只调用一次,没有参数。 ready');
// // 初始化并第一次加载完成数据后调用,没有参数。
// return content + footer;
});
},
],
// 启用相对路径
relativePath: true,
// toc: {
// scope: '.markdown-section',
// headings: 'h1, h2, h3, h4, h5, h6',
// },
};
</script>
<script src="./_set/docsify.min.js.js"></script>
<script src="./_set/docsify-pagination.min.js"></script>
<script src="./_set/zoom-image.min.js"></script>
<script src="./_set/prism-python.min.js"></script>
<script src="./_set/prism-sass.min.js"></script>
<script src="./_set/[email protected]"></script>
<script src="./_set/plugins/external-script.js"></script>
<script src="./_set/plugins/search.min.js"></script>
<!-- <script src="./_set/toc.js"></script> -->
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/gitalk.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js"></script>
<script src="//unpkg.com/mermaid/dist/mermaid.js"></script>
<script src="//unpkg.com/docsify-mermaid@latest/dist/docsify-mermaid.js"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
<script>
var gitalk = new Gitalk({
clientID: 'da901149791c3731159e',
clientSecret: 'e6ed5e3cbabfd0abd6572f5fffbb8191d7d83f72',
repo: 'xuetengfei.github.io',
owner: 'xuetengfei',
admin: ['xuetengfei'],
id: decodeURI(window.location.hash.slice(2)).slice(0, 40), // Ensure uniqueness and length less than 50
distractionFreeMode: false, // Facebook-like distraction free mode
});
</script>
<script>
let BodyDom, AsideDom, evt;
window.onload = function () {
console.log('BodyDom', BodyDom);
if (!BodyDom) {
BodyDom = document.getElementsByTagName('body')[0];
console.log('BodyDom', BodyDom);
}
};
document.getElementById('Mode').addEventListener('click', function () {
BodyDom.classList.toggle('Dark');
});
function handleKeydown(evt) {
evt = evt ? evt : window.event;
console.log('evt', evt);
if (evt.keyCode) {
if (evt.keyCode == 76) {
BodyDom.classList.toggle('close');
}
if (evt.keyCode == 79) {
// keyboard: control +l
window.scroll(0, 0);
}
if (evt.keyCode == 72) {
// keyboard: control + h
// go Home
window.location = '#';
}
}
}
window.document.onkeydown = handleKeydown;
// if (typeof navigator.serviceWorker !== 'undefined') {
// navigator.serviceWorker.register('./sw.js');
// }
</script>
</body>
</html>