Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
486 lines (428 loc) · 11.9 KB
/
Copy pathindex.html
File metadata and controls
486 lines (428 loc) · 11.9 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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GavinSR的知识库</title>
<style>
:root {
color-scheme: light;
--bg: #f6f4ef;
--surface: #ffffff;
--surface-muted: #f1eee7;
--ink: #202124;
--muted: #6a645b;
--line: #dad4c8;
--accent: #1f6f68;
--accent-strong: #174f4a;
--blue: #285f9f;
--red: #a23d3d;
--green: #28724d;
--shadow: 0 14px 40px rgba(41, 35, 25, 0.12);
}
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
min-height: 100%;
background: var(--bg);
color: var(--ink);
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
letter-spacing: 0;
}
body {
min-height: 100vh;
}
a {
color: inherit;
}
.shell {
width: min(1560px, 100%);
min-height: 100vh;
margin: 0 auto;
padding: 22px;
display: grid;
grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
gap: 18px;
}
.sidebar {
min-height: calc(100vh - 44px);
display: flex;
flex-direction: column;
gap: 16px;
}
.masthead {
padding: 22px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--surface);
box-shadow: var(--shadow);
}
.eyebrow {
margin: 0 0 10px;
color: var(--accent);
font-size: 12px;
font-weight: 700;
text-transform: uppercase;
}
h1 {
margin: 0;
font-size: 28px;
line-height: 1.12;
font-weight: 760;
}
.intro {
margin: 14px 0 0;
color: var(--muted);
font-size: 14px;
line-height: 1.6;
}
.nav-section {
border: 1px solid var(--line);
border-radius: 8px;
background: var(--surface);
overflow: hidden;
box-shadow: var(--shadow);
}
.section-title {
margin: 0;
padding: 13px 14px;
border-bottom: 1px solid var(--line);
color: var(--muted);
background: var(--surface-muted);
font-size: 13px;
font-weight: 760;
}
.section-heading {
padding: 11px 12px 11px 14px;
border-bottom: 1px solid var(--line);
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 10px;
align-items: center;
background: var(--surface-muted);
}
.project-link {
color: inherit;
text-decoration: none;
cursor: pointer;
}
.project-link:hover,
.project-link:focus-visible {
outline: 0;
background: #fbfaf7;
}
.section-heading .section-title {
padding: 0;
border-bottom: 0;
background: transparent;
}
.section-open-link {
width: 30px;
height: 30px;
padding: 0;
border: 0;
border-radius: 999px;
display: inline-flex;
align-items: center;
justify-content: center;
background: transparent;
color: var(--accent-strong);
text-decoration: none;
}
.project-link:hover .section-open-link,
.project-link:focus-visible .section-open-link,
.section-open-link:hover,
.section-open-link:focus-visible {
outline: 0;
background: rgba(31, 111, 104, 0.08);
color: var(--accent);
}
.section-open-link svg {
width: 18px;
height: 18px;
display: block;
stroke: currentColor;
}
.nav-list {
display: grid;
gap: 1px;
background: var(--line);
}
.nav-item {
width: 100%;
min-height: 86px;
padding: 13px;
display: grid;
grid-template-columns: 54px minmax(0, 1fr);
gap: 12px;
border: 0;
background: var(--surface);
color: var(--ink);
text-align: left;
cursor: pointer;
font: inherit;
}
.nav-item:hover,
.nav-item:focus-visible {
outline: 0;
background: #fbfaf7;
}
.nav-item.is-active {
background: #edf7f4;
box-shadow: inset 4px 0 0 var(--accent);
}
.thumb {
width: 54px;
height: 60px;
border: 1px solid var(--line);
border-radius: 6px;
display: grid;
place-items: center;
overflow: hidden;
background: #ece7dc;
color: var(--accent-strong);
font-size: 13px;
font-weight: 800;
}
.thumb img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.thumb.doc {
background: #e8f0ee;
}
.thumb.devtools {
background: #eef0d8;
color: #716a20;
}
.thumb.gstack {
background: #e7edf7;
color: var(--blue);
}
.thumb.pages {
background: #e3f2ee;
color: var(--accent-strong);
}
.item-title {
display: block;
font-size: 15px;
line-height: 1.35;
font-weight: 760;
}
.item-meta {
display: block;
margin-top: 7px;
color: var(--muted);
font-size: 12px;
line-height: 1.45;
}
.preview {
min-width: 0;
min-height: calc(100vh - 44px);
border: 1px solid var(--line);
border-radius: 8px;
background: var(--surface);
overflow: hidden;
box-shadow: var(--shadow);
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.preview-bar {
min-height: 66px;
padding: 13px 15px;
border-bottom: 1px solid var(--line);
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 14px;
align-items: center;
background: #fbfaf7;
}
.preview-title {
margin: 0;
font-size: 17px;
line-height: 1.35;
font-weight: 780;
}
.preview-path {
margin: 4px 0 0;
color: var(--muted);
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
font-size: 12px;
line-height: 1.4;
overflow-wrap: anywhere;
}
.open-link {
width: 38px;
height: 38px;
padding: 0;
border: 0;
border-radius: 999px;
display: inline-flex;
align-items: center;
justify-content: center;
background: transparent;
color: var(--accent-strong);
text-decoration: none;
}
.open-link:hover,
.open-link:focus-visible {
outline: 0;
background: rgba(31, 111, 104, 0.08);
color: var(--accent);
}
.open-link svg {
width: 18px;
height: 18px;
display: block;
stroke: currentColor;
}
iframe {
width: 100%;
height: 100%;
min-height: 720px;
border: 0;
background: #fff;
}
.status-row {
padding: 10px 14px 14px;
color: var(--muted);
font-size: 12px;
line-height: 1.45;
}
@media (max-width: 980px) {
.shell {
grid-template-columns: 1fr;
padding: 14px;
}
.sidebar,
.preview {
min-height: auto;
}
.preview {
height: min(760px, 78vh);
}
}
@media (max-width: 620px) {
.shell {
padding: 10px;
}
.masthead {
padding: 18px;
}
h1 {
font-size: 24px;
}
.nav-item {
grid-template-columns: 46px minmax(0, 1fr);
}
.thumb {
width: 46px;
height: 54px;
}
}
</style>
</head>
<body>
<main class="shell">
<aside class="sidebar" aria-label="知识库导航">
<header class="masthead">
<p class="eyebrow">My Knowledge</p>
<h1>GavinSR的知识库</h1>
<p class="intro">选择左侧条目,在右侧切换预览;需要完整页面时,用新窗口打开。</p>
</header>
<section class="nav-section" aria-labelledby="docs-title">
<h2 class="section-title" id="docs-title">Notes</h2>
<div class="nav-list">
<button class="nav-item is-active" type="button" data-title="开源项目贡献指南" data-src="opensource-contribution-guide.html">
<span class="thumb doc">OS</span>
<span>
<span class="item-title">开源项目贡献指南</span>
<span class="item-meta">无构建步骤型前端项目的贡献流程</span>
</span>
</button>
<button class="nav-item" type="button" data-title="DevTools CSS 协作工作流" data-src="DevTools-CSS协作工作流.html">
<span class="thumb devtools">CSS</span>
<span>
<span class="item-title">DevTools CSS 协作工作流</span>
<span class="item-meta">浏览器调参和 AI 工程约束协作</span>
</span>
</button>
<button class="nav-item" type="button" data-title="GStack → Hermes 技能手册" data-src="gstack-hermes-guide.html">
<span class="thumb gstack">GH</span>
<span>
<span class="item-title">GStack → Hermes 技能手册</span>
<span class="item-meta">从审查、调试到发布的技能索引</span>
</span>
</button>
<button class="nav-item" type="button" data-title="GitHub Pages 手动设置指南" data-src="github-pages-setup-guide.html">
<span class="thumb pages">PG</span>
<span>
<span class="item-title">GitHub Pages 手动设置指南</span>
<span class="item-meta">把仓库首页发布成在线网页的设置步骤</span>
</span>
</button>
</div>
</section>
<section class="nav-section" aria-labelledby="renting-title">
<a class="section-heading project-link" href="Le-Renting/index.html" target="_blank" rel="noreferrer" aria-label="独立窗口打开 Le-Renting">
<h2 class="section-title" id="renting-title">Le-Renting</h2>
<span class="section-open-link" aria-hidden="true">
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
<path d="M5 12h14M13 6l6 6-6 6" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</span>
</a>
</section>
</aside>
<section class="preview" aria-label="页面预览">
<div class="preview-bar">
<div>
<h2 class="preview-title" id="previewTitle">开源项目贡献指南</h2>
<p class="preview-path" id="previewPath">opensource-contribution-guide.html</p>
</div>
<a class="open-link" id="openLink" href="opensource-contribution-guide.html" target="_blank" rel="noreferrer" aria-label="新窗口打开当前预览">
<svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
<path d="M7 17 17 7M10 7h7v7" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</a>
</div>
<iframe id="previewFrame" title="知识库页面预览" src="opensource-contribution-guide.html"></iframe>
</section>
</main>
<script>
const items = Array.from(document.querySelectorAll(".nav-item"));
const frame = document.getElementById("previewFrame");
const title = document.getElementById("previewTitle");
const path = document.getElementById("previewPath");
const openLink = document.getElementById("openLink");
function activate(item) {
const nextTitle = item.dataset.title;
const nextSrc = item.dataset.src;
items.forEach((entry) => {
entry.classList.toggle("is-active", entry === item);
});
title.textContent = nextTitle;
path.textContent = nextSrc;
frame.src = nextSrc;
openLink.href = nextSrc;
}
items.forEach((item) => {
item.addEventListener("click", () => activate(item));
item.addEventListener("keydown", (event) => {
if (item.tagName === "BUTTON") {
return;
}
if (event.key === "Enter" || event.key === " ") {
event.preventDefault();
activate(item);
}
});
});
</script>
</body>
</html>