-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
174 lines (158 loc) · 6.51 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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta charset="UTF-8" />
<link rel="stylesheet" href="/src/docsify/css/vue.css" />
<script src="/src/docsify/vue.global.prod.js"></script>
<meta http-equiv="Cache-Control" content="max-age=0" />
<meta name="description" content="wyf9's Homepage" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?" />
</head>
<script>
// 日期字符串转换为日期对象的函数
function parseDate(input) {
var parts = input.split("-");
// 注意:月份需要减去 1,因为 JavaScript 中月份是从 0 开始计数的
return new Date(parts[0], parts[1] - 1, parts[2]);
}
</script>
<body>
<div id="app">Loading</div>
<script>
window.$docsify = {
//...
relativePath: true,
loadSidebar: true,
subMaxLevel: 4,
loadNavbar: false,
repo: "wyf9/home",
maxLevel: 6,
auto2top: true,
executeScript: true,
notFoundPage: true,
search: "auto",
coverpage: false, // disable cover
count: {
countable: true,
fontsize: "0.9em",
color: "rgb(90,90,90)",
language: "chinese",
},
tabs: {
theme: "material",
},
// 让你的内容页在滚动到指定的锚点时,距离页面顶部有一定空间。
topMargin: 25, // default: 0
// 回到顶部
scrollToTop: {
auto: true,
text: '↑Top↑',
right: 12,
bottom: 52,
offset: 25
},
plugins: [
function (hook, vm) {
hook.beforeEach(function (html) {
var url =
"https://github.com/wyf9/home/blob/main/" + vm.route.file;
var editHtml =
"📝 [在 GitHub 上编辑 / Edit on GitHub](" + url + ")";
const ctext =
"Copyright ©(year) [wyf9](https://wyf9.top). All Rights Reserved.";
const powered =
"Powered by [Docsify](https://docsify.js.org) / [Cloudflare Pages](https://pages.cloudflare.com)";
const currentYear = new Date().getFullYear();
const rtxt = ctext.replace("(year)", currentYear);
// 创建某日和今天的日期对象
const startDate = parseDate("2024-02-13"); // 替换为您要计算的某日
const today = new Date();
// 计算时间差
const timeDiff = Math.abs(today.getTime() - startDate.getTime());
const diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24)); // 将毫秒转换为天数并向上取整
const dateDiff = `本站已运行 ${diffDays} 天`;
const buildInfo =
"Build: [[ENV_build]](https://github.com/wyf9/home/commit/[ENV_build])@[ENV_build_branch] - [ENV_build_time] (UTC)";
/*fetch('https://v1.hitokoto.cn')
.then(response => response.json())
.then(data => {
if (data.from_who == null) {
sentence = `\n\n${data.hitokoto} --「${data.from}」 [[Hitokoto]](https://hitokoto.cn/?uuid=${data.uuid})`
}
else {
sentence = `\n\n${data.hitokoto} -- ${data.from_who}「${data.from}」[[Hitokoto]](https://hitokoto.cn/?uuid=${data.uuid})`
}})
.catch(console.error)
*/
return (
html +
"\n\n----\n\n" +
editHtml +
"\n\n" +
rtxt +
"\n\n" +
powered +
"\n\n" +
dateDiff +
"\n\n" +
buildInfo
// + sentence
);
});
},
],
};
</script>
<script src="/src/docsify/docsify.js"></script>
<script src="/src/docsify/lib/emoji.js"></script>
<script src="/src/docsify/lib/search.js"></script>
<script src="/src/docsify/lib/external-script.js"></script>
<script src="/src/docsify/lib/zoom-image.js"></script>
<script src="/src/docsify/lib/docsify-copy-code.js"></script>
<script src="/src/docsify/lib/countable.js"></script>
<script src="/src/docsify/lib/docsify-scroll-to-top.js"></script>
<script src="/src/docsify/lib/docsify-tabs.js"></script>
<link rel="stylesheet" href="/src/docsify/css/docsify-darklight-theme-style.css" title="docsify-darklight-theme"
type="text/css" />
<script src="/src/docsify/lib/docsify-darklight-theme.js" type="text/javascript"></script>
<script src="/src/js/copy.js" defer></script>
<script src="/src/js/copyn.js" defer></script>
<script src="/src/js/copym.js" defer></script>
<script src="/src/js/copyright.js"></script>
<!-- Prism Code Highlight -->
<script src="/src/docsify/prism/prism-css.min.js" defer></script>
<script src="/src/docsify/prism/prism-bash.min.js" defer></script>
<script src="/src/docsify/prism/prism-batch.min.js" defer></script>
<script src="/src/docsify/prism/prism-csv.min.js" defer></script>
<script src="/src/docsify/prism/prism-docker.min.js" defer></script>
<script src="/src/docsify/prism/prism-git.min.js" defer></script>
<script src="/src/docsify/prism/prism-http.min.js" defer></script>
<script src="/src/docsify/prism/prism-icon.min.js" defer></script>
<script src="/src/docsify/prism/prism-ignore.min.js" defer></script>
<script src="/src/docsify/prism/prism-ini.min.js" defer></script>
<script src="/src/docsify/prism/prism-json.min.js" defer></script>
<script src="/src/docsify/prism/prism-json5.min.js" defer></script>
<script src="/src/docsify/prism/prism-powershell.min.js" defer></script>
<script src="/src/docsify/prism/prism-python.min.js" defer></script>
<script src="/src/docsify/prism/prism-systemd.min.js" defer></script>
<script src="/src/docsify/prism/prism-visual-basic.min.js" defer></script>
<script src="/src/docsify/prism/prism-yaml.min.js" defer></script>
<script src="/src/docsify/prism/prism-c.min.js" defer></script>
<script src="/src/docsify/prism/prism-cpp.min.js" defer></script>
<style>
:root {
--docsifytabs-tab-highlight-color: green;
}
</style>
<!-- function #1 used by /note/cpp/README.md - jump-->
<script>
function p_note_cpp_readme_jump() {
var inputValue = document.getElementById("inputBox").value;
var url = "http://oj.xw3q.cn:9905/problem.php?id=" + inputValue;
window.location.href = url;
}
</script>
</body>
</html>