skill-base 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/README.md +141 -0
  2. package/bin/skill-base.js +53 -0
  3. package/data/.gitkeep +0 -0
  4. package/package.json +36 -0
  5. package/src/database.js +119 -0
  6. package/src/index.js +88 -0
  7. package/src/middleware/.gitkeep +0 -0
  8. package/src/middleware/admin.js +23 -0
  9. package/src/middleware/auth.js +96 -0
  10. package/src/middleware/error.js +23 -0
  11. package/src/models/.gitkeep +0 -0
  12. package/src/models/skill.js +57 -0
  13. package/src/models/user.js +130 -0
  14. package/src/models/version.js +57 -0
  15. package/src/routes/.gitkeep +0 -0
  16. package/src/routes/auth.js +173 -0
  17. package/src/routes/collaborators.js +260 -0
  18. package/src/routes/init.js +86 -0
  19. package/src/routes/publish.js +108 -0
  20. package/src/routes/skills.js +119 -0
  21. package/src/routes/users.js +169 -0
  22. package/src/utils/.gitkeep +0 -0
  23. package/src/utils/crypto.js +35 -0
  24. package/src/utils/permission.js +45 -0
  25. package/src/utils/zip.js +35 -0
  26. package/static/admin/users.html +593 -0
  27. package/static/cli-code.html +203 -0
  28. package/static/css/.gitkeep +0 -0
  29. package/static/css/style.css +1567 -0
  30. package/static/diff.html +466 -0
  31. package/static/file.html +443 -0
  32. package/static/index.html +251 -0
  33. package/static/js/.gitkeep +0 -0
  34. package/static/js/admin/users.js +346 -0
  35. package/static/js/app.js +508 -0
  36. package/static/js/auth.js +151 -0
  37. package/static/js/cli-code.js +184 -0
  38. package/static/js/collaborators.js +283 -0
  39. package/static/js/diff.js +540 -0
  40. package/static/js/file.js +619 -0
  41. package/static/js/i18n.js +739 -0
  42. package/static/js/index.js +168 -0
  43. package/static/js/publish.js +718 -0
  44. package/static/js/settings.js +124 -0
  45. package/static/js/setup.js +157 -0
  46. package/static/js/skill.js +808 -0
  47. package/static/login.html +82 -0
  48. package/static/publish.html +459 -0
  49. package/static/settings.html +163 -0
  50. package/static/setup.html +101 -0
  51. package/static/skill.html +851 -0
