-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
338 lines (288 loc) · 13.3 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
<!DOCTYPE html>
<!--[if lt IE 7]>
<html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en">
<![endif]-->
<!--[if IE 7]>
<html class="no-js lt-ie9 lt-ie8" lang="en">
<![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en">
<![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<!--[if IE]>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<![endif]-->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" name="viewport">
<meta content="HGNULB,programmer,full stack engineer,java,golang,python,走在修行的大街上,程序员,全栈工程师" name="keywords"/>
<!-- Begin Jekyll SEO tag v2.8.0 -->
<title>走在修行的大街上 | 小兵的 BLOG</title>
<meta name="generator" content="Jekyll v4.3.4" />
<meta property="og:title" content="走在修行的大街上" />
<meta name="author" content="HGNULB" />
<meta property="og:locale" content="en" />
<meta name="description" content="小兵的 BLOG" />
<meta property="og:description" content="小兵的 BLOG" />
<link rel="canonical" href="https://hgnulb.github.io/blog/" />
<meta property="og:url" content="https://hgnulb.github.io/blog/" />
<meta property="og:site_name" content="走在修行的大街上" />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary" />
<meta property="twitter:title" content="走在修行的大街上" />
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"WebSite","author":{"@type":"Person","name":"HGNULB"},"description":"小兵的 BLOG","headline":"走在修行的大街上","name":"走在修行的大街上","url":"https://hgnulb.github.io/blog/"}</script>
<!-- End Jekyll SEO tag -->
<link href="https://cdn.jsdelivr.net/gh/hgnulb/blog@gh-pages/assets/images/theme/favicon.svg" rel="shortcut icon" type="image/x-icon">
<link href="https://cdn.jsdelivr.net/gh/hgnulb/blog@gh-pages/assets/images/theme/favicon.svg" rel="icon" type="image/x-icon">
<link href='/blog/assets/libs/fullPage.js/fullpage.min.css' rel="stylesheet" type="text/css">
<link href='/blog/assets/libs/stylesheets/home.css' rel="stylesheet" type="text/css">
<title></title>
<!--jquery插件-->
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
<!--字体图标-->
<link href="https://cdn.jsdelivr.net/gh/hgnulb/blog@gh-pages/assets/libs/fontawesome/css/all.min.css" rel="stylesheet">
<!--Tippy.js插件-->
<link href="https://cdn.jsdelivr.net/npm/tippy.js/animations/shift-away.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/tippy.js/themes/translucent.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/tippy.js/dist/tippy-bundle.umd.js"></script>
<!--其他插件-->
<script src="https://cdn.jsdelivr.net/npm/npm-modernizr/modernizr.min.js"></script>
<!--顶部进度条-->
<script src="https://cdn.jsdelivr.net/npm/pace-js@latest/pace.min.js"></script>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<script>
if (window.location.pathname === '/blog') {
window.location.replace('/blog/');
}
function getPropertyValue(propertyName) {
let style = window.getComputedStyle(document.documentElement);
return style.getPropertyValue(propertyName);
}
const setProperty = (propertyName, propertyValue) => {
document.documentElement.style.setProperty(propertyName, propertyValue);
};
function typedEntryTitle() {
window.addEventListener("DOMContentLoaded", function () {
let entryTitle = document.querySelector(".entry-title");
let pageTitle = "";
let index = 0;
function typedTitle() {
if (index <= pageTitle.length) {
entryTitle.innerText = `${pageTitle.slice(0, index++)}|`;
setTimeout(typedTitle, 100);
} else {
entryTitle.innerText = pageTitle;
}
}
typedTitle();
});
}
function changePoint(url, id) {
let target = document.getElementById(id.replace("#", ""));
if (null === target || target === undefined) {
document.location.href = url;
} else {
target.scrollIntoView(true);
}
sessionStorage.setItem("location", id.replace("#", ""));
}
const imgError = image => {
image.onerror = null;
if ("true" === "true") {
image.src = `https://cdn.jsdelivr.net/gh/hgnulb/blog@gh-pages/assets/images/theme/err-img.svg`;
} else {
image.src = `/blog/assets/images/theme/err-img.svg`;
}
$(image).css("width", "100px");
return true;
};
function tippyConfigure() {
tippy("[data-tippy-content]", {
theme: "translucent",
animation: "shift-away",
inertia: true,
allowHTML: true
});
}
function initContents() {
let markdownToc = $("#markdown-toc");
if (markdownToc.length) {
$("#sidebar-toc-content").append(markdownToc.html());
let toc = $("#markdown-toc, #sidebar-toc-content").find("a");
if (toc.length) {
toc.each(function () {
let id = $(this).attr("href");
$(this).attr("data-tippy-content", $(this).html());
$(this).on("click", function (e) {
e.preventDefault();
changePoint(id, id);
});
});
}
}
}
function generateContents() {
let markdownToc = $("#markdown-toc");
if (markdownToc.length) {
if ($(window).width() >= 1366) {
markdownToc.css("display", "none");
$("#page").css("margin-left", getPropertyValue("--sidebar-width"));
$(".sidebar").css("display", "block");
$(".nav-global .btn-contents").removeClass("hidden");
} else {
markdownToc.css("display", "inline-block");
$(".sidebar").css("display", "none");
$(".nav-global .btn-contents").addClass("hidden");
$("#page").css("margin-left", "0px");
}
}
}
function contentsToggle() {
initContents();
generateContents();
$(window).resize(generateContents);
$(".nav-global .btn-contents").on("click", function () {
let click = $(this).data("clicks");
if (click) {
$(this).find("i").removeClass("fa-arrow-right-long").addClass("fa-arrow-left-long");
$(".sidebar").css("display", "block");
$("#page").css("margin-left", getPropertyValue("--sidebar-width"));
} else {
$(this).find("i").removeClass("fa-arrow-left-long").addClass("fa-arrow-right-long");
$(".sidebar").css("display", "none");
$("#page").css("margin-left", "0px");
}
$(this).data("clicks", !click);
});
}
function themeToggle() {
let themeMode = $(".theme-mode");
if (localStorage.toggled === "light") {
document.documentElement.classList.add("light");
themeMode.find("i").removeClass("fa-toggle-off").addClass("fa-toggle-on");
} else {
document.documentElement.classList.remove("light");
themeMode.find("i").removeClass("fa-toggle-on").addClass("fa-toggle-off");
}
themeMode.on("click", function () {
document.documentElement.classList.toggle("light");
if (localStorage.toggled !== "light") {
localStorage.toggled = "light";
$(this).find("i").removeClass("fa-toggle-off").addClass("fa-toggle-on");
} else {
localStorage.toggled = "dark";
themeMode.find("i").removeClass("fa-toggle-on").addClass("fa-toggle-off");
}
});
}
function jumpLocation() {
let location = sessionStorage.getItem("location");
sessionStorage.removeItem("location");
if (location == null) {
return;
}
let target = document.getElementById(location);
if (target != null) {
target.scrollIntoView(true);
}
}
window.onload = function () {
jumpLocation();
};
$(function () {
themeToggle();
contentsToggle();
tippyConfigure();
});
</script>
</head>
<body>
<canvas id="universe"></canvas>
<!--[if IE]>
<p class="site-notice">您正在使用一个过时的网页浏览器。<a href="https://browsehappy.com/" target="_blank">请升级您的浏览器。</a></p>
<![endif]-->
<noscript>
<p class="site-notice">本网站需要 JavaScript。<a href="https://www.enable-javascript.com/" target="_blank">请查阅指南来给您的浏览器开启 JavaScript 功能。</a></p>
</noscript>
<div id="full-page">
<div class="section" id="section0">
<div class="headings animate__animated animate__bounce">
<h1>HGNULB</h1>
<h2>A blog that you won't read</h2>
<h3>后端开发工程师</h3>
</div>
<div class="typed-wrap">
<span id="typed"></span>
</div>
<a class="btn-continue animate__animated animate__bounce" data-tippy-content="More" onclick="fullpage_api.moveSectionDown();"><i class="fas fa-chevron-down"></i></a>
</div>
<div class="section" id="section1">
<h1 class="animate__animated hidden">
<a class="btn-enter btn-light" data-tippy-content="Enter Blog" href="/blog/home/">Enter Blog</a>
</h1>
<div class="social-links animate__animated hidden">
<a class="btn-light ico-gmail" data-tippy-content="email" href="mailto:[email protected]" rel="me" target="_blank"></a>
<a class="btn-light ico-leetcode" data-tippy-content="leetcode" href="https://leetcode.cn/u/hgnulb/" rel="me" target="_blank"></a>
<a class="btn-light ico-github" data-tippy-content="github" href="https://github.com/hgnulb/" rel="me" target="_blank"></a>
<a class="btn-light ico-douban" data-tippy-content="douban" href="https://book.douban.com/people/257597606/" rel="me" target="_blank"></a>
<a class="btn-light ico-stackoverflow" data-tippy-content="stackoverflow" href="https://stackoverflow.com/users/10383025/" rel="me" target="_blank"></a>
<a class="btn-light ico-nowcoder" data-tippy-content="nowcoder" href="https://www.nowcoder.com/profile/8667211/" rel="me" target="_blank"></a>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/gh/hgnulb/blog@gh-pages/assets/libs/fullPage.js/fullpage.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/hgnulb/blog@gh-pages/assets/libs/javascripts/canvas-bg.js"></script>
<script src="https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js"></script>
<script>
function fullPageScroll() {
$("#full-page").fullpage({
fixedElements: ".site-notice",
resize: false,
scrollingSpeed: 500,
afterLoad: function (origin) {
if (origin.index === 1) {
$("#section0 .headings").removeClass("hidden").addClass("animate__fadeInDown");
$("#section0 .btn-continue").removeClass("hidden").addClass("animate__bounce");
}
if (origin.index === 0) {
$("#section1 h1, #section1 .social-links").removeClass("hidden").addClass("animate__fadeInUp");
}
},
onLeave: function (origin, destination, direction) {
if (origin.index === 0 && direction === "down") {
$("#section0 .headings, #section0 .btn-continue").addClass("hidden").removeClass("animate__bounce animate__fadeInDown animate__wobble");
}
if (origin.index === 1 && direction === "up") {
$("#section1 h1, #section1 .social-links").addClass("hidden").removeClass("animate__fadeInUp");
}
}
});
}
function typed() {
new Typed("#typed", {
strings: ["选择比努力更重要,观念比选择更重要。"],
typeSpeed: 120,
backSpeed: 0,
loop: true
});
}
function keyup() {
document.addEventListener("keyup", function (event) {
let key = event.key;
if ("Enter" === key) {
fullpage_api.moveSectionDown();
}
});
}
$(function () {
fullPageScroll();
keyup();
typed();
});
</script>
</body>
</html>