-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
514 lines (467 loc) · 26.6 KB
/
Copy pathindex.html
File metadata and controls
514 lines (467 loc) · 26.6 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
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
<!DOCTYPE html>
<html lang="zh-CN"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>个人主页 · 原型(3 个方案)</title>
<!--
PROTOTYPE — throwaway UI exploration.
Question: "What should my personal homepage look like, with courses turned into works?"
Three structurally-different variants on one route, switchable via ?variant=A|B|C
and a floating bottom switcher. This is throwaway code, not production.
-->
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; }
.variant { display: none; }
.variant.active { display: block; }
/* ============ Featured preview (置顶预告) ============ */
.preview-flag { margin: 0 0 8px; }
.preview-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 700; text-transform: uppercase; color: #a96b48; background: #f5ece3; padding: 4px 12px; border-radius: 999px; }
.preview-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: #c17f59; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }
.preview-title { font-weight: 800; letter-spacing: -0.01em; }
.preview-date { font-size: 0.8rem; color: #a96b48; font-weight: 600; white-space: nowrap; }
/* A — 编辑杂志:置顶横幅 */
.va .preview { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 28px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; background: #fff; }
.va .preview .preview-body { flex: 1; }
.va .preview .preview-title { font-size: 1.25rem; margin: 8px 0 4px; }
.va .preview .preview-desc { color: var(--muted); font-size: 0.92rem; }
/* B — 作品画廊:置顶大卡 */
.vb .preview { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 32px; border-radius: 18px; overflow: hidden; background: linear-gradient(150deg, #7c3a1e, #c17f59); }
.vb .preview .preview-kicker { background: rgba(255,255,255,0.2); color: #fff; }
.vb .preview .preview-kicker .dot { background: #fff; }
.vb .preview .preview-title { color: #fff; font-size: 1.9rem; line-height: 1.15; margin: 14px 0 8px; max-width: 560px; text-shadow: 0 1px 12px rgba(0,0,0,0.2); }
.vb .preview .preview-desc { color: rgba(255,255,255,0.88); max-width: 540px; }
.vb .preview .preview-date { color: #fff; }
/* C — 个人品牌:置顶通知条 */
.vc .preview { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 760px; margin: 0 auto; padding: 16px 22px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 30px -18px rgba(44,36,27,0.25); }
.vc .preview .preview-body { text-align: left; }
.vc .preview .preview-title { font-size: 1.1rem; margin-top: 4px; }
/* ============ Shared modal ============ */
.modal-overlay {
display: none; position: fixed; inset: 0;
background: rgba(15, 17, 19, 0.6);
backdrop-filter: blur(4px);
z-index: 1000; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal {
background: #fff; color: #241d15;
border-radius: 16px; width: 100%; max-width: 560px; max-height: 80vh;
display: flex; flex-direction: column; overflow: hidden;
box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}
.modal-header { padding: 22px 26px; border-bottom: 1px solid #eee6db; display: flex; justify-content: space-between; gap: 16px; }
.modal-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 2px; }
.modal-sub { font-size: 0.8rem; color: #8a7f73; }
.modal-close { width: 32px; height: 32px; border: 1px solid #e5ddd2; border-radius: 8px; background: transparent; cursor: pointer; font-size: 1rem; color: #8a7f73; }
.modal-close:hover { border-color: #c17f59; color: #c17f59; }
.modal-body { padding: 22px 26px; overflow-y: auto; flex: 1; }
.modal-search { width: 100%; padding: 10px 14px; font-size: 0.85rem; border: 1px solid #e5ddd2; border-radius: 8px; outline: none; margin-bottom: 18px; font-family: inherit; }
.modal-search:focus { border-color: #c17f59; }
.stage { margin-bottom: 20px; }
.stage-name { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; color: #c17f59; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee6db; }
.lessons { list-style: none; }
.lessons li { display: flex; gap: 12px; align-items: baseline; padding: 6px 8px; border-radius: 6px; font-size: 0.88rem; }
.lessons li:hover { background: #faf6f0; }
.lessons .n { color: #b3a89b; font-variant-numeric: tabular-nums; min-width: 22px; font-size: 0.76rem; }
.lessons a { text-decoration: none; flex: 1; color: #241d15; }
.lessons a:hover { color: #c17f59; }
.no-results { text-align: center; color: #b3a89b; padding: 40px 0; font-size: 0.9rem; }
/* ============ Variant A — 编辑杂志 (Editorial) ============ */
.va { --bg: #faf7f2; --ink: #241d15; --muted: #7a6f63; --line: #e7dfd3; --accent: #c17f59; --accent-soft: #f0e4d9; }
.va { background: var(--bg); color: var(--ink); }
.va .wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.va .serif { font-family: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif; }
.va .nav { display: flex; justify-content: space-between; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.va .nav .brand { font-weight: 700; font-size: 1rem; letter-spacing: 0.01em; }
.va .nav .links { display: flex; gap: 28px; }
.va .nav .links a { text-decoration: none; font-size: 0.9rem; color: var(--muted); }
.va .nav .links a:hover { color: var(--ink); }
.va .hero { padding: 96px 0 80px; display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: end; }
.va .hero h1 { font-size: clamp(3rem, 7vw, 5.5rem); line-height: 1.02; font-weight: 700; letter-spacing: -0.03em; }
.va .hero h1 em { font-style: normal; color: var(--accent); }
.va .hero .intro { color: var(--muted); }
.va .hero .intro p { margin-bottom: 16px; font-size: 1.05rem; }
.va .hero .cta { display: flex; gap: 12px; margin-top: 24px; }
.va .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.va .btn.solid { background: var(--ink); color: #fff; }
.va .btn.solid:hover { background: var(--accent); }
.va .btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.va .btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.va .section { padding: 64px 0; }
.va .section-head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 40px; }
.va .section-head .kicker { font-size: 0.75rem; letter-spacing: 0.2em; color: var(--accent); font-weight: 700; }
.va .section-head h2 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; }
.va .about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; }
.va .about-grid .lead { font-size: 1.4rem; line-height: 1.5; color: var(--ink); font-weight: 500; }
.va .about-grid .body p { color: var(--muted); margin-bottom: 14px; }
.va .work-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 28px; align-items: center; padding: 36px 0; border-top: 1px solid var(--line); }
.va .work-row:last-child { border-bottom: 1px solid var(--line); }
.va .work-row .num { font-size: 1.6rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.va .work-row .bar { width: 6px; align-self: stretch; border-radius: 4px; }
.va .work-row .info .tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.06em; color: var(--accent); border: 1px solid var(--accent); padding: 2px 8px; border-radius: 4px; margin-bottom: 10px; }
.va .work-row .info h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 6px; }
.va .work-row .info p { color: var(--muted); font-size: 0.95rem; max-width: 640px; }
.va .work-row .meta { display: flex; gap: 18px; margin-top: 12px; color: var(--muted); font-size: 0.82rem; }
.va .work-row .open { text-decoration: none; font-size: 0.85rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.va .work-row .open:hover { color: var(--accent); }
.va .contact { background: var(--accent-soft); border-radius: 16px; padding: 56px; text-align: center; }
.va .contact h2 { font-size: 2rem; margin-bottom: 10px; }
.va .contact p { color: var(--muted); margin-bottom: 24px; }
.va .footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.82rem; }
/* ============ Variant B — 作品画廊 (Gallery) ============ */
.vb { --bg: #101214; --ink: #f4f1ec; --muted: #9a9389; --line: #26282b; }
.vb { background: var(--bg); color: var(--ink); }
.vb .wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.vb .top { padding: 56px 0 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; }
.vb .top .name { font-size: 1.15rem; font-weight: 700; }
.vb .top .tagline { color: var(--muted); font-size: 0.95rem; }
.vb .works-head { padding: 24px 0 32px; }
.vb .works-head h1 { font-size: clamp(2.2rem, 5vw, 4rem); letter-spacing: -0.03em; font-weight: 800; line-height: 1.05; }
.vb .works-head h1 span { color: #c17f59; }
.vb .masonry { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; padding-bottom: 72px; }
.vb .tile { position: relative; border-radius: 16px; overflow: hidden; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; cursor: pointer; transition: transform 0.2s; }
.vb .tile:hover { transform: translateY(-4px); }
.vb .tile .tag { position: absolute; top: 22px; left: 22px; font-size: 0.72rem; letter-spacing: 0.05em; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,0.28); color: #fff; backdrop-filter: blur(4px); }
.vb .tile h3 { font-size: 1.6rem; font-weight: 700; color: #fff; line-height: 1.2; margin-bottom: 8px; text-shadow: 0 1px 8px rgba(0,0,0,0.25); }
.vb .tile p { color: rgba(255,255,255,0.85); font-size: 0.9rem; max-width: 520px; text-shadow: 0 1px 6px rgba(0,0,0,0.25); }
.vb .tile .meta { display: flex; gap: 16px; margin-top: 14px; color: rgba(255,255,255,0.85); font-size: 0.8rem; }
.vb .tile .open { margin-top: 18px; display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: #fff; }
.vb .about { padding: 56px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.vb .about h2 { font-size: 1.8rem; margin-bottom: 16px; }
.vb .about p { color: var(--muted); margin-bottom: 12px; }
.vb .contact { padding: 48px 0 72px; }
.vb .contact .box { border: 1px solid var(--line); border-radius: 14px; padding: 40px; text-align: center; }
.vb .contact .box h2 { font-size: 1.8rem; margin-bottom: 8px; }
.vb .contact .box p { color: var(--muted); margin-bottom: 22px; }
.vb .btn { display: inline-flex; padding: 12px 22px; border-radius: 8px; background: #fff; color: #101214; font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.vb .footer { padding: 28px 0 40px; text-align: center; color: var(--muted); font-size: 0.8rem; }
/* ============ Variant C — 个人品牌 (Narrative) ============ */
.vc { --bg: #fffdfa; --ink: #241d15; --muted: #7a6f63; --line: #eee6db; --accent: #c17f59; --accent-soft: #f5ece3; }
.vc { background: var(--bg); color: var(--ink); }
.vc .wrap { max-width: 1120px; margin: 0 auto; padding: 0 32px; }
.vc .nav { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; }
.vc .nav .brand { font-weight: 700; }
.vc .nav .links { display: flex; gap: 26px; }
.vc .nav .links a { text-decoration: none; color: var(--muted); font-size: 0.9rem; }
.vc .nav .links a:hover { color: var(--ink); }
.vc .hero { text-align: center; padding: 88px 0 56px; }
.vc .avatar { width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; font-size: 2.4rem; font-weight: 700; }
.vc .hero h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.vc .hero .pos { font-size: 1.15rem; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.vc .hero p { color: var(--muted); max-width: 560px; margin: 0 auto; }
.vc .hero .cta { display: flex; gap: 12px; justify-content: center; margin-top: 28px; }
.vc .btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.vc .btn.solid { background: var(--accent); color: #fff; }
.vc .btn.solid:hover { background: #a96b48; }
.vc .btn.ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.vc .btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.vc .stats { display: flex; justify-content: center; gap: 56px; padding: 40px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.vc .stats .s .big { font-size: 2rem; font-weight: 800; line-height: 1; }
.vc .stats .s .lbl { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.vc .about { padding: 72px 0; max-width: 720px; margin: 0 auto; }
.vc .about h2 { font-size: 1.8rem; text-align: center; margin-bottom: 20px; }
.vc .about p { color: var(--muted); margin-bottom: 14px; }
.vc .chapter { border-radius: 20px; overflow: hidden; margin-bottom: 40px; }
.vc .chapter .band { height: 220px; display: flex; align-items: flex-end; padding: 28px 36px; }
.vc .chapter .band h3 { font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1.15; text-shadow: 0 1px 12px rgba(0,0,0,0.2); }
.vc .chapter .body { padding: 32px 36px; border: 1px solid var(--line); border-top: none; border-radius: 0 0 20px 20px; }
.vc .chapter .body .tag { display: inline-block; font-size: 0.72rem; letter-spacing: 0.05em; color: var(--accent); border: 1px solid var(--accent); padding: 2px 8px; border-radius: 4px; margin-bottom: 12px; }
.vc .chapter .body p { color: var(--muted); margin-bottom: 16px; }
.vc .chapter .body .meta { display: flex; gap: 20px; margin-bottom: 20px; color: var(--muted); font-size: 0.84rem; }
.vc .works-head { text-align: center; padding: 24px 0 40px; }
.vc .works-head h2 { font-size: 2rem; }
.vc .contact { text-align: center; padding: 64px 0 80px; }
.vc .contact h2 { font-size: 2rem; margin-bottom: 10px; }
.vc .contact p { color: var(--muted); margin-bottom: 24px; }
.vc .footer { padding: 32px 0 48px; text-align: center; color: var(--muted); font-size: 0.82rem; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
.va .hero, .va .about-grid { grid-template-columns: 1fr; gap: 32px; }
.va .work-row { grid-template-columns: 1fr; gap: 16px; }
.va .work-row .bar { width: 100%; height: 6px; }
.vb .masonry { grid-template-columns: 1fr; }
.vb .about { grid-template-columns: 1fr; }
.vb .top { flex-direction: column; align-items: flex-start; }
.va .preview, .vc .preview { flex-direction: column; align-items: flex-start; gap: 12px; }
.vb .preview { min-height: 260px; padding: 24px; }
.vc .stats { gap: 32px; }
}
</style>
</head>
<body>
<!-- ============ Variant A — 编辑杂志 ============ -->
<section class="variant va active" id="variant-a">
<div class="wrap">
<nav class="nav">
<div class="links">
<a href="#va-works">作品</a>
<a href="#va-about">关于</a>
<a href="#va-contact">联系</a>
</div>
</nav>
<header class="hero">
<h1 class="serif">你好,我是<em>阿票</em>。</h1>
<div class="intro">
<p style="position: relative;">记录我驯服ai的过程。分享给大家.....</p>
<div class="cta">
<a class="btn solid" href="#va-works">浏览作品</a>
<a class="btn ghost" href="#va-contact">联系我</a>
</div>
</div>
</header>
<section class="section" id="va-about">
<div class="section-head">
<span class="kicker">ABOUT</span>
<h2>关于我</h2>
</div>
<div class="about-grid">
<div class="body">
<p>西电毕业,目前在杭州定居,老家温州。</p>
<p>深感ai的浪潮影响了各行各业,是危机也是挑战...</p>
</div>
</div>
</section>
<section class="section" id="va-works">
<div class="section-head">
<span class="kicker">WORKS</span>
<h2>作品</h2>
</div>
<div class="preview" id="va-preview">
<div class="preview-body">
<span class="preview-kicker"><span class="dot"></span>最新预告 · 即将上线</span>
<div class="preview-title">多 Agent 协作实战</div>
<div class="preview-desc">定制自己的agent团队,多agent battle头脑风暴。</div>
</div>
<span class="preview-date">预计 2026 年 10 月上线</span>
</div>
<div class="works" data-mode="a"></div>
</section>
<section class="section" id="va-contact">
<div class="contact">
<h2>想聊聊?</h2>
<p>欢迎来信交流,或约一杯咖啡。</p>
<a class="btn solid" href="mailto:hello@example.com">pan.zhipiao@qq.com</a>
</div>
</section>
<footer class="footer">© 2026 你的名字 · 个人主页</footer>
</div>
</section>
<!-- ============ Variant B — 作品画廊 ============ -->
<section class="variant vb" id="variant-b">
<div class="wrap">
<header class="top">
<span class="name">你的名字</span>
<span class="tagline">AI 工程 · 把想法做成能跑的作品</span>
</header>
<section class="works-head" id="vb-works">
<h1>我的<span>作品</span>。</h1>
</section>
<div class="preview" id="vb-preview">
<span class="preview-kicker"><span class="dot"></span>最新预告 · 即将上线</span>
<div class="preview-title">多 Agent 协作实战</div>
<div class="preview-desc">把 Agent 当成团队来管:规划、委托、验收,一次讲透。</div>
<span class="preview-date">预计 2026 年 10 月上线</span>
</div>
<div class="masonry works" data-mode="b"></div>
<section class="about" id="vb-about">
<h2>关于我</h2>
<div>
<p>我做 AI 工程方向的内容,专注把 Agent、Skill 与工作流这些“听起来玄乎”的东西,变成一套可以复用的方法论。</p>
<p>下面这些作品,每一件都是一次完整的实践,而不是一个 demo 截图。</p>
</div>
</section>
<section class="contact" id="vb-contact">
<div class="box">
<h2>想一起做点什么?</h2>
<p>欢迎来信交流想法与合作。</p>
<a class="btn" href="mailto:hello@example.com">发送邮件</a>
</div>
</section>
<footer class="footer">© 2026 你的名字</footer>
</div>
</section>
<!-- ============ Variant C — 个人品牌 ============ -->
<section class="variant vc" id="variant-c">
<div class="wrap">
<nav class="nav">
<span class="brand">你的名字</span>
<div class="links">
<a href="#vc-works">作品</a>
<a href="#vc-about">关于</a>
<a href="#vc-contact">联系</a>
</div>
</nav>
<header class="hero">
<div class="avatar">你</div>
<h1>你的名字</h1>
<div class="pos">AI 工程创作者</div>
<p>把复杂的 Agent 与工作流拆开讲透,再把它们做成一个个真正能运行的作品。</p>
<div class="cta">
<a class="btn solid" href="#vc-works">浏览作品</a>
<a class="btn ghost" href="#vc-contact">联系我</a>
</div>
</header>
<div class="stats">
<div class="s"><div class="big">2</div><div class="lbl">作品</div></div>
<div class="s"><div class="big">22</div><div class="lbl">总课时</div></div>
<div class="s"><div class="big">8</div><div class="lbl">阶段</div></div>
</div>
<section class="about" id="vc-about">
<h2>关于我</h2>
<p>我相信“做出来才算数”。这里的每一件作品都对应一条可以跟着走的完整路径——从需求拆解、原型设计,到实现、调试与交付。</p>
<p>如果你也正在把 AI 能力落进真实项目里,希望这些内容能给你一点可复用的抓手。</p>
</section>
<section id="vc-works">
<div class="works-head"><h2>作品</h2></div>
<div class="preview" id="vc-preview">
<div class="preview-body">
<span class="preview-kicker"><span class="dot"></span>最新预告</span>
<div class="preview-title">多 Agent 协作实战 · 即将上线</div>
</div>
<span class="preview-date">2026 年 10 月</span>
</div>
<div class="works" data-mode="c"></div>
</section>
<section class="contact" id="vc-contact">
<h2>想聊聊?</h2>
<p>欢迎来信交流,或约一杯咖啡。</p>
<a class="btn solid" href="mailto:hello@example.com">hello@example.com</a>
</section>
<footer class="footer">© 2026 你的名字 · 个人主页</footer>
</div>
</section>
<!-- ============ Shared modal ============ -->
<div class="modal-overlay" id="modalOverlay">
<div class="modal">
<div class="modal-header">
<div>
<div class="modal-title" id="modalTitle"></div>
<div class="modal-sub" id="modalSub"></div>
</div>
<button class="modal-close" id="modalClose" aria-label="关闭">✕</button>
</div>
<div class="modal-body">
<input type="text" class="modal-search" id="modalSearch" placeholder="在作品内搜索...">
<div id="modalChapters"></div>
</div>
</div>
</div>
<script src="courses.js"></script>
<script>
const VARIANTS = [
{ key: 'A', name: '编辑杂志', el: document.getElementById('variant-a') },
{ key: 'B', name: '作品画廊', el: document.getElementById('variant-b') },
{ key: 'C', name: '个人品牌', el: document.getElementById('variant-c') },
];
// ---- data helpers ----
function totalLessons(c) { return c.stages.reduce((s, x) => s + x.lessons.length, 0); }
function totalStages(c) { return c.stages.length; }
function totalMinutes(c) {
const m = c.stats.find(s => /min/i.test(s.big));
return m ? m.big.replace('~', '') : '';
}
// ---- render works per variant mode ----
function renderA(container) {
container.innerHTML = COURSES.map((c, i) => `
<div class="work-row">
<span class="num">${String(i + 1).padStart(2, '0')}</span>
<div class="info">
<span class="tag">${c.tag}</span>
<h3>${c.title}</h3>
<p>${c.desc}</p>
<div class="meta">
<span>${totalLessons(c)} 课</span>
<span>${totalStages(c)} 阶段</span>
<span>${totalMinutes(c)}</span>
</div>
</div>
<a class="open" href="#" data-idx="${i}">查看作品 →</a>
</div>
`).join('');
}
function renderB(container) {
container.innerHTML = COURSES.map((c, i) => `
<div class="tile" style="background: linear-gradient(160deg, ${c.gradient});" data-idx="${i}">
<span class="tag">${c.tag}</span>
<h3>${c.title}</h3>
<p>${c.desc}</p>
<div class="meta">
<span>${totalLessons(c)} 课</span>
<span>${totalStages(c)} 阶段</span>
<span>${totalMinutes(c)}</span>
</div>
<span class="open">查看作品 →</span>
</div>
`).join('');
}
function renderC(container) {
container.innerHTML = COURSES.map((c, i) => `
<div class="chapter">
<div class="band" style="background: linear-gradient(140deg, ${c.gradient});">
<h3>${c.title}</h3>
</div>
<div class="body">
<span class="tag">${c.tag}</span>
<p>${c.desc}</p>
<div class="meta">
<span>${totalLessons(c)} 课</span>
<span>${totalStages(c)} 阶段</span>
<span>${totalMinutes(c)}</span>
</div>
<a class="btn solid" href="#" data-idx="${i}">查看作品</a>
</div>
</div>
`).join('');
}
const renderers = { a: renderA, b: renderB, c: renderC };
document.querySelectorAll('.works').forEach(el => renderers[el.dataset.mode](el));
// ---- modal ----
const overlay = document.getElementById('modalOverlay');
const modalTitle = document.getElementById('modalTitle');
const modalSub = document.getElementById('modalSub');
const modalChapters = document.getElementById('modalChapters');
const modalSearch = document.getElementById('modalSearch');
let current = null;
function chaptersHtml(c, q) {
const html = c.stages.map(st => {
const lessons = q ? st.lessons.filter(l => l.t.toLowerCase().includes(q)) : st.lessons;
if (q && !lessons.length) return '';
return `<div class="stage"><div class="stage-name">${st.name}</div><ul class="lessons">` +
lessons.map(l => `<li><span class="n">${l.n}</span><a href="${c.path}/lessons/${l.f}">${l.t}</a></li>`).join('') +
`</ul></div>`;
}).join('');
return html || '<div class="no-results">没有匹配的内容</div>';
}
function openModal(idx, q) {
const c = COURSES[idx];
current = c;
modalTitle.textContent = c.title;
modalSub.textContent = `${c.tag} · 共 ${totalLessons(c)} 课`;
modalSearch.value = q || '';
modalChapters.innerHTML = chaptersHtml(c, q || '');
overlay.classList.add('open');
if (!q) setTimeout(() => modalSearch.focus(), 60);
}
function closeModal() { overlay.classList.remove('open'); current = null; }
document.addEventListener('click', e => {
const t = e.target.closest('[data-idx]');
if (t) { e.preventDefault(); openModal(Number(t.dataset.idx)); }
});
document.getElementById('modalClose').addEventListener('click', closeModal);
overlay.addEventListener('click', e => { if (e.target === overlay) closeModal(); });
modalSearch.addEventListener('input', e => {
if (current) modalChapters.innerHTML = chaptersHtml(current, e.target.value);
});
document.addEventListener('keydown', e => {
if (e.key === 'Escape' && overlay.classList.contains('open')) closeModal();
});
// Default variant is set via HTML .active class on #variant-a
</script>
</body></html>