@@ -0,0 +1,443 @@
1
+ <!DOCTYPE html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title data-i18n="file.title">文件预览 - Skill Base</title>
7
+ <link rel="stylesheet" href="/css/style.css">
8
+ <!-- highlight.js 样式 -->
9
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@11.9.0/styles/github-dark.min.css">
10
+ <style>
11
+ /* 面包屑导航 */
12
+ .breadcrumb {
13
+ display: flex;
14
+ align-items: center;
15
+ gap: var(--spacing-sm);
16
+ font-size: 0.875rem;
17
+ color: var(--text-secondary);
18
+ margin-bottom: var(--spacing-lg);
19
+ flex-wrap: wrap;
20
+ }
21
+
22
+ .breadcrumb a {
23
+ color: var(--text-secondary);
24
+ }
25
+
26
+ .breadcrumb a:hover {
27
+ color: var(--primary-color);
28
+ }
29
+
30
+ .breadcrumb-separator {
31
+ color: var(--text-muted);
32
+ }
33
+
34
+ .breadcrumb-current {
35
+ color: var(--text-color);
36
+ font-weight: 500;
37
+ }
38
+
39
+ /* 版本信息栏 */
40
+ .version-bar {
41
+ background-color: var(--white);
42
+ border-radius: var(--radius);
43
+ box-shadow: var(--shadow);
44
+ padding: var(--spacing-md) var(--spacing-lg);
45
+ margin-bottom: var(--spacing-lg);
46
+ display: flex;
47
+ align-items: center;
48
+ justify-content: space-between;
49
+ flex-wrap: wrap;
50
+ gap: var(--spacing-md);
51
+ }
52
+
53
+ .version-info {
54
+ display: flex;
55
+ align-items: center;
56
+ gap: var(--spacing-md);
57
+ font-size: 0.875rem;
58
+ color: var(--text-secondary);
59
+ }
60
+
61
+ .version-info .version-tag {
62
+ font-size: 0.875rem;
63
+ }
64
+
65
+ /* 左右分栏布局 */
66
+ .file-layout {
67
+ display: grid;
68
+ grid-template-columns: 280px 1fr;
69
+ gap: var(--spacing-lg);
70
+ margin-bottom: var(--spacing-lg);
71
+ }
72
+
73
+ /* 文件树面板 */
74
+ .file-tree-panel {
75
+ background-color: var(--white);
76
+ border-radius: var(--radius);
77
+ box-shadow: var(--shadow);
78
+ padding: var(--spacing-md);
79
+ max-height: calc(100vh - 280px);
80
+ overflow-y: auto;
81
+ }
82
+
83
+ .file-tree-panel-title {
84
+ font-size: 0.875rem;
85
+ font-weight: 600;
86
+ color: var(--text-color);
87
+ margin-bottom: var(--spacing-md);
88
+ padding-bottom: var(--spacing-sm);
89
+ border-bottom: 1px solid var(--border-color);
90
+ }
91
+
92
+ /* 文件内容面板 */
93
+ .file-content-panel {
94
+ background-color: var(--white);
95
+ border-radius: var(--radius);
96
+ box-shadow: var(--shadow);
97
+ min-height: 500px;
98
+ display: flex;
99
+ flex-direction: column;
100
+ }
101
+
102
+ .file-content-header {
103
+ padding: var(--spacing-md) var(--spacing-lg);
104
+ border-bottom: 1px solid var(--border-color);
105
+ display: flex;
106
+ align-items: center;
107
+ justify-content: space-between;
108
+ gap: var(--spacing-md);
109
+ }
110
+
111
+ .file-content-path {
112
+ font-family: 'SF Mono', Monaco, 'Courier New', monospace;
113
+ font-size: 0.875rem;
114
+ color: var(--text-secondary);
115
+ word-break: break-all;
116
+ }
117
+
118
+ .file-content-body {
119
+ flex: 1;
120
+ padding: var(--spacing-lg);
121
+ overflow: auto;
122
+ }
123
+
124
+ .file-content-body pre {
125
+ margin: 0;
126
+ padding: var(--spacing-md);
127
+ background-color: var(--bg-color);
128
+ border-radius: var(--radius);
129
+ overflow-x: auto;
130
+ }
131
+
132
+ .file-content-body code {
133
+ font-family: 'SF Mono', Monaco, 'Courier New', monospace;
134
+ font-size: 0.8125rem;
135
+ line-height: 1.6;
136
+ }
137
+
138
+ /* 代码行号 */
139
+ .code-with-lines {
140
+ display: table;
141
+ width: 100%;
142
+ }
143
+
144
+ .code-line {
145
+ display: table-row;
146
+ }
147
+
148
+ .code-line-number {
149
+ display: table-cell;
150
+ width: 50px;
151
+ padding-right: var(--spacing-md);
152
+ text-align: right;
153
+ color: var(--text-muted);
154
+ user-select: none;
155
+ border-right: 1px solid var(--border-color);
156
+ vertical-align: top;
157
+ }
158
+
159
+ .code-line-content {
160
+ display: table-cell;
161
+ padding-left: var(--spacing-md);
162
+ white-space: pre;
163
+ }
164
+
165
+ /* Markdown 预览样式 */
166
+ .markdown-body {
167
+ line-height: 1.8;
168
+ }
169
+
170
+ .markdown-body h1,
171
+ .markdown-body h2,
172
+ .markdown-body h3,
173
+ .markdown-body h4 {
174
+ margin-top: 1.5em;
175
+ margin-bottom: 0.5em;
176
+ font-weight: 600;
177
+ }
178
+
179
+ .markdown-body h1 { font-size: 1.5rem; }
180
+ .markdown-body h2 { font-size: 1.25rem; }
181
+ .markdown-body h3 { font-size: 1.125rem; }
182
+
183
+ .markdown-body p {
184
+ margin-bottom: 1em;
185
+ }
186
+
187
+ .markdown-body ul,
188
+ .markdown-body ol {
189
+ padding-left: 2em;
190
+ margin-bottom: 1em;
191
+ }
192
+
193
+ .markdown-body li {
194
+ list-style: disc;
195
+ margin-bottom: 0.25em;
196
+ }
197
+
198
+ .markdown-body ol li {
199
+ list-style: decimal;
200
+ }
201
+
202
+ .markdown-body code {
203
+ background-color: var(--bg-color);
204
+ padding: 0.125em 0.375em;
205
+ border-radius: var(--radius-sm);
206
+ font-size: 0.875em;
207
+ }
208
+
209
+ .markdown-body pre code {
210
+ background: none;
211
+ padding: 0;
212
+ }
213
+
214
+ .markdown-body blockquote {
215
+ border-left: 4px solid var(--border-color);
216
+ padding-left: 1em;
217
+ color: var(--text-secondary);
218
+ margin: 1em 0;
219
+ }
220
+
221
+ .markdown-body table {
222
+ width: 100%;
223
+ border-collapse: collapse;
224
+ margin: 1em 0;
225
+ }
226
+
227
+ .markdown-body th,
228
+ .markdown-body td {
229
+ border: 1px solid var(--border-color);
230
+ padding: 0.5em 1em;
231
+ text-align: left;
232
+ }
233
+
234
+ .markdown-body th {
235
+ background-color: var(--bg-color);
236
+ }
237
+
238
+ /* 底部操作栏 */
239
+ .action-bar {
240
+ background-color: var(--white);
241
+ border-radius: var(--radius);
242
+ box-shadow: var(--shadow);
243
+ padding: var(--spacing-md) var(--spacing-lg);
244
+ display: flex;
245
+ align-items: center;
246
+ justify-content: space-between;
247
+ flex-wrap: wrap;
248
+ gap: var(--spacing-md);
249
+ }
250
+
251
+ .action-bar-left,
252
+ .action-bar-right {
253
+ display: flex;
254
+ align-items: center;
255
+ gap: var(--spacing-sm);
256
+ }
257
+
258
+ /* 空状态 */
259
+ .empty-preview {
260
+ display: flex;
261
+ flex-direction: column;
262
+ align-items: center;
263
+ justify-content: center;
264
+ height: 100%;
265
+ min-height: 300px;
266
+ color: var(--text-muted);
267
+ }
268
+
269
+ .empty-preview-icon {
270
+ font-size: 3rem;
271
+ margin-bottom: var(--spacing-md);
272
+ opacity: 0.5;
273
+ }
274
+
275
+ /* 二进制文件提示 */
276
+ .binary-notice {
277
+ text-align: center;
278
+ padding: var(--spacing-xl);
279
+ color: var(--text-secondary);
280
+ }
281
+
282
+ .binary-notice-icon {
283
+ font-size: 3rem;
284
+ margin-bottom: var(--spacing-md);
285
+ }
286
+
287
+ /* 大文件警告 */
288
+ .large-file-warning {
289
+ background-color: var(--warning-light);
290
+ color: var(--warning-color);
291
+ padding: var(--spacing-md);
292
+ border-radius: var(--radius);
293
+ margin-bottom: var(--spacing-md);
294
+ display: flex;
295
+ align-items: center;
296
+ gap: var(--spacing-sm);
297
+ }
298
+
299
+ /* Loading */
300
+ .loading-content {
301
+ display: flex;
302
+ align-items: center;
303
+ justify-content: center;
304
+ min-height: 200px;
305
+ }
306
+
307
+ @media (max-width: 768px) {
308
+ .file-layout {
309
+ grid-template-columns: 1fr;
310
+ }
311
+
312
+ .file-tree-panel {
313
+ max-height: 300px;
314
+ }
315
+
316
+ .version-bar {
317
+ flex-direction: column;
318
+ align-items: flex-start;
319
+ }
320
+
321
+ .action-bar {
322
+ flex-direction: column;
323
+ align-items: stretch;
324
+ }
325
+
326
+ .action-bar-left,
327
+ .action-bar-right {
328
+ justify-content: center;
329
+ }
330
+ }
331
+ </style>
332
+ </head>
333
+ <body class="app-devtools">
334
+ <!-- 导航栏 -->
335
+ <nav class="navbar">
336
+ <div class="container">
337
+ <a href="/" class="navbar-brand">
338
+ <svg class="navbar-brand-icon" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
339
+ <span>Skill Base</span>
340
+ </a>
341
+ <div class="navbar-nav">
342
+ <a href="/" data-i18n="nav.home">首页</a>
343
+ <a href="/publish.html" class="hide-mobile" data-i18n="nav.publish">发布</a>
344
+ </div>
345
+ </div>
346
+ </nav>
347
+
348
+ <!-- 页面内容 -->
349
+ <main class="page-content">
350
+ <div class="container">
351
+ <!-- 面包屑导航 -->
352
+ <nav class="breadcrumb">
353
+ <a href="/" data-i18n="skill.breadcrumbHome">首页</a>
354
+ <span class="breadcrumb-separator">›</span>
355
+ <a href="#" id="breadcrumb-skill" data-i18n="state.loading">加载中...</a>
356
+ <span class="breadcrumb-separator">›</span>
357
+ <span id="breadcrumb-file" class="breadcrumb-current" data-i18n="file.breadcrumbFile">文件</span>
358
+ </nav>
359
+
360
+ <!-- 版本信息栏 -->
361
+ <div class="version-bar">
362
+ <div class="version-info">
363
+ <span data-i18n="file.currentVersion">当前版本:</span>
364
+ <span id="current-version" class="version-tag current">-</span>
365
+ </div>
366
+ <div class="version-info">
367
+ <span id="file-size" class="text-muted">-</span>
368
+ </div>
369
+ </div>
370
+
371
+ <!-- 左右分栏:目录树 + 文件内容 -->
372
+ <section class="file-layout">
373
+ <!-- 文件树面板 -->
374
+ <div class="file-tree-panel">
375
+ <div class="file-tree-panel-title" data-i18n="file.fileDir">文件目录</div>
376
+ <div id="file-tree" class="file-tree">
377
+ <div class="loading-content">
378
+ <div class="spinner spinner-sm"></div>
379
+ </div>
380
+ </div>
381
+ </div>
382
+
383
+ <!-- 文件内容面板 -->
384
+ <div class="file-content-panel">
385
+ <div class="file-content-header">
386
+ <span id="file-path" class="file-content-path" data-i18n="file.selectFile">选择文件以预览</span>
387
+ </div>
388
+ <div id="file-content" class="file-content-body">
389
+ <div class="empty-preview">
390
+ <div class="empty-preview-icon">📄</div>
391
+ <p data-i18n="file.clickFile">点击左侧文件查看内容</p>
392
+ </div>
393
+ </div>
394
+ </div>
395
+ </section>
396
+
397
+ <!-- 底部操作栏 -->
398
+ <div class="action-bar">
399
+ <div class="action-bar-left">
400
+ <button class="btn btn-primary" onclick="downloadCurrentVersion()">
401
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
402
+ <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
403
+ <polyline points="7 10 12 15 17 10"/>
404
+ <line x1="12" y1="15" x2="12" y2="3"/>
405
+ </svg>
406
+ <span data-i18n="file.download">下载当前版本</span>
407
+ </button>
408
+ <select id="version-select" class="version-select" onchange="onVersionChange(this.value)" style="min-width: 150px;">
409
+ <option value="" data-i18n="file.selectOtherVersion">选择其他版本...</option>
410
+ </select>
411
+ </div>
412
+ <div class="action-bar-right">
413
+ <button class="btn btn-secondary" onclick="goToDiff()">
414
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
415
+ <line x1="18" y1="20" x2="18" y2="10"/>
416
+ <line x1="12" y1="20" x2="12" y2="4"/>
417
+ <line x1="6" y1="20" x2="6" y2="14"/>
418
+ </svg>
419
+ <span data-i18n="file.compare">对比版本</span>
420
+ </button>
421
+ <button class="btn btn-secondary" onclick="goToSkillDetail()">
422
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
423
+ <line x1="19" y1="12" x2="5" y2="12"/>
424
+ <polyline points="12 19 5 12 12 5"/>
425
+ </svg>
426
+ <span data-i18n="file.back">返回详情页</span>
427
+ </button>
428
+ </div>
429
+ </div>
430
+ </div>
431
+ </main>
432
+
433
+ <!-- CDN 库 -->
434
+ <script src="https://cdn.jsdelivr.net/npm/jszip@3.10.1/dist/jszip.min.js"></script>
435
+ <script src="https://cdn.jsdelivr.net/npm/marked@11.1.1/marked.min.js"></script>
436
+ <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script>
437
+
438
+ <!-- 引入 JS -->
439
+ <script src="/js/i18n.js"></script>
440
+ <script src="/js/app.js"></script>
441
+ <script src="/js/file.js"></script>
442
+ </body>
443
+ </html>
@@ -0,0 +1,251 @@
1
+ <!DOCTYPE html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Skill Base</title>
7
+ <link rel="stylesheet" href="/css/style.css">
8
+ <style>
9
+ /* 页面标题区域 */
10
+ .page-header {
11
+ margin-bottom: var(--spacing-lg);
12
+ }
13
+
14
+ .page-title {
15
+ font-size: 1.75rem;
16
+ font-weight: 700;
17
+ color: var(--text-color);
18
+ margin-bottom: var(--spacing-md);
19
+ }
20
+
21
+ /* 搜索栏 */
22
+ .search-container {
23
+ max-width: 500px;
24
+ }
25
+
26
+ /* Skill 卡片网格 */
27
+ .skill-grid {
28
+ display: grid;
29
+ grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
30
+ gap: var(--spacing-lg);
31
+ }
32
+
33
+ .skill-card {
34
+ background-color: var(--white);
35
+ border-radius: var(--radius);
36
+ box-shadow: var(--shadow);
37
+ padding: var(--spacing-lg);
38
+ cursor: pointer;
39
+ transition: var(--transition);
40
+ text-decoration: none;
41
+ color: inherit;
42
+ display: block;
43
+ }
44
+
45
+ .skill-card:hover {
46
+ box-shadow: var(--shadow-md);
47
+ transform: translateY(-2px);
48
+ text-decoration: none;
49
+ }
50
+
51
+ .skill-card-header {
52
+ display: flex;
53
+ align-items: flex-start;
54
+ justify-content: space-between;
55
+ margin-bottom: var(--spacing-sm);
56
+ }
57
+
58
+ .skill-card-name {
59
+ font-size: 1.125rem;
60
+ font-weight: 600;
61
+ color: var(--text-color);
62
+ margin: 0;
63
+ }
64
+
65
+ .skill-card-desc {
66
+ font-size: 0.875rem;
67
+ color: var(--text-secondary);
68
+ line-height: 1.5;
69
+ margin-bottom: var(--spacing-md);
70
+ display: -webkit-box;
71
+ -webkit-line-clamp: 2;
72
+ -webkit-box-orient: vertical;
73
+ overflow: hidden;
74
+ }
75
+
76
+ .skill-card-footer {
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: space-between;
80
+ font-size: 0.75rem;
81
+ color: var(--text-muted);
82
+ }
83
+
84
+ .skill-card-meta {
85
+ display: flex;
86
+ align-items: center;
87
+ gap: var(--spacing-md);
88
+ }
89
+
90
+ .skill-card-owner {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: var(--spacing-xs);
94
+ }
95
+
96
+ /* 空状态 */
97
+ .empty-state {
98
+ text-align: center;
99
+ padding: var(--spacing-xl) var(--spacing-md);
100
+ color: var(--text-secondary);
101
+ }
102
+
103
+ .empty-state-icon {
104
+ font-size: 4rem;
105
+ margin-bottom: var(--spacing-md);
106
+ opacity: 0.5;
107
+ }
108
+
109
+ .empty-state-text {
110
+ font-size: 1rem;
111
+ margin-bottom: var(--spacing-md);
112
+ }
113
+
114
+ /* 浮动按钮 */
115
+ .fab {
116
+ position: fixed;
117
+ bottom: var(--spacing-xl);
118
+ right: var(--spacing-xl);
119
+ width: 56px;
120
+ height: 56px;
121
+ border-radius: 50%;
122
+ background-color: var(--primary-color);
123
+ color: var(--white);
124
+ border: none;
125
+ box-shadow: var(--shadow-lg);
126
+ cursor: pointer;
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ transition: var(--transition);
131
+ text-decoration: none;
132
+ font-size: 1.5rem;
133
+ }
134
+
135
+ .fab:hover {
136
+ background-color: var(--primary-hover);
137
+ transform: scale(1.1);
138
+ text-decoration: none;
139
+ }
140
+
141
+ /* Loading 骨架屏 */
142
+ .skeleton-card {
143
+ background-color: var(--white);
144
+ border-radius: var(--radius);
145
+ box-shadow: var(--shadow);
146
+ padding: var(--spacing-lg);
147
+ }
148
+
149
+ .skeleton-title {
150
+ height: 24px;
151
+ width: 60%;
152
+ margin-bottom: var(--spacing-sm);
153
+ }
154
+
155
+ .skeleton-desc {
156
+ height: 16px;
157
+ width: 100%;
158
+ margin-bottom: var(--spacing-xs);
159
+ }
160
+
161
+ .skeleton-desc-short {
162
+ height: 16px;
163
+ width: 75%;
164
+ margin-bottom: var(--spacing-md);
165
+ }
166
+
167
+ .skeleton-footer {
168
+ height: 14px;
169
+ width: 50%;
170
+ }
171
+
172
+ @media (max-width: 768px) {
173
+ .skill-grid {
174
+ grid-template-columns: 1fr;
175
+ }
176
+
177
+ .fab {
178
+ bottom: var(--spacing-lg);
179
+ right: var(--spacing-lg);
180
+ }
181
+ }
182
+ </style>
183
+ </head>
184
+ <body class="app-devtools">
185
+ <!-- 导航栏 -->
186
+ <nav class="navbar">
187
+ <div class="container">
188
+ <a href="/" class="navbar-brand">
189
+ <svg class="navbar-brand-icon" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"/><polyline points="3.27 6.96 12 12.01 20.73 6.96"/><line x1="12" y1="22.08" x2="12" y2="12"/></svg>
190
+ <span>Skill Base</span>
191
+ </a>
192
+ <div class="navbar-nav">
193
+ <a href="/" class="active" data-i18n="nav.home">首页</a>
194
+ <a href="/publish.html" class="hide-mobile" data-i18n="nav.publish">发布</a>
195
+ </div>
196
+ <!-- 用户区域由 JS 动态渲染 -->
197
+ </div>
198
+ </nav>
199
+
200
+ <!-- 页面内容 -->
201
+ <main class="page-content">
202
+ <div class="container">
203
+ <!-- 页面标题 + 搜索 -->
204
+ <div class="page-header">
205
+ <!-- <h1 class="page-title">Skill Base</h1> -->
206
+ <div class="search-container">
207
+ <div class="search-bar">
208
+ <input
209
+ type="search"
210
+ id="searchInput"
211
+ data-i18n-placeholder="index.searchPlaceholder"
212
+ placeholder="搜索 Skill..."
213
+ autocomplete="off"
214
+ >
215
+ <span class="search-icon">
216
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
217
+ <circle cx="11" cy="11" r="8"/>
218
+ <line x1="21" y1="21" x2="16.65" y2="16.65"/>
219
+ </svg>
220
+ </span>
221
+ <button type="button" class="clear-btn" id="clearSearch">
222
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
223
+ <line x1="18" y1="6" x2="6" y2="18"/>
224
+ <line x1="6" y1="6" x2="18" y2="18"/>
225
+ </svg>
226
+ </button>
227
+ </div>
228
+ </div>
229
+ </div>
230
+
231
+ <!-- Skill 列表 -->
232
+ <div id="skill-list" class="skill-grid">
233
+ <!-- 由 JS 动态渲染 -->
234
+ </div>
235
+ </div>
236
+ </main>
237
+
238
+ <!-- 浮动发布按钮 -->
239
+ <a href="/publish.html" class="fab" data-i18n-title="index.fabTitle" title="发布新版本">
240
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
241
+ <line x1="12" y1="5" x2="12" y2="19"/>
242
+ <line x1="5" y1="12" x2="19" y2="12"/>
243
+ </svg>
244
+ </a>
245
+
246
+ <!-- 引入 JS -->
247
+ <script src="/js/i18n.js"></script>
248
+ <script src="/js/app.js"></script>
249
+ <script src="/js/index.js"></script>
250
+ </body>
251
+ </html>
File without changes