-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
520 lines (425 loc) · 16.5 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
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf8" />
<meta name="viewport" content="initial-scale=1.0, width=device-width" />
<title>
Hexo
</title>
<meta name="description" content="" />
<meta name="keywords" content="" />
<link rel="apple-touch-icon"
sizes="180x180"
href="/images/apple-touch-icon.png" />
<link rel="icon"
type="image/png"
sizes="32x32"
href="/images/favicon-32x32.png" />
<link rel="icon"
type="image/png"
sizes="16x16"
href="/images/favicon-16x16.png" />
<link rel="mask-icon"
href="/images/logo.svg"
color="" />
<style>
@font-face {
font-family:sourceHanSerif;
src: url(/font/normal.ttf);
font-weight: normal;
}
</style>
<style>
@font-face {
font-family:sourceHanSerif;
src: url(/font/bold.ttf);
font-weight: bold;
}
</style>
<link rel="stylesheet"
type="text/css"
href='/css/layout.css' />
<link rel="stylesheet"
type="text/css"
href='/css/index.css'/>
<meta name="generator" content="Hexo 7.3.0"></head>
<body>
<div id="search-mask" style="display:none">
<div class="search-main" id="search-main">
<div class="search__head">
<div class="search-form">
<svg t="1706347533072"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="7828"
width="20"
height="20">
<path d="M685.6 660.336l155.152 155.168a16 16 0 0 1 0 22.624l-11.312 11.328a16 16 0 0 1-22.624 0l-158.528-158.544a289.792 289.792 0 0 1-165.152 51.36C322.336 742.256 192 611.904 192 451.12 192 290.336 322.336 160 483.136 160c160.784 0 291.12 130.336 291.12 291.136 0 82.112-33.984 156.272-88.672 209.2z m-202.464 33.92c134.272 0 243.12-108.848 243.12-243.12C726.256 316.848 617.408 208 483.136 208 348.848 208 240 316.848 240 451.136c0 134.272 108.848 243.12 243.136 243.12z" fill="#000000" p-id="7829">
</path>
</svg>
<input id="search-input" placeholder="搜索文章">
<svg t="1706361500528"
id="search-clear"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="4351"
width="20"
height="20">
<path d="M512 562.688l-264.2944 264.2944-50.688-50.688L461.312 512 197.0176 247.7056l50.688-50.688L512 461.312l264.2944-264.2944 50.688 50.688L562.688 512l264.2944 264.2944-50.688 50.688L512 562.688z" fill="#00" p-id="4352">
</path>
</svg>
</div>
</div>
<div class="search__body" id="search-result"></div>
<div class="search__foot"></div>
</div>
</div>
<div class="head">
<div class="nav">
<a href='/' class="nav-logo">
<img alt="logo" height="60px" width="60px" src="/images/logo.svg" />
</a>
<input id="navBtn" type="checkbox" />
<div class="nav-right">
<div class="search-outer">
<div class="search" id="search-btn">
<svg t="1706347533072"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="7828"
width="20"
height="20">
<path d="M685.6 660.336l155.152 155.168a16 16 0 0 1 0 22.624l-11.312 11.328a16 16 0 0 1-22.624 0l-158.528-158.544a289.792 289.792 0 0 1-165.152 51.36C322.336 742.256 192 611.904 192 451.12 192 290.336 322.336 160 483.136 160c160.784 0 291.12 130.336 291.12 291.136 0 82.112-33.984 156.272-88.672 209.2z m-202.464 33.92c134.272 0 243.12-108.848 243.12-243.12C726.256 316.848 617.408 208 483.136 208 348.848 208 240 316.848 240 451.136c0 134.272 108.848 243.12 243.136 243.12z" fill="#000000" p-id="7829">
</path>
</svg>
<span>搜索</span>
<span class="search-shortcut-key">Ctrl K</span>
</div>
</div>
<div class="nav-menu">
<a class="nav-menu-item" href="/Daily">日常</a>
<a class="nav-menu-item" href="/Project">项目</a>
<a class="nav-menu-item" href='/cv/'>简历</a>
</div>
</div>
<label class="nav-btn" for="navBtn"></label>
</div>
</div>
<div class="body">
<div class="wall wall-index">
<div class="wall-main" id="wall-main">
<div class="wall-title">HEXO</div>
<div class="wall-subtitle"></div>
<div class="wall-description">“Positive”</div>
</div>
<div class="wall-bg">
<div class="wall-bg-index">
<div class="hello-world">
<div>> Hello world</div>
<div class="cursor"></div>
</div>
<div class="normal-eqt">
<img alt="normal" width="300px" height="" src="/images/normal.svg"/>
</div>
<canvas width="400" height="400" id="heart-curve"></canvas>
<div class="motto">长风破浪会有时!</div>
<div class="poem">
君不见高堂明镜悲白发
<br/>
朝如青丝暮成雪
<br/>
</div>
</div>
</div>
</div>
<div class="about">
<div class="about-photo"
style="background-image: url(/images/about.jpg)"></div>
<div class="about-text">
<div class="about-title">
<div class="matts">关</div>
<div class="matts">于</div>
</div>
<div class="about-detail">
<div class="about-text-p">
酒入豪肠,七分酿成了月光
<br/>
<br/>
余下的三分啸成剑气
<br/>
<br/>
绣口一吐就半个盛唐
<br/>
</div>
</div>
</div>
</div>
<div class="timeline">
<div class="timeline-head">
<div class="title">时间线</div>
<div class="radio-wrapper">
<div class="radio">
<input id="radio-article"
type="checkbox"
/>
<label class="radio-skin--article" for="radio-article"></label>
</div>
<div class="radio">
<input id="radio-app"
type="checkbox"
checked/>
<label class="radio-skin--app" for="radio-app"></label>
</div>
<div class="radio">
<input id="radio-event"
type="checkbox"
/>
<label class="radio-skin--event" for="radio-event"></label>
</div>
</div>
</div>
<div class="timeline-body">
<div class="timeline-item-first">
<div class="line-anchor line-anchor--now"></div>
</div>
<div class="timeline-list" id="timeline-list"></div>
<div class="timeline-item-last">
<div class="line-anchor line-anchor--end"></div>
</div>
</div>
</div>
</div>
<div class="foot">
<div class="foot-inner">
<div class="foot__head">
<div class="foot-line">
<div class="matts">海</div><div class="matts">内</div><div class="matts">存</div><div class="matts">知</div><div class="matts">己</div>
</div>
<div class="foot-line">
<div class="matts">天</div><div class="matts">涯</div><div class="matts">若</div><div class="matts">比</div><div class="matts">邻</div>
</div>
</div>
<div class="foot__body">
<div class="foot-item">
<div class="foot-item__head">朋友</div>
<div class="foot-item__body">
<div class="text">
<img alt="link" height="20px" width="20px" src="/images/icon/icon-link.svg" />
<a class="foot-link" href="https://dream-les.github.io/">kiki的主页</a>
</div>
<div class="text">
<img alt="link" height="20px" width="20px" src="/images/icon/icon-link+.svg" />
<a class="foot-link"
href="mailto:example@email.com?subject=%E7%94%B3%E8%AF%B7%20Hozen.site%20%E7%9A%84%E5%8F%8B%E9%93%BE%E4%BD%8D%E7%BD%AE">
申请友链</a>
</div>
</div>
</div>
<div class="foot-item">
<div class="foot-item__head">账号</div>
<div class="foot-item__body">
<div class="text">
<img alt="link" height="20px" width="20px" src="/images/logo-github.svg" />
<a class="foot-link" target="_blank" rel="noopener" href="https://github.com/Dream-les">kiki</a>
</div>
</div>
</div>
<div class="foot-item">
<div class="foot-item__head">联系</div>
<div class="foot-item__body">
<div class="text">
<img alt="link" height="20px" width="20px" src="/images/icon/icon-email.svg" />
<a class="foot-link" href="mailto:example@email.com">example@email.com</a>
</div>
</div>
</div>
</div>
<div class="copyright">
<a href="http://Dream-les.github.io">Hexo</a> | 由 <a target="_blank" rel="noopener" href="https://hexo.io/">Hexo</a> 及
<svg width="20" height="20" viewBox="0 0 725 725">
<path fill-rule="evenodd" fill="rgb(221, 221, 221)" d="M145.870,236.632 L396.955,103.578 L431.292,419.44 L156.600,522.53 L145.870,236.632 Z" />
<path fill-rule="evenodd" fill="rgb(159, 159, 159)" d="M396.955,103.578 L564.345,234.486 L611.558,513.469 L431.292,419.44 L396.955,103.578 Z" />
<path fill-rule="evenodd" fill="rgb(0, 0, 0)" d="M431.292,419.44 L611.558,513.469 L358.327,595.18 L156.600,522.53 L431.292,419.44 Z" />
</svg>
<a target="_blank" rel="noopener" href="https://github.com/hooozen/hexo-theme-tranquility">致远</a> 驱动
</div>
</div>
</div>
<script src="/js/search.js"></script>
<script>searchInitialize("/search.json")</script>
<script type="text/javascript">
function HeartCurve(w, h) {
this.w = w;
this.h = h;
this.a = undefined;
this.ctx = undefined;
this.deg = 0;
this.speed = 0.4;
this.isPause = false;
this.init();
}
HeartCurve.prototype.init = function () {
const {
w,
h
} = this;
const canvas = document.querySelector('#heart-curve');
if (!canvas) throw Error('no canvas element!');
this.ctx = canvas.getContext('2d');
this.ctx.translate(2 * w / 3, h / 2);
this.ctx.lineJoin = 'round';
this.a = w / 6.2;
this.id = null;
return this;
};
HeartCurve.prototype._drawAxis = function () {
const {
ctx,
w,
h
} = this;
ctx.lineWidth = 1;
ctx.strokeStyle = "#999";
ctx.beginPath();
ctx.moveTo(-w * 2 / 3, 0);
ctx.lineTo(w / 3, 0);
ctx.stroke();
ctx.beginPath();
ctx.moveTo(0, -h * 0.48);
ctx.lineTo(0, h * 0.48);
ctx.stroke();
};
HeartCurve.prototype._drawCure = function () {
const {
ctx,
a
} = this;
ctx.beginPath();
let x, y, deg = 0;
ctx.moveTo(0, 0);
ctx.strokeStyle = "#ff0000";
while (deg <= 360) {
const theta = deg / 180 * Math.PI;
r = 2 * a * (1 - Math.cos(theta));
x = r * Math.cos(theta);
y = r * Math.sin(theta);
ctx.lineTo(x, y);
deg++;
}
ctx.stroke();
};
HeartCurve.prototype.spin = function () {
let {
a,
w,
h,
deg,
ctx
} = this;
if (deg >= 360) deg = 0;
ctx.clearRect(-w / 3 * 2, -h / 2, w, h);
const theta = deg / 180 * Math.PI;
this._drawAxis();
ctx.lineWidth = 2;
this._drawCure();
ctx.strokeStyle = "#000";
ctx.beginPath();
ctx.arc(-a, 0, a, 0, 2 * Math.PI);
ctx.stroke();
ctx.beginPath();
ctx.arc(2 * a * Math.cos(theta) - a, 2 * a * Math.sin(theta), a, 0, 2 * Math.PI);
ctx.stroke();
ctx.beginPath();
let r = 2 * a * (1 - Math.cos(theta));
let x = r * Math.cos(theta);
let y = r * Math.sin(theta);
ctx.arc(x, y, 3, 0, 2 * Math.PI);
ctx.fill();
if (this.isPause) return;
this.deg = deg + this.speed;
this.id = window.requestAnimationFrame(this.spin.bind(this));
};
HeartCurve.prototype.pause = function () {
this.isPause = true;
if (window.cancelAnimationFrame) {
window.cancelAnimationFrame(this.id);
}
};
HeartCurve.prototype.resume = function () {
this.isPause = false;
this.spin();
};
(function () {
const heartCurve = new HeartCurve(400, 400);
heartCurve.spin();
mobileAdjust(window.matchMedia("(hover:none"));
window.matchMedia("(hover:none)").addListener(mobileAdjust);
function mobileAdjust(media) {
const wallEl = document.querySelector('#wall-main')
if (!media.matches) {
heartCurve.pause();
wallEl.addEventListener('mouseenter', () => {
console.log('resume');
heartCurve.resume();
});
wallEl.addEventListener('mouseleave', () => {
console.log('pause');
heartCurve.pause();
});
}
}
})();
</script>
<script type="text/javascript">
const timelineData = {"types":["article","app","event"],"posts":[{"title":"哲学随想","path":"/2024/11/05/20241105-%E5%93%B2%E5%AD%A6%E9%9A%8F%E6%84%9F/","icon":"/images/icon/icon-article.svg","type":"article","date":"2024-11-05"},{"title":"发展","path":"/2024/09/21/20240921/","icon":"/images/icon/icon-article.svg","type":"article","date":"2024-09-21"},{"title":"记AI提升个人效率","path":"/2024/09/07/%E8%AE%B0AI%E6%8F%90%E5%8D%87%E4%B8%AA%E4%BA%BA%E5%B7%A5%E4%BD%9C%E6%95%88%E7%8E%87/","icon":"/images/icon/icon-article.svg","type":"article","date":"2024-09-07"},{"title":"240903开端","path":"/2024/09/03/20240903%E6%9C%89%E6%84%9F/","icon":"/images/icon/icon-article.svg","type":"article","date":"2024-09-03"},{"title":"项目模板","path":"/2024/09/03/%E9%A1%B9%E7%9B%AE%E6%A8%A1%E6%9D%BF/","icon":"/images/icon/icon-app.svg","type":"app","date":"2024-09-03"},{"title":"Hello world","path":"/2024/09/03/hello-world/","icon":"/images/icon/icon-article.svg","type":"article","date":"2024-09-03"}]}
const {types, posts} = timelineData
listEl = document.querySelector("#timeline-list");
elRefs = getElRefs(types)
bindListener(types, elRefs)
setTimeout(init.bind(this, types, elRefs))
function getElRefs(types) {
return types.map(type => document.querySelector(`#radio-${type}`))
}
function bindListener(names, els) {
names.map((name, i) => els[i].addEventListener('change', e => updateList(name, e.target.checked)))
}
function updateList(type, value) {
listDom
.filter(line => line.type === type)
.forEach(line => {
line.el.className = line
.el
.className
.replace(
/(--hidden)?$/, value
? ""
: "--hidden");
});
}
const listDom = posts.map(t => getLine(t));
listEl.append(...listDom.map(i => i.el));
function getLine(data) {
const item = document.createElement("DIV");
item.className = `timeline-item-${data.type} timeline-item--hidden`;
item.innerHTML = `
<div class="line-date">
<div class="line-date-tag">${data.date}</div></div>
<div class="line-anchor"></div>
<div class="line-title">
<img class="text-icon" src="${data.icon}" /><a class="timeline-post" href="${data.path}">${data.title}</a>
</div>
`;
return {el: item, type: data.type};
};
function init(names, els) {
names.map((name, i) => updateList(name, els[i].checked))
}
</script>
</body>
</html>