-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
367 lines (271 loc) · 12.1 KB
/
index.html
File metadata and controls
367 lines (271 loc) · 12.1 KB
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>記路</title>
<meta name="description" content="千里之行,始于足下。<br/>
持续探索中……" />
<link rel="shortcut icon" href="https://goroyal.github.io/favicon.ico?v=1666794232793">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css">
<link href="https://cdn.jsdelivr.net/npm/remixicon@2.3.0/fonts/remixicon.css" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Droid+Serif:400,700">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
<link rel="stylesheet" href="https://goroyal.github.io/styles/main.css">
</head>
<body>
<div class="main px-4 flex flex-col lg:flex-row">
<div id="sidebar" class="sidebar-wrapper lg:static lg:w-1/4">
<div class="lg:sticky top-0">
<div class="sidebar-content">
<div class="flex lg:block p-4 lg:px-0 items-center fixed lg:static lg:block top-0 right-0 left-0 bg-white z-50">
<i class="ri-menu-2-line lg:mt-4 text-2xl cursor-pointer animated fadeIn" onclick="openMenu()"></i>
<a href="https://goroyal.github.io">
<img class="animated fadeInLeft avatar rounded-lg mx-4 lg:mt-32 lg:mx-0 mt-0 lg:w-24 lg:h-24 w-12 w-12" src="https://goroyal.github.io/images/avatar.png?v=1666794232793" alt="">
</a>
<h1 class="animated fadeInLeft lg:text-4xl font-extrabold lg:mt-8 mt-0 text-xl" style="animation-delay: 0.2s">記路</h1>
</div>
<div class="animated fadeInLeft" style="animation-delay: 0.4s">
<p class="my-4 text-gray-600 font-light hidden lg:block">
千里之行,始于足下。<br/>
持续探索中……
</p>
<div class="animated fadeInLeft social-container hidden lg:block" style="animation-delay: 0.6s">
<a href="https://github.com/goroyal" target="_blank" class="mr-4 text-xl text-gray-400 font-light hover:text-gray-900">
<i class="ri-github-line"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="menu-container">
<i class="ri-arrow-left-line text-2xl cursor-pointer animated fadeIn close-menu-btn" onclick="closeMenu()"></i>
<div>
<a href="/" class="menu" style="animation-delay: 0s">
首页
</a>
<a href="/archives" class="menu" style="animation-delay: 0.2s">
归档
</a>
<a href="/tags" class="menu" style="animation-delay: 0.4s">
标签
</a>
<a href="/post/about" class="menu" style="animation-delay: 0.6000000000000001s">
关于
</a>
<a href="/post/links" class="menu" style="animation-delay: 0.8s">
友链
</a>
</div>
<div class="site-footer">
<div class="py-4 text-gray-700">Powered by <a href="https://github.com/getgridea/gridea" target="_blank">Gridea</a> | © 2022 翊廷</div>
<a class="rss" href="https://goroyal.github.io/atom.xml" target="_blank">RSS</a>
</div>
</div>
<div class="mask" onclick="closeMenu()">
</div>
<div class="content-wrapper py-32 lg:p-8 lg:w-3/4">
<h2 class="latest-article text-lg text-gray-700 mb-8">
<i class="ri-article-line"></i>
最新文章
</h2>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${0 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/tang-dynasty-bizarre-anecdote/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">影视 - 唐朝诡事录</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-10-26 / 4 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${1 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/the-moon-and-sixpence/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">读书 - 月亮与六便士</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-10-26 / 1 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${2 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/trie/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">数据结构 - trie 树</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-08-10 / 0 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${3 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/kmp/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">算法 - KMP 文本搜索</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-08-10 / 0 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${4 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/sentinel-in-compilers/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">算法 - 编译原理中的哨兵标记</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-08-09 / 3 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${5 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/structure-array/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">数据结构 - 数组</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-06-08 / 5 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${6 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/java-references/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">Java 引用类型</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-06-05 / 2 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${7 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/hbase/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">HBase</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-06-05 / 5 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${8 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/algorithm-sort/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">算法 - 排序</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-06-01 / 8 min read</div>
</div>
</section>
<section class="post-item md:flex pb-12 animated fadeIn" :style="{ 'animation-delay': `${9 * 0.2}s` }">
<div class="content">
<a href="https://goroyal.github.io/void-pointer/">
<h2 class="post-title text-xl font-extrabold mt-5 md:mt-0">void指针</h2>
</a>
<div class="post-abstract text-gray-700 font-light my-4">
</div>
<div class="text-gray-400 text-sm font-light">2022-06-01 / 2 min read</div>
</div>
</section>
<div class="read-more">
<a href="https://goroyal.github.io/page/2" class="animated fadeIn font-extrabold text-gray-700 hover:text-gray-900 more-btn">
阅读更多
<i class="ri-arrow-right-line"></i>
</a>
</div>
<div class="index-page">
<div class="pagination-container animated fadeIn">
<a href="https://goroyal.github.io/page/2" class="page-btn">下一页 <i class="ri-arrow-right-line"></i></a>
</div>
</div>
</div>
</div>
<script src="https://goroyal.github.io/media/prism.js"></script>
<script>
Prism.highlightAll()
let mainNavLinks = document.querySelectorAll(".markdownIt-TOC a");
// This should probably be throttled.
// Especially because it triggers during smooth scrolling.
// https://lodash.com/docs/4.17.10#throttle
// You could do like...
// window.addEventListener("scroll", () => {
// _.throttle(doThatStuff, 100);
// });
// Only not doing it here to keep this Pen dependency-free.
window.addEventListener("scroll", event => {
let fromTop = window.scrollY;
mainNavLinks.forEach((link, index) => {
let section = document.getElementById(decodeURI(link.hash).substring(1));
let nextSection = null
if (mainNavLinks[index + 1]) {
nextSection = document.getElementById(decodeURI(mainNavLinks[index + 1].hash).substring(1));
}
if (section.offsetTop <= fromTop) {
if (nextSection) {
if (nextSection.offsetTop > fromTop) {
link.classList.add("current");
} else {
link.classList.remove("current");
}
} else {
link.classList.add("current");
}
} else {
link.classList.remove("current");
}
});
});
document.addEventListener("DOMContentLoaded", function() {
var lazyImages = [].slice.call(document.querySelectorAll(".post-feature-image.lazy"));
if ("IntersectionObserver" in window) {
let lazyImageObserver = new IntersectionObserver(function(entries, observer) {
entries.forEach(function(entry) {
if (entry.isIntersecting) {
let lazyImage = entry.target
lazyImage.style.backgroundImage = `url(${lazyImage.dataset.bg})`
lazyImage.classList.remove("lazy")
lazyImageObserver.unobserve(lazyImage)
}
});
});
lazyImages.forEach(function(lazyImage) {
lazyImageObserver.observe(lazyImage)
})
} else {
// Possibly fall back to a more compatible method here
}
});
const menuContainer = document.querySelector('.menu-container')
const menus = document.querySelectorAll('.menu-container .menu')
const mask = document.querySelector('.mask')
const contentWrapper = document.querySelector('.content-wrapper')
const latestArticle = document.querySelector('.latest-article')
const readMore = document.querySelector('.read-more')
const indexPage = document.querySelector('.index-page')
const isHome = location.pathname === '/'
if (latestArticle) {
latestArticle.style.display = isHome ? 'block' : 'none'
readMore.style.display = isHome ? 'block' : 'none'
indexPage.style.display = isHome ? 'none' : 'block'
}
const openMenu = () => {
menuContainer.classList.add('open')
menus.forEach(menu => {
menu.classList.add('animated', 'fadeInLeft')
})
mask.classList.add('open')
contentWrapper.classList.add('is-second')
}
const closeMenu = () => {
menuContainer.classList.remove('open')
menus.forEach(menu => {
menu.classList.remove('animated', 'fadeInLeft')
})
mask.classList.remove('open')
contentWrapper.classList.remove('is-second')
}
</script>
</body>
</html>