-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
664 lines (458 loc) · 18.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
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
<!DOCTYPE html>
<html lang="zh-CN" color-mode="light">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="" />
<meta name="author" content="jpwang" />
<meta name="description" content="Young, Simple & Naive" />
<title>
jjppp
</title>
<link rel="apple-touch-icon" href="/images/favicon.png">
<link rel="icon" href="/images/favicon.png">
<!-- Raleway-Font -->
<link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
<!-- hexo site css -->
<link rel="stylesheet" href="/css/color-scheme.css">
<link rel="stylesheet" href="/css/base.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1886449_67xjft27j1l.css">
<link rel="stylesheet" href="/css/github-markdown.css">
<link rel="stylesheet" href="/css/highlight.css">
<link rel="stylesheet" href="/css/comments.css">
<!-- 代码块风格 -->
<link rel="stylesheet" href="/css/figcaption/mac-block.css">
<!-- jquery3.3.1 -->
<script defer type="text/javascript" src="/plugins/jquery.min.js"></script>
<!-- fancybox -->
<link href="/plugins/jquery.fancybox.min.css" rel="stylesheet">
<script defer type="text/javascript" src="/plugins/jquery.fancybox.min.js"></script>
<script src="/js/fancybox.js"></script>
<script>
var html = document.documentElement
const colorMode = localStorage.getItem('color-mode')
if (colorMode) {
document.documentElement.setAttribute('color-mode', colorMode)
}
</script>
<!-- hexo injector head_end start -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/style.css">
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.2.0"><link rel="alternate" href="/atom.xml" title="jjppp" type="application/atom+xml">
</head>
<body>
<div id="app">
<div class="header">
<div class="avatar">
<a href="/">
<!-- 头像取消懒加载,添加no-lazy -->
<img src="/images/avatar.png" alt="">
</a>
<div class="nickname"><a href="/">jjppp</a></div>
</div>
<div class="navbar">
<ul>
<li class="nav-item" data-path="/">
<a href="/">Home</a>
</li>
<li class="nav-item" data-path="/archives/">
<a href="/archives/">Archives</a>
</li>
<li class="nav-item" data-path="/tags/">
<a href="/tags/">Tags</a>
</li>
<li class="nav-item" data-path="/friends/">
<a href="/friends/">Friends</a>
</li>
<li class="nav-item" data-path="/about/">
<a href="/about/">About</a>
</li>
</ul>
</div>
</div>
<script src="/js/activeNav.js"></script>
<div class="flex-container">
<div class="container index">
<div class="post-list">
<!-- 遍历渲染文章 -->
<div class="post-item" title="DOM">
<div class="time-m-d">2024-04-12</div>
<div class="title">
<a href="/2024/04/12/DOM/">
<span>DOM</span>
</a>
</div>
</div>
<div class="post-item" title="Futamura Projections">
<div class="time-m-d">2024-03-19</div>
<div class="title">
<a href="/2024/03/19/Futamura-Projections/">
<span>Futamura Projections</span>
</a>
</div>
</div>
<div class="post-item" title="DB04 Storage">
<div class="time-m-d">2024-03-01</div>
<div class="title">
<a href="/2024/03/01/DB04-Storage/">
<span>DB04 Storage</span>
</a>
</div>
</div>
<div class="post-item" title="DB03 SQL">
<div class="time-m-d">2024-02-05</div>
<div class="title">
<a href="/2024/02/05/DB03-SQL/">
<span>DB03 SQL</span>
</a>
</div>
</div>
<div class="post-item" title="浅谈Verilog中的X">
<div class="time-m-d">2024-01-30</div>
<div class="title">
<a href="/2024/01/30/%E6%B5%85%E8%B0%88Verilog%E4%B8%AD%E7%9A%84X/">
<span>浅谈Verilog中的X</span>
</a>
</div>
</div>
<div class="post-item" title="DB02 Relational">
<div class="time-m-d">2024-01-23</div>
<div class="title">
<a href="/2024/01/23/DB02-Relational/">
<span>DB02 Relational</span>
</a>
</div>
</div>
<div class="post-item" title="DB01 Intro">
<div class="time-m-d">2024-01-23</div>
<div class="title">
<a href="/2024/01/23/DB01-Intro/">
<span>DB01 Intro</span>
</a>
</div>
</div>
<div class="post-item" title="SA04 Abstract interpretation">
<div class="time-m-d">2024-01-02</div>
<div class="title">
<a href="/2024/01/02/SA04-Abstract-interpretation/">
<span>SA04 Abstract interpretation</span>
</a>
</div>
</div>
<div class="post-item" title="Tour de SAT">
<div class="time-m-d">2023-12-30</div>
<div class="title">
<a href="/2023/12/30/Tour-de-SAT/">
<span>Tour de SAT</span>
</a>
</div>
</div>
<div class="post-item" title="A subtle bug in a static analysis framework">
<div class="time-m-d">2023-12-26</div>
<div class="title">
<a href="/2023/12/26/A-subtle-bug-in-a-static-analysis-framework/">
<span>A subtle bug in a static analysis framework</span>
</a>
</div>
</div>
<div class="post-item" title="SA03 narrowing & widening">
<div class="time-m-d">2023-11-29</div>
<div class="title">
<a href="/2023/11/29/SA03-narrowing-widening/">
<span>SA03 narrowing & widening</span>
</a>
</div>
</div>
<div class="post-item" title="Cpp Lambda Quirks">
<div class="time-m-d">2023-08-23</div>
<div class="title">
<a href="/2023/08/23/Cpp-Lambda-Captures/">
<span>Cpp Lambda Quirks</span>
</a>
</div>
</div>
<div class="post-item" title="SA02 lattice">
<div class="time-m-d">2023-08-11</div>
<div class="title">
<a href="/2023/08/11/SA02-lattice/">
<span>SA02 lattice</span>
</a>
</div>
</div>
<div class="post-item" title="SA01 Type">
<div class="time-m-d">2023-08-04</div>
<div class="title">
<a href="/2023/08/04/spa01-Type/">
<span>SA01 Type</span>
</a>
</div>
</div>
<div class="post-item" title="大三下荒唐实录">
<div class="time-m-d">2023-08-03</div>
<div class="title">
<a href="/2023/08/03/%E5%A4%A7%E4%B8%89%E4%B8%8B%E8%8D%92%E5%94%90%E5%AE%9E%E5%BD%95/">
<span>大三下荒唐实录</span>
</a>
</div>
</div>
<div class="post-item" title="LLHD 踩坑记">
<div class="time-m-d">2023-06-14</div>
<div class="title">
<a href="/2023/06/14/LLHD-%E8%B8%A9%E5%9D%91%E8%AE%B0/">
<span>LLHD 踩坑记</span>
</a>
</div>
</div>
<div class="post-item" title="Compiler04 语法制导翻译">
<div class="time-m-d">2023-03-18</div>
<div class="title">
<a href="/2023/03/18/Compiler04-%E8%AF%AD%E6%B3%95%E5%88%B6%E5%AF%BC%E7%BF%BB%E8%AF%91/">
<span>Compiler04 语法制导翻译</span>
</a>
</div>
</div>
<div class="post-item" title="Network06 Wireless">
<div class="time-m-d">2023-02-15</div>
<div class="title">
<a href="/2023/02/15/Network06-Wireless/">
<span>Network06 Wireless</span>
</a>
</div>
</div>
<div class="post-item" title="Network05 Link">
<div class="time-m-d">2023-02-15</div>
<div class="title">
<a href="/2023/02/15/Network05-Link/">
<span>Network05 Link</span>
</a>
</div>
</div>
<div class="post-item" title="Automata07 TS">
<div class="time-m-d">2023-02-08</div>
<div class="title">
<a href="/2023/02/08/Automata07-TS/">
<span>Automata07 TS</span>
</a>
</div>
</div>
</div>
<nav class="post-navigation">
<span class="page-num">1 / 7</span>
<a href="/page/2/"><i class="iconfont icon-angleright"></i></a>
</nav>
</div>
<div class="footer">
<div class="social">
<ul>
<li>
<a title="github" target="_blank" rel="noopener" href="https://github.com/olahiuj">
<i class="iconfont icon-github"></i>
</a>
</li>
<li>
<a title="email" href="mailto:[email protected]">
<i class="iconfont icon-envelope"></i>
</a>
</li>
<li>
<a title="rss" href="/atom.xml">
<i class="iconfont icon-rss"></i>
</a>
</li>
</ul>
</div>
<div class="footer-more">
<a target="_blank" rel="noopener" href="https://github.com/olahiuj">Copyright © 2024 jjppp</a>
</div>
<div class="footer-more">
<a target="_blank" rel="noopener" href="https://github.com/zchengsite/hexo-theme-oranges">Theme by Oranges | Powered by Hexo</a>
</div>
</div>
</div>
<div class="tools-bar">
<div class="back-to-top tools-bar-item hidden">
<a href="javascript: void(0)">
<i class="iconfont icon-chevronup"></i>
</a>
</div>
<script src="/js/backtotop.js"></script>
<div class="search-icon tools-bar-item" id="search-icon">
<a href="javascript: void(0)">
<i class="iconfont icon-search"></i>
</a>
</div>
<div class="search-overlay hidden">
<div class="search-content" tabindex="0">
<div class="search-title">
<span class="search-icon-input">
<a href="javascript: void(0)">
<i class="iconfont icon-search"></i>
</a>
</span>
<input type="text" class="search-input" id="search-input" placeholder="搜索...">
<span class="search-close-icon" id="search-close-icon">
<a href="javascript: void(0)">
<i class="iconfont icon-close"></i>
</a>
</span>
</div>
<div class="search-result" id="search-result"></div>
</div>
</div>
<script type="text/javascript">
var inputArea = document.querySelector("#search-input")
var searchOverlayArea = document.querySelector(".search-overlay")
inputArea.onclick = function() {
getSearchFile()
this.onclick = null
}
inputArea.onkeydown = function() {
if(event.keyCode == 13)
return false
}
function openOrHideSearchContent() {
let isHidden = searchOverlayArea.classList.contains('hidden')
if (isHidden) {
searchOverlayArea.classList.remove('hidden')
document.body.classList.add('hidden')
// inputArea.focus()
} else {
searchOverlayArea.classList.add('hidden')
document.body.classList.remove('hidden')
}
}
function blurSearchContent(e) {
if (e.target === searchOverlayArea) {
openOrHideSearchContent()
}
}
document.querySelector("#search-icon").addEventListener("click", openOrHideSearchContent, false)
document.querySelector("#search-close-icon").addEventListener("click", openOrHideSearchContent, false)
searchOverlayArea.addEventListener("click", blurSearchContent, false)
var searchFunc = function (path, search_id, content_id) {
'use strict';
var $input = document.getElementById(search_id);
var $resultContent = document.getElementById(content_id);
$resultContent.innerHTML = "<ul><span class='local-search-empty'>首次搜索,正在载入索引文件,请稍后……<span></ul>";
$.ajax({
// 0x01. load xml file
url: path,
dataType: "xml",
success: function (xmlResponse) {
// 0x02. parse xml file
var datas = $("entry", xmlResponse).map(function () {
return {
title: $("title", this).text(),
content: $("content", this).text(),
url: $("url", this).text()
};
}).get();
$resultContent.innerHTML = "";
$input.addEventListener('input', function () {
// 0x03. parse query to keywords list
var str = '<ul class=\"search-result-list\">';
var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
$resultContent.innerHTML = "";
if (this.value.trim().length <= 0) {
return;
}
// 0x04. perform local searching
datas.forEach(function (data) {
var isMatch = true;
var content_index = [];
if (!data.title || data.title.trim() === '') {
data.title = "Untitled";
}
var orig_data_title = data.title.trim();
var data_title = orig_data_title.toLowerCase();
var orig_data_content = data.content.trim().replace(/<[^>]+>/g, "");
var data_content = orig_data_content.toLowerCase();
var data_url = data.url;
var index_title = -1;
var index_content = -1;
var first_occur = -1;
// only match artiles with not empty contents
if (data_content !== '') {
keywords.forEach(function (keyword, i) {
index_title = data_title.indexOf(keyword);
index_content = data_content.indexOf(keyword);
if (index_title < 0 && index_content < 0) {
isMatch = false;
} else {
if (index_content < 0) {
index_content = 0;
}
if (i == 0) {
first_occur = index_content;
}
// content_index.push({index_content:index_content, keyword_len:keyword_len});
}
});
} else {
isMatch = false;
}
// 0x05. show search results
if (isMatch) {
str += "<li><a href='" + data_url + "' class='search-result-title'>" + orig_data_title + "</a>";
var content = orig_data_content;
if (first_occur >= 0) {
// cut out 100 characters
var start = first_occur - 20;
var end = first_occur + 80;
if (start < 0) {
start = 0;
}
if (start == 0) {
end = 100;
}
if (end > content.length) {
end = content.length;
}
var match_content = content.substr(start, end);
// highlight all keywords
keywords.forEach(function (keyword) {
var regS = new RegExp(keyword, "gi");
match_content = match_content.replace(regS, "<span class=\"search-keyword\">" + keyword + "</span>");
});
str += "<p class=\"search-result-abstract\">" + match_content + "...</p>"
}
str += "</li>";
}
});
str += "</ul>";
if (str.indexOf('<li>') === -1) {
return $resultContent.innerHTML = "<ul><span class='local-search-empty'>没有找到内容,请尝试更换检索词。<span></ul>";
}
$resultContent.innerHTML = str;
});
},
error: function(xhr, status, error) {
$resultContent.innerHTML = ""
if (xhr.status === 404) {
$resultContent.innerHTML = "<ul><span class='local-search-empty'>未找到search.xml文件,具体请参考:<a href='https://github.com/zchengsite/hexo-theme-oranges#configuration' target='_black'>configuration</a><span></ul>";
} else {
$resultContent.innerHTML = "<ul><span class='local-search-empty'>请求失败,尝试重新刷新页面或稍后重试。<span></ul>";
}
}
});
$(document).on('click', '#search-close-icon', function() {
$('#search-input').val('');
$('#search-result').html('');
});
}
var getSearchFile = function() {
var path = "/search.xml";
searchFunc(path, 'search-input', 'search-result');
}
</script>
<div class="tools-bar-item theme-icon" id="switch-color-scheme">
<a href="javascript: void(0)">
<i id="theme-icon" class="iconfont icon-moon"></i>
</a>
</div>
<script src="/js/colorscheme.js"></script>
<script src="/js/shares.js"></script>
</div>
</div>
</body>
</html>