opensource-showcase 0.1.6 → 0.1.9
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.
- package/README.md +165 -88
- package/dist/auth/github-auth.d.ts.map +1 -1
- package/dist/auth/github-auth.js +1 -1
- package/dist/auth/github-auth.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/main.d.ts.map +1 -1
- package/dist/commands/main.js +4 -4
- package/dist/commands/main.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -6
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -7
- package/dist/constants.js.map +1 -1
- package/dist/filter/filter-prs.d.ts.map +1 -1
- package/dist/filter/filter-prs.js.map +1 -1
- package/dist/github/fetch-prs.d.ts.map +1 -1
- package/dist/github/fetch-prs.js +8 -6
- package/dist/github/fetch-prs.js.map +1 -1
- package/dist/github/fetch-repos.d.ts.map +1 -1
- package/dist/github/fetch-repos.js.map +1 -1
- package/dist/repo/generate-readme.d.ts.map +1 -1
- package/dist/repo/generate-readme.js +4 -21
- package/dist/repo/generate-readme.js.map +1 -1
- package/dist/repo/generate-site.d.ts.map +1 -1
- package/dist/repo/generate-site.js +3 -10
- package/dist/repo/generate-site.js.map +1 -1
- package/dist/repo/manage-repo.d.ts.map +1 -1
- package/dist/repo/manage-repo.js.map +1 -1
- package/dist/repo/site/assets.d.ts +1 -1
- package/dist/repo/site/assets.d.ts.map +1 -1
- package/dist/repo/site/assets.js +379 -115
- package/dist/repo/site/assets.js.map +1 -1
- package/dist/repo/site/components.d.ts.map +1 -1
- package/dist/repo/site/components.js +32 -14
- package/dist/repo/site/components.js.map +1 -1
- package/dist/repo/site/utils.d.ts.map +1 -1
- package/dist/repo/site/utils.js +8 -14
- package/dist/repo/site/utils.js.map +1 -1
- package/dist/templates/project-section.d.ts +1 -1
- package/dist/templates/project-section.d.ts.map +1 -1
- package/dist/templates/project-section.js +51 -73
- package/dist/templates/project-section.js.map +1 -1
- package/dist/templates/readme-footer.d.ts.map +1 -1
- package/dist/templates/readme-footer.js +1 -11
- package/dist/templates/readme-footer.js.map +1 -1
- package/dist/templates/readme-header.d.ts +1 -1
- package/dist/templates/readme-header.d.ts.map +1 -1
- package/dist/templates/readme-header.js +38 -97
- package/dist/templates/readme-header.js.map +1 -1
- package/dist/ui/interactive.d.ts.map +1 -1
- package/dist/ui/interactive.js +3 -3
- package/dist/ui/interactive.js.map +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js.map +1 -1
- package/package.json +4 -4
package/dist/repo/site/assets.js
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
export function renderStyles() {
|
|
2
2
|
return `<style>
|
|
3
3
|
:root {
|
|
4
|
-
/*
|
|
5
|
-
--bg: #
|
|
6
|
-
--panel: #
|
|
7
|
-
--panel-soft: #
|
|
8
|
-
--text: #
|
|
9
|
-
--muted: #
|
|
10
|
-
--line: #
|
|
11
|
-
--accent: #
|
|
12
|
-
--accent-
|
|
13
|
-
--
|
|
4
|
+
/* GitHub Light Theme */
|
|
5
|
+
--bg: #ffffff;
|
|
6
|
+
--panel: #f6f8fa;
|
|
7
|
+
--panel-soft: #ffffff;
|
|
8
|
+
--text: #1f2328;
|
|
9
|
+
--muted: #59636e;
|
|
10
|
+
--line: #d1d9e0;
|
|
11
|
+
--accent: #0969da;
|
|
12
|
+
--accent-hover: #0550ae;
|
|
13
|
+
--accent-strong: #0a3069;
|
|
14
|
+
--shadow: 0 1px 3px rgba(27, 31, 36, 0.12), 0 8px 24px rgba(66, 74, 83, 0.12);
|
|
15
|
+
--border-default: #d0d7de;
|
|
16
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
|
|
17
|
+
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
* { box-sizing: border-box; }
|
|
@@ -19,11 +23,17 @@ export function renderStyles() {
|
|
|
19
23
|
margin: 0;
|
|
20
24
|
background: var(--bg);
|
|
21
25
|
color: var(--text);
|
|
22
|
-
font-family: -
|
|
26
|
+
font-family: var(--font-sans);
|
|
23
27
|
line-height: 1.6;
|
|
24
28
|
}
|
|
25
29
|
|
|
26
|
-
a {
|
|
30
|
+
a {
|
|
31
|
+
color: var(--accent);
|
|
32
|
+
text-decoration: none;
|
|
33
|
+
}
|
|
34
|
+
a:hover {
|
|
35
|
+
text-decoration: underline;
|
|
36
|
+
}
|
|
27
37
|
|
|
28
38
|
/* Full Width Container */
|
|
29
39
|
.shell {
|
|
@@ -37,10 +47,10 @@ export function renderStyles() {
|
|
|
37
47
|
position: sticky;
|
|
38
48
|
top: 0;
|
|
39
49
|
z-index: 100;
|
|
40
|
-
background:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
background: var(--panel);
|
|
51
|
+
border-bottom: 1px solid var(--border-default);
|
|
52
|
+
padding: 16px 0;
|
|
53
|
+
box-shadow: 0 1px 0 rgba(27, 31, 36, 0.04);
|
|
44
54
|
}
|
|
45
55
|
|
|
46
56
|
.navbar-inner {
|
|
@@ -50,49 +60,271 @@ export function renderStyles() {
|
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
.nav-identity { display: flex; align-items: center; gap: 12px; }
|
|
53
|
-
.nav-avatar { width:
|
|
54
|
-
.nav-info { display: flex; flex-direction: column; line-height: 1.
|
|
55
|
-
.nav-name { font-weight:
|
|
56
|
-
.nav-handle { font-size: 0.
|
|
57
|
-
.nav-
|
|
63
|
+
.nav-avatar { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-default); }
|
|
64
|
+
.nav-info { display: flex; flex-direction: column; line-height: 1.3; }
|
|
65
|
+
.nav-name { font-weight: 600; font-size: 0.95rem; color: var(--text); }
|
|
66
|
+
.nav-handle { font-size: 0.85rem; color: var(--muted); }
|
|
67
|
+
.nav-handle a { color: var(--accent); }
|
|
68
|
+
.nav-controls { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
|
|
58
69
|
|
|
59
70
|
.search {
|
|
60
71
|
width: 300px;
|
|
61
|
-
height:
|
|
62
|
-
padding:
|
|
63
|
-
border: 1px solid var(--
|
|
72
|
+
height: 32px;
|
|
73
|
+
padding: 5px 12px;
|
|
74
|
+
border: 1px solid var(--border-default);
|
|
64
75
|
border-radius: 6px;
|
|
65
|
-
background: var(--panel);
|
|
66
|
-
font-size: 0.
|
|
76
|
+
background: var(--panel-soft);
|
|
77
|
+
font-size: 0.875rem;
|
|
78
|
+
color: var(--text);
|
|
79
|
+
}
|
|
80
|
+
.search:focus {
|
|
81
|
+
outline: 2px solid var(--accent);
|
|
82
|
+
outline-offset: -1px;
|
|
83
|
+
border-color: var(--accent);
|
|
67
84
|
}
|
|
68
|
-
|
|
69
|
-
.filters { display: flex; gap: 4px; background: var(--panel-soft); padding: 3px; border-radius: 6px; border: 1px solid var(--line); }
|
|
70
|
-
.filter { height: 30px; padding: 0 12px; border: none; background: transparent; cursor: pointer; border-radius: 4px; font-weight: 500; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
|
|
71
|
-
.filter.is-active { background: var(--panel); box-shadow: var(--shadow); font-weight: 600; }
|
|
72
85
|
|
|
73
86
|
/* Main Content Layout */
|
|
74
87
|
main { padding: 32px 0 64px; }
|
|
75
88
|
|
|
89
|
+
/* Repository Section - Full Width */
|
|
76
90
|
.repo-section {
|
|
77
91
|
margin-top: 24px;
|
|
78
92
|
padding: 24px;
|
|
79
|
-
background: var(--panel);
|
|
80
|
-
border: 1px solid var(--
|
|
81
|
-
border-
|
|
82
|
-
|
|
93
|
+
background: var(--panel-soft);
|
|
94
|
+
border: 1px solid var(--border-default);
|
|
95
|
+
border-left: 4px solid var(--accent);
|
|
96
|
+
border-radius: 6px;
|
|
97
|
+
box-shadow: 0 1px 0 rgba(27, 31, 36, 0.04);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.repo-header {
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
align-items: flex-start;
|
|
104
|
+
gap: 24px;
|
|
105
|
+
margin: -24px -24px 0;
|
|
106
|
+
padding: 16px 20px 16px;
|
|
107
|
+
background: linear-gradient(180deg, var(--panel) 0%, var(--panel-soft) 100%);
|
|
108
|
+
border-bottom: 1px solid var(--border-default);
|
|
109
|
+
border-radius: 2px 6px 0 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.repo-title-area {
|
|
113
|
+
flex: 1;
|
|
83
114
|
}
|
|
84
115
|
|
|
85
|
-
.repo-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
116
|
+
.repo-name {
|
|
117
|
+
display: inline-flex;
|
|
118
|
+
gap: 10px;
|
|
119
|
+
align-items: center;
|
|
120
|
+
font-weight: 600;
|
|
121
|
+
font-size: 1.125rem;
|
|
122
|
+
color: var(--accent);
|
|
123
|
+
}
|
|
124
|
+
.repo-name:hover {
|
|
125
|
+
color: var(--accent-hover);
|
|
126
|
+
text-decoration: underline;
|
|
127
|
+
}
|
|
128
|
+
.repo-name img {
|
|
129
|
+
border: 1px solid var(--border-default);
|
|
130
|
+
border-radius: 6px;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.repo-description {
|
|
134
|
+
margin: 8px 0 0 42px;
|
|
135
|
+
color: var(--muted);
|
|
136
|
+
font-size: 0.875rem;
|
|
137
|
+
line-height: 1.5;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.repo-stats {
|
|
141
|
+
display: flex;
|
|
142
|
+
gap: 8px;
|
|
143
|
+
align-items: center;
|
|
144
|
+
flex-wrap: wrap;
|
|
145
|
+
}
|
|
146
|
+
.repo-stats span {
|
|
147
|
+
padding: 5px 12px;
|
|
148
|
+
background: var(--panel-soft);
|
|
149
|
+
border: 1px solid var(--border-default);
|
|
150
|
+
border-radius: 6px;
|
|
151
|
+
font-size: 0.75rem;
|
|
152
|
+
font-weight: 500;
|
|
153
|
+
color: var(--muted);
|
|
154
|
+
}
|
|
155
|
+
.repo-stats strong {
|
|
156
|
+
font-weight: 600;
|
|
157
|
+
color: var(--text);
|
|
158
|
+
}
|
|
91
159
|
|
|
92
|
-
/* Contribution Details */
|
|
160
|
+
/* Contribution Details - Recruiter Optimized */
|
|
93
161
|
.contribution-list { display: grid; gap: 16px; margin-top: 20px; }
|
|
94
|
-
.contribution {
|
|
95
|
-
|
|
162
|
+
.contribution {
|
|
163
|
+
padding: 16px;
|
|
164
|
+
border: 1px solid var(--border-default);
|
|
165
|
+
border-radius: 6px;
|
|
166
|
+
background: var(--bg);
|
|
167
|
+
transition: all 0.1s ease;
|
|
168
|
+
}
|
|
169
|
+
.contribution:hover {
|
|
170
|
+
border-color: var(--muted);
|
|
171
|
+
box-shadow: var(--shadow);
|
|
172
|
+
}
|
|
173
|
+
.pr-heading {
|
|
174
|
+
display: flex;
|
|
175
|
+
align-items: center;
|
|
176
|
+
gap: 8px;
|
|
177
|
+
min-width: 0;
|
|
178
|
+
margin-bottom: 8px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.merge-icon-wrap {
|
|
182
|
+
display: inline-flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
flex: 0 0 auto;
|
|
186
|
+
width: 16px;
|
|
187
|
+
height: 16px;
|
|
188
|
+
color: #8250df;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.merge-icon {
|
|
192
|
+
width: 16px;
|
|
193
|
+
height: 16px;
|
|
194
|
+
fill: currentColor;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.pr-title {
|
|
198
|
+
font-weight: 600;
|
|
199
|
+
font-size: 1rem;
|
|
200
|
+
min-width: 0;
|
|
201
|
+
color: var(--accent);
|
|
202
|
+
}
|
|
203
|
+
.pr-title:hover {
|
|
204
|
+
color: var(--accent-hover);
|
|
205
|
+
text-decoration: underline;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.pr-number {
|
|
209
|
+
flex: 0 0 auto;
|
|
210
|
+
color: var(--muted);
|
|
211
|
+
font-size: 0.875rem;
|
|
212
|
+
font-weight: 500;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.pr-number:hover {
|
|
216
|
+
color: var(--accent-hover);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.brief-description {
|
|
220
|
+
margin: 0 0 12px 0;
|
|
221
|
+
font-size: 0.875rem;
|
|
222
|
+
color: var(--muted);
|
|
223
|
+
line-height: 1.5;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.pr-facts {
|
|
227
|
+
display: grid;
|
|
228
|
+
gap: 6px;
|
|
229
|
+
margin: 12px 0 0;
|
|
230
|
+
padding-left: 20px;
|
|
231
|
+
color: var(--muted);
|
|
232
|
+
font-size: 0.875rem;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.pr-facts li {
|
|
236
|
+
padding-left: 2px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.pr-facts strong {
|
|
240
|
+
color: var(--text);
|
|
241
|
+
font-weight: 600;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.change-fact {
|
|
245
|
+
line-height: 1.8;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.change-fact .diff-badge {
|
|
249
|
+
margin-left: 4px;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* GitHub-style diff badges */
|
|
253
|
+
.diff-badge {
|
|
254
|
+
display: inline-flex;
|
|
255
|
+
align-items: center;
|
|
256
|
+
min-height: 22px;
|
|
257
|
+
padding: 2px 7px;
|
|
258
|
+
border: 1px solid transparent;
|
|
259
|
+
border-radius: 6px;
|
|
260
|
+
font-size: 0.75rem;
|
|
261
|
+
font-weight: 600;
|
|
262
|
+
line-height: 1.2;
|
|
263
|
+
font-family: var(--font-mono);
|
|
264
|
+
}
|
|
265
|
+
.diff-badge.add {
|
|
266
|
+
background: #dafbe1;
|
|
267
|
+
border-color: #aceebb;
|
|
268
|
+
color: #116329;
|
|
269
|
+
}
|
|
270
|
+
.diff-badge.del {
|
|
271
|
+
background: #ffebe9;
|
|
272
|
+
border-color: #ffcecb;
|
|
273
|
+
color: #82071e;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.reviewed-by {
|
|
277
|
+
display: flex;
|
|
278
|
+
align-items: center;
|
|
279
|
+
gap: 6px;
|
|
280
|
+
font-size: 0.75rem;
|
|
281
|
+
}
|
|
282
|
+
.review-label {
|
|
283
|
+
font-weight: 600;
|
|
284
|
+
color: var(--text);
|
|
285
|
+
}
|
|
286
|
+
.reviewers {
|
|
287
|
+
display: flex;
|
|
288
|
+
gap: 4px;
|
|
289
|
+
}
|
|
290
|
+
.reviewers img {
|
|
291
|
+
width: 24px;
|
|
292
|
+
height: 24px;
|
|
293
|
+
border-radius: 50%;
|
|
294
|
+
border: 2px solid #1a7f37;
|
|
295
|
+
transition: transform 0.1s ease;
|
|
296
|
+
}
|
|
297
|
+
.reviewers img:hover {
|
|
298
|
+
transform: scale(1.15);
|
|
299
|
+
}
|
|
300
|
+
.merged-by {
|
|
301
|
+
color: var(--accent);
|
|
302
|
+
font-weight: 600;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.impact-note {
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: flex-start;
|
|
308
|
+
gap: 8px;
|
|
309
|
+
margin-top: 12px;
|
|
310
|
+
padding: 12px;
|
|
311
|
+
background: #fff8c5;
|
|
312
|
+
border-left: 3px solid #bf8700;
|
|
313
|
+
border-radius: 6px;
|
|
314
|
+
font-size: 0.875rem;
|
|
315
|
+
line-height: 1.5;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.impact-icon {
|
|
319
|
+
font-size: 1rem;
|
|
320
|
+
line-height: 1;
|
|
321
|
+
flex-shrink: 0;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.impact-note strong {
|
|
325
|
+
color: var(--accent-strong);
|
|
326
|
+
font-weight: 600;
|
|
327
|
+
}
|
|
96
328
|
|
|
97
329
|
.description-details {
|
|
98
330
|
margin-top: 12px;
|
|
@@ -101,11 +333,16 @@ export function renderStyles() {
|
|
|
101
333
|
|
|
102
334
|
.description-details summary {
|
|
103
335
|
color: var(--accent);
|
|
104
|
-
font-size: 0.
|
|
105
|
-
font-weight:
|
|
336
|
+
font-size: 0.75rem;
|
|
337
|
+
font-weight: 500;
|
|
106
338
|
list-style: none;
|
|
107
339
|
user-select: none;
|
|
108
|
-
padding:
|
|
340
|
+
padding: 6px 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
.description-details summary:hover {
|
|
344
|
+
color: var(--accent-hover);
|
|
345
|
+
text-decoration: underline;
|
|
109
346
|
}
|
|
110
347
|
|
|
111
348
|
.description-details summary::-webkit-details-marker {
|
|
@@ -118,58 +355,52 @@ export function renderStyles() {
|
|
|
118
355
|
|
|
119
356
|
.description {
|
|
120
357
|
display: grid;
|
|
121
|
-
gap:
|
|
122
|
-
margin-top:
|
|
123
|
-
|
|
358
|
+
gap: 8px;
|
|
359
|
+
margin-top: 8px;
|
|
360
|
+
max-width: 100%;
|
|
361
|
+
min-width: 0;
|
|
362
|
+
overflow: hidden;
|
|
363
|
+
font-size: 0.875rem;
|
|
124
364
|
color: var(--muted);
|
|
125
|
-
|
|
365
|
+
font-family: var(--font-sans);
|
|
366
|
+
padding: 12px;
|
|
126
367
|
background: var(--panel);
|
|
127
|
-
border: 1px solid var(--
|
|
368
|
+
border: 1px solid var(--border-default);
|
|
128
369
|
border-radius: 6px;
|
|
129
370
|
}
|
|
371
|
+
.description.is-plain-markdown { white-space: pre-wrap; }
|
|
372
|
+
.description > * { min-width: 0; }
|
|
130
373
|
.description p { margin: 0 0 8px; }
|
|
131
374
|
.description p:last-child { margin-bottom: 0; }
|
|
132
|
-
.description
|
|
133
|
-
.description
|
|
134
|
-
.description
|
|
135
|
-
.description
|
|
136
|
-
.description
|
|
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
|
-
padding-top: 14px;
|
|
162
|
-
border-top: 1px solid var(--line);
|
|
163
|
-
font-size: 0.88rem;
|
|
164
|
-
color: var(--muted);
|
|
165
|
-
}
|
|
166
|
-
.reviewers { display: flex; gap: 4px; }
|
|
167
|
-
.reviewers img { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); }
|
|
168
|
-
.merged-by { color: var(--accent); font-weight: 500; }
|
|
169
|
-
|
|
170
|
-
.meta-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
|
|
171
|
-
.meta-row span { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.85rem; font-weight: 500; background: var(--panel); }
|
|
172
|
-
.meta-row strong { font-weight: 600; margin-right: 4px; }
|
|
375
|
+
.description h1,
|
|
376
|
+
.description h2,
|
|
377
|
+
.description h3,
|
|
378
|
+
.description h4,
|
|
379
|
+
.description h5,
|
|
380
|
+
.description h6 { margin: 16px 0 8px; color: var(--text); font-weight: 600; line-height: 1.25; }
|
|
381
|
+
.description h1 { font-size: 1.15rem; padding-bottom: 6px; border-bottom: 1px solid var(--border-default); }
|
|
382
|
+
.description h2 { font-size: 1.05rem; padding-bottom: 6px; border-bottom: 1px solid var(--border-default); }
|
|
383
|
+
.description h3 { font-size: 0.95rem; }
|
|
384
|
+
.description h4,
|
|
385
|
+
.description h5,
|
|
386
|
+
.description h6 { font-size: 0.875rem; }
|
|
387
|
+
.description ul,
|
|
388
|
+
.description ol { margin: 6px 0; padding-left: 20px; }
|
|
389
|
+
.description li { margin: 3px 0; }
|
|
390
|
+
.description li > p { margin: 4px 0; }
|
|
391
|
+
.description a,
|
|
392
|
+
.description p,
|
|
393
|
+
.description li { overflow-wrap: anywhere; }
|
|
394
|
+
.description code { background: rgba(175, 184, 193, 0.2); padding: 2px 6px; border-radius: 6px; font-family: var(--font-mono); font-size: 0.85em; overflow-wrap: anywhere; }
|
|
395
|
+
.description pre { max-width: 100%; margin: 8px 0; padding: 12px; overflow-x: auto; background: rgba(175, 184, 193, 0.2); border-radius: 6px; }
|
|
396
|
+
.description pre code { padding: 0; background: transparent; border-radius: 0; }
|
|
397
|
+
.description blockquote { margin: 8px 0; padding: 0 12px; color: var(--muted); border-left: 4px solid var(--border-default); }
|
|
398
|
+
.description img { display: block; height: auto; max-width: 100%; border-radius: 6px; border: 1px solid var(--border-default); margin-top: 8px; }
|
|
399
|
+
.description table { display: block; width: 100%; max-width: 100%; margin: 8px 0; overflow-x: auto; border-collapse: collapse; font-size: 0.875rem; }
|
|
400
|
+
.description th,
|
|
401
|
+
.description td { padding: 8px 12px; border: 1px solid var(--border-default); text-align: left; }
|
|
402
|
+
.description th { background: var(--panel); font-weight: 600; color: var(--text); }
|
|
403
|
+
.description hr { height: 1px; padding: 0; margin: 16px 0; background: var(--border-default); border: 0; }
|
|
173
404
|
|
|
174
405
|
.labels { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
|
|
175
406
|
.labels span { padding: 3px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
|
|
@@ -191,55 +422,88 @@ export function renderStyles() {
|
|
|
191
422
|
}
|
|
192
423
|
|
|
193
424
|
@media (max-width: 768px) {
|
|
194
|
-
.navbar-inner { flex-direction: column; gap:
|
|
195
|
-
.nav-
|
|
425
|
+
.navbar-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
|
|
426
|
+
.nav-identity { align-self: flex-start; }
|
|
427
|
+
.nav-controls { width: 100%; justify-content: flex-start; }
|
|
196
428
|
.search { width: 100%; }
|
|
197
429
|
.repo-header { flex-direction: column; }
|
|
198
430
|
.repo-stats { justify-content: flex-start; }
|
|
199
431
|
}
|
|
200
432
|
</style>`;
|
|
201
433
|
}
|
|
202
|
-
export function renderScript(
|
|
203
|
-
return `<script>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
434
|
+
export function renderScript() {
|
|
435
|
+
return `<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
436
|
+
<script src="https://cdn.jsdelivr.net/npm/dompurify@3.2.6/dist/purify.min.js"></script>
|
|
437
|
+
<script>
|
|
438
|
+
function renderMarkdownDescriptions() {
|
|
439
|
+
const descriptions = document.querySelectorAll('.description-details');
|
|
440
|
+
const canRenderMarkdown = window.marked && window.marked.parse && window.DOMPurify;
|
|
441
|
+
|
|
442
|
+
if (window.marked && window.marked.setOptions) {
|
|
443
|
+
window.marked.setOptions({ gfm: true, breaks: false });
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
descriptions.forEach((details) => {
|
|
447
|
+
const source = details.querySelector('.description-markdown');
|
|
448
|
+
const target = details.querySelector('.description');
|
|
449
|
+
let markdown = '';
|
|
450
|
+
|
|
451
|
+
if (source && source.textContent) {
|
|
452
|
+
try {
|
|
453
|
+
markdown = JSON.parse(source.textContent);
|
|
454
|
+
} catch {
|
|
455
|
+
markdown = source.textContent;
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
markdown = markdown.trim();
|
|
460
|
+
|
|
461
|
+
if (!target || !markdown) {
|
|
462
|
+
details.hidden = true;
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (!canRenderMarkdown) {
|
|
467
|
+
target.textContent = markdown;
|
|
468
|
+
target.classList.add('is-plain-markdown');
|
|
469
|
+
return;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
const html = window.marked.parse(markdown);
|
|
473
|
+
target.innerHTML = window.DOMPurify.sanitize(html);
|
|
474
|
+
|
|
475
|
+
target.querySelectorAll('a[href]').forEach((link) => {
|
|
476
|
+
link.setAttribute('target', '_blank');
|
|
477
|
+
link.setAttribute('rel', 'noopener noreferrer');
|
|
478
|
+
});
|
|
479
|
+
});
|
|
208
480
|
}
|
|
209
481
|
|
|
482
|
+
renderMarkdownDescriptions();
|
|
483
|
+
|
|
210
484
|
const search = document.querySelector('#search');
|
|
211
|
-
const filters = document.querySelectorAll('.filter');
|
|
212
485
|
const sections = document.querySelectorAll('.repo-section');
|
|
213
486
|
const empty = document.querySelector('#empty');
|
|
214
|
-
let activeLanguage = 'all';
|
|
215
487
|
|
|
216
488
|
function applyFilters() {
|
|
217
|
-
const query = search.value.toLowerCase().trim();
|
|
489
|
+
const query = search ? search.value.toLowerCase().trim() : '';
|
|
218
490
|
let visibleCount = 0;
|
|
219
491
|
|
|
220
492
|
sections.forEach((section) => {
|
|
221
|
-
const languages = section.dataset.languages.split('|');
|
|
222
|
-
const matchLang = activeLanguage === 'all' || languages.includes(activeLanguage);
|
|
223
493
|
const matchQuery = !query || section.textContent.toLowerCase().includes(query);
|
|
224
494
|
|
|
225
|
-
section.hidden = !
|
|
495
|
+
section.hidden = !matchQuery;
|
|
226
496
|
if (!section.hidden) visibleCount++;
|
|
227
497
|
});
|
|
228
498
|
|
|
229
|
-
empty
|
|
499
|
+
if (empty) {
|
|
500
|
+
empty.hidden = visibleCount !== 0;
|
|
501
|
+
}
|
|
230
502
|
}
|
|
231
503
|
|
|
232
504
|
if (search) {
|
|
233
505
|
search.addEventListener('input', applyFilters);
|
|
234
506
|
}
|
|
235
|
-
|
|
236
|
-
filters.forEach((filter) => {
|
|
237
|
-
filter.addEventListener('click', () => {
|
|
238
|
-
activeLanguage = filter.dataset.language;
|
|
239
|
-
filters.forEach((f) => f.classList.toggle('is-active', f === filter));
|
|
240
|
-
applyFilters();
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
507
|
</script>`;
|
|
244
508
|
}
|
|
245
509
|
//# sourceMappingURL=assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../../src/repo/site/assets.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY;IAC1B,OAAO
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../../src/repo/site/assets.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,YAAY;IAC1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8aI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwEK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAa5C,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAiB9E;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,GAAG,MAAM,CAO1F;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,oBAAoB,EAAE,GACpC,MAAM,CA4BR;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,oBAAoB,GAAG,MAAM,CAuEjF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMtD"}
|