opensource-showcase 0.1.3 → 0.1.5
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/dist/auth/github-auth.js +2 -2
- package/dist/auth/github-auth.js.map +1 -1
- package/dist/repo/generate-site.d.ts.map +1 -1
- package/dist/repo/generate-site.js +9 -3
- package/dist/repo/generate-site.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 +145 -434
- package/dist/repo/site/assets.js.map +1 -1
- package/dist/repo/site/components.d.ts +2 -3
- package/dist/repo/site/components.d.ts.map +1 -1
- package/dist/repo/site/components.js +40 -50
- package/dist/repo/site/components.js.map +1 -1
- package/dist/templates/project-section.js +37 -37
- package/dist/templates/project-section.js.map +1 -1
- package/dist/templates/readme-header.d.ts.map +1 -1
- package/dist/templates/readme-header.js +1 -3
- package/dist/templates/readme-header.js.map +1 -1
- package/package.json +1 -1
package/dist/auth/github-auth.js
CHANGED
|
@@ -9,7 +9,7 @@ import { GITHUB_SCOPES } from '../constants.js';
|
|
|
9
9
|
import { logger } from '../utils/logger.js';
|
|
10
10
|
import { AuthenticationError } from '../utils/errors.js';
|
|
11
11
|
import { storeToken, storeUsername, storeUser, getStoredToken, } from '../utils/config.js';
|
|
12
|
-
const DEFAULT_CLIENT_ID = '
|
|
12
|
+
const DEFAULT_CLIENT_ID = 'Ov23li4P4stPDon9vAt1';
|
|
13
13
|
const CLIENT_ID = DEFAULT_CLIENT_ID;
|
|
14
14
|
const CLIENT_TYPE = 'oauth-app';
|
|
15
15
|
/**
|
|
@@ -17,7 +17,7 @@ const CLIENT_TYPE = 'oauth-app';
|
|
|
17
17
|
*/
|
|
18
18
|
export async function authenticateWithGitHub() {
|
|
19
19
|
if (!isOAuthConfigured()) {
|
|
20
|
-
throw new AuthenticationError('GitHub OAuth is not configured. Replace
|
|
20
|
+
throw new AuthenticationError('GitHub OAuth is not configured. Replace Ov23li4P4stPDon9vAt1 in src/auth/github-auth.ts before publishing.');
|
|
21
21
|
}
|
|
22
22
|
const spinner = ora('Authenticating with GitHub...').start();
|
|
23
23
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-auth.js","sourceRoot":"","sources":["../../src/auth/github-auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,UAAU,EACV,aAAa,EACb,SAAS,EACT,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"github-auth.js","sourceRoot":"","sources":["../../src/auth/github-auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,UAAU,EACV,aAAa,EACb,SAAS,EACT,cAAc,GACf,MAAM,oBAAoB,CAAC;AAG5B,MAAM,iBAAiB,GAAG,sBAAsB,CAAC;AACjD,MAAM,SAAS,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AG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC;QAElD,MAAM,CAAC,OAAO,CACZ,mBAAmB,SAAS,CAAC,SAAS,wBAAwB,WAAW,aAAa,CACvF,CAAC;QAEF,MAAM,OAAO,GAAG,GAAG,CAAC,iCAAiC,CAAC,CAAC,KAAK,EAAE,CAAC;QAE/D,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;QAE5D,OAAO,CAAC,OAAO,CAAC,iCAAiC,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-site.d.ts","sourceRoot":"","sources":["../../src/repo/generate-site.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate-site.d.ts","sourceRoot":"","sources":["../../src/repo/generate-site.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAa3D,wBAAgB,YAAY,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAoC5D"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generate a static GitHub Pages site for curated contributions.
|
|
3
3
|
*/
|
|
4
4
|
import { renderScript, renderStyles } from './site/assets.js';
|
|
5
|
-
import { renderFooter, renderHero, renderMainContent,
|
|
5
|
+
import { renderFooter, renderHero, renderMainContent, } from './site/components.js';
|
|
6
6
|
import { calculateStats, escapeHtml, groupByRepository, } from './site/utils.js';
|
|
7
7
|
export function generateSite(data) {
|
|
8
8
|
const contributions = data.contributions.filter((contribution) => contribution.showcase);
|
|
@@ -10,6 +10,13 @@ export function generateSite(data) {
|
|
|
10
10
|
const grouped = groupByRepository(contributions);
|
|
11
11
|
const displayName = data.contributor.name || data.contributor.username;
|
|
12
12
|
const pageTitle = `${displayName} - Open Source Contributions`;
|
|
13
|
+
// Generate language filters HTML
|
|
14
|
+
const languageFilters = stats.languages.length > 0
|
|
15
|
+
? `<button class="filter is-active" data-language="all">All</button>
|
|
16
|
+
${stats.languages
|
|
17
|
+
.map((lang) => `<button class="filter" data-language="${escapeHtml(lang.name)}">${escapeHtml(lang.name)} <span>${lang.count}</span></button>`)
|
|
18
|
+
.join('')}`
|
|
19
|
+
: '';
|
|
13
20
|
return `<!doctype html>
|
|
14
21
|
<html lang="en">
|
|
15
22
|
<head>
|
|
@@ -21,10 +28,9 @@ export function generateSite(data) {
|
|
|
21
28
|
</head>
|
|
22
29
|
<body>
|
|
23
30
|
${renderHero(data.contributor, stats)}
|
|
24
|
-
${renderToolbar(stats.languages)}
|
|
25
31
|
${renderMainContent(grouped)}
|
|
26
32
|
${renderFooter(data.updated_at)}
|
|
27
|
-
${renderScript()}
|
|
33
|
+
${renderScript(languageFilters)}
|
|
28
34
|
</body>
|
|
29
35
|
</html>`;
|
|
30
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-site.js","sourceRoot":"","sources":["../../src/repo/generate-site.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,
|
|
1
|
+
{"version":3,"file":"generate-site.js","sourceRoot":"","sources":["../../src/repo/generate-site.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AAEzB,MAAM,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ot":"","sources":["../../../src/repo/site/assets.ts"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,IAAI,MAAM,CAwMrC;AAED,wBAAgB,YAAY,CAAC,mBAAmB,EAAE,MAAM,GAAG,MAAM,CA0ChE"}
|
package/dist/repo/site/assets.js
CHANGED
|
@@ -1,531 +1,242 @@
|
|
|
1
1
|
export function renderStyles() {
|
|
2
2
|
return `<style>
|
|
3
3
|
:root {
|
|
4
|
-
|
|
5
|
-
--bg: #
|
|
4
|
+
/* Professional Light Theme - Full Width Layout */
|
|
5
|
+
--bg: #f9f9f9;
|
|
6
6
|
--panel: #ffffff;
|
|
7
|
-
--panel-soft: #
|
|
8
|
-
--text: #
|
|
9
|
-
--muted: #
|
|
10
|
-
--line: #
|
|
11
|
-
--accent: #
|
|
7
|
+
--panel-soft: #f4f4f5;
|
|
8
|
+
--text: #09090b;
|
|
9
|
+
--muted: #71717a;
|
|
10
|
+
--line: #e4e4e7;
|
|
11
|
+
--accent: #18181b;
|
|
12
12
|
--accent-strong: #000000;
|
|
13
|
-
--
|
|
14
|
-
--shadow: 0 18px 45px rgba(0, 0, 0, 0.06);
|
|
13
|
+
--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
|
-
* {
|
|
18
|
-
box-sizing: border-box;
|
|
19
|
-
}
|
|
16
|
+
* { box-sizing: border-box; }
|
|
20
17
|
|
|
21
18
|
body {
|
|
22
19
|
margin: 0;
|
|
23
20
|
background: var(--bg);
|
|
24
21
|
color: var(--text);
|
|
25
|
-
font-family:
|
|
26
|
-
line-height: 1.
|
|
22
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
|
|
23
|
+
line-height: 1.6;
|
|
27
24
|
}
|
|
28
25
|
|
|
29
|
-
a {
|
|
30
|
-
color: inherit;
|
|
31
|
-
text-decoration: none;
|
|
32
|
-
}
|
|
26
|
+
a { color: inherit; text-decoration: none; }
|
|
33
27
|
|
|
28
|
+
/* Full Width Container */
|
|
34
29
|
.shell {
|
|
35
|
-
width:
|
|
30
|
+
width: 95%;
|
|
31
|
+
max-width: 1800px;
|
|
36
32
|
margin: 0 auto;
|
|
37
33
|
}
|
|
38
34
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
border-bottom: 1px solid var(--line);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.profile {
|
|
45
|
-
display: grid;
|
|
46
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
47
|
-
gap: 18px;
|
|
48
|
-
align-items: center;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.identity {
|
|
52
|
-
display: grid;
|
|
53
|
-
grid-template-columns: auto minmax(0, 1fr);
|
|
54
|
-
gap: 12px;
|
|
55
|
-
align-items: center;
|
|
56
|
-
min-width: 0;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.avatar {
|
|
60
|
-
width: 48px;
|
|
61
|
-
height: 48px;
|
|
62
|
-
border: 1px solid var(--line);
|
|
63
|
-
border-radius: 50%;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
h1 {
|
|
67
|
-
margin: 0;
|
|
68
|
-
font-size: 1.05rem;
|
|
69
|
-
line-height: 1.2;
|
|
70
|
-
font-weight: 800;
|
|
71
|
-
letter-spacing: 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.handle {
|
|
75
|
-
margin: 2px 0 0;
|
|
76
|
-
color: var(--accent);
|
|
77
|
-
font-weight: 700;
|
|
78
|
-
font-size: 0.9rem;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.bio {
|
|
82
|
-
max-width: 620px;
|
|
83
|
-
margin: 4px 0 0;
|
|
84
|
-
color: var(--muted);
|
|
85
|
-
font-size: 0.88rem;
|
|
86
|
-
white-space: nowrap;
|
|
87
|
-
overflow: hidden;
|
|
88
|
-
text-overflow: ellipsis;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.stats {
|
|
92
|
-
display: grid;
|
|
93
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
94
|
-
gap: 8px;
|
|
95
|
-
min-width: 360px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.stat {
|
|
99
|
-
min-height: 54px;
|
|
100
|
-
padding: 9px 12px;
|
|
101
|
-
background: var(--panel);
|
|
102
|
-
border: 1px solid var(--line);
|
|
103
|
-
border-radius: 4px;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.stat strong {
|
|
107
|
-
display: block;
|
|
108
|
-
font-size: 1.05rem;
|
|
109
|
-
line-height: 1.1;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.stat span {
|
|
113
|
-
display: block;
|
|
114
|
-
margin-top: 4px;
|
|
115
|
-
color: var(--muted);
|
|
116
|
-
font-size: 0.74rem;
|
|
117
|
-
font-weight: 700;
|
|
118
|
-
text-transform: uppercase;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.toolbar {
|
|
35
|
+
/* Sticky Professional Navbar */
|
|
36
|
+
.navbar {
|
|
122
37
|
position: sticky;
|
|
123
38
|
top: 0;
|
|
124
|
-
z-index:
|
|
125
|
-
|
|
126
|
-
background: rgba(250, 250, 250, 0.94);
|
|
127
|
-
border-bottom: 1px solid var(--line);
|
|
39
|
+
z-index: 100;
|
|
40
|
+
background: rgba(255, 255, 255, 0.9);
|
|
128
41
|
backdrop-filter: blur(16px);
|
|
42
|
+
border-bottom: 1px solid var(--line);
|
|
43
|
+
padding: 12px 0;
|
|
129
44
|
}
|
|
130
45
|
|
|
131
|
-
.
|
|
132
|
-
display:
|
|
133
|
-
grid-template-columns: minmax(220px, 360px) 1fr;
|
|
134
|
-
gap: 16px;
|
|
46
|
+
.navbar-inner {
|
|
47
|
+
display: flex;
|
|
135
48
|
align-items: center;
|
|
49
|
+
justify-content: space-between;
|
|
136
50
|
}
|
|
137
51
|
|
|
52
|
+
.nav-identity { display: flex; align-items: center; gap: 12px; }
|
|
53
|
+
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); }
|
|
54
|
+
.nav-info { display: flex; flex-direction: column; line-height: 1.2; }
|
|
55
|
+
.nav-name { font-weight: 700; font-size: 0.95rem; }
|
|
56
|
+
.nav-handle { font-size: 0.8rem; color: var(--muted); }
|
|
57
|
+
.nav-controls { display: flex; align-items: center; gap: 16px; }
|
|
58
|
+
|
|
138
59
|
.search {
|
|
139
|
-
width:
|
|
140
|
-
|
|
60
|
+
width: 300px;
|
|
61
|
+
height: 36px;
|
|
141
62
|
padding: 0 14px;
|
|
142
63
|
border: 1px solid var(--line);
|
|
143
|
-
border-radius:
|
|
64
|
+
border-radius: 6px;
|
|
144
65
|
background: var(--panel);
|
|
145
|
-
|
|
146
|
-
font: inherit;
|
|
66
|
+
font-size: 0.85rem;
|
|
147
67
|
}
|
|
148
68
|
|
|
149
|
-
.filters {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
overflow-x: auto;
|
|
153
|
-
padding-bottom: 2px;
|
|
154
|
-
}
|
|
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; }
|
|
155
72
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
min-height: 38px;
|
|
159
|
-
padding: 0 12px;
|
|
160
|
-
border: 1px solid var(--line);
|
|
161
|
-
border-radius: 999px;
|
|
162
|
-
background: var(--panel);
|
|
163
|
-
color: var(--muted);
|
|
164
|
-
font: inherit;
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.filter span {
|
|
169
|
-
margin-left: 6px;
|
|
170
|
-
color: var(--accent);
|
|
171
|
-
font-weight: 700;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.filter.is-active {
|
|
175
|
-
background: var(--accent);
|
|
176
|
-
border-color: var(--accent);
|
|
177
|
-
color: #fff;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.filter.is-active span {
|
|
181
|
-
color: #dcebe5;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
main {
|
|
185
|
-
padding: 28px 0 56px;
|
|
186
|
-
}
|
|
73
|
+
/* Main Content Layout */
|
|
74
|
+
main { padding: 32px 0 64px; }
|
|
187
75
|
|
|
188
76
|
.repo-section {
|
|
189
|
-
margin-top:
|
|
190
|
-
padding:
|
|
77
|
+
margin-top: 24px;
|
|
78
|
+
padding: 24px;
|
|
191
79
|
background: var(--panel);
|
|
192
80
|
border: 1px solid var(--line);
|
|
193
|
-
border-radius:
|
|
81
|
+
border-radius: 12px;
|
|
194
82
|
box-shadow: var(--shadow);
|
|
195
83
|
}
|
|
196
84
|
|
|
197
|
-
.repo-header {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
border-bottom: 1px solid var(--line);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.repo-name {
|
|
207
|
-
display: inline-flex;
|
|
208
|
-
gap: 10px;
|
|
209
|
-
align-items: center;
|
|
210
|
-
font-weight: 800;
|
|
211
|
-
font-size: 1.1rem;
|
|
212
|
-
}
|
|
85
|
+
.repo-header { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
|
|
86
|
+
.repo-name { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; font-size: 1.15rem; }
|
|
87
|
+
.repo-name img { border: 1px solid var(--line); border-radius: 6px; }
|
|
88
|
+
.repo-header > div:first-child p { margin: 10px 0 0; color: var(--muted); font-size: 0.9rem; }
|
|
89
|
+
.repo-stats { display: flex; gap: 8px; align-items: center; }
|
|
90
|
+
.repo-stats span { padding: 4px 10px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 6px; font-size: 0.8rem; font-weight: 500; }
|
|
213
91
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
92
|
+
/* Contribution Details */
|
|
93
|
+
.contribution-list { display: grid; gap: 16px; margin-top: 20px; }
|
|
94
|
+
.contribution { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }
|
|
95
|
+
.pr-title { font-weight: 600; font-size: 1.05rem; display: block; margin-bottom: 8px; }
|
|
218
96
|
|
|
219
|
-
.
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
color: var(--muted);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
.repo-stats {
|
|
226
|
-
display: flex;
|
|
227
|
-
gap: 8px;
|
|
228
|
-
flex-wrap: wrap;
|
|
229
|
-
justify-content: flex-end;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.repo-stats span,
|
|
233
|
-
.labels span {
|
|
234
|
-
display: inline-flex;
|
|
235
|
-
align-items: center;
|
|
236
|
-
min-height: 28px;
|
|
237
|
-
padding: 0 9px;
|
|
238
|
-
background: var(--chip);
|
|
239
|
-
border-radius: 999px;
|
|
240
|
-
color: var(--accent-strong);
|
|
241
|
-
font-size: 0.82rem;
|
|
242
|
-
font-weight: 700;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.contribution-list {
|
|
246
|
-
display: grid;
|
|
247
|
-
gap: 12px;
|
|
248
|
-
margin-top: 18px;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
@media (min-width: 1280px) {
|
|
252
|
-
.contribution-list {
|
|
253
|
-
gap: 14px;
|
|
254
|
-
}
|
|
97
|
+
.description-details {
|
|
98
|
+
margin-top: 12px;
|
|
99
|
+
cursor: pointer;
|
|
255
100
|
}
|
|
256
101
|
|
|
257
|
-
.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
102
|
+
.description-details summary {
|
|
103
|
+
color: var(--accent);
|
|
104
|
+
font-size: 0.9rem;
|
|
105
|
+
font-weight: 600;
|
|
106
|
+
list-style: none;
|
|
107
|
+
user-select: none;
|
|
108
|
+
padding: 8px 0;
|
|
262
109
|
}
|
|
263
110
|
|
|
264
|
-
.
|
|
265
|
-
|
|
266
|
-
color: var(--accent-strong);
|
|
111
|
+
.description-details summary::-webkit-details-marker {
|
|
112
|
+
display: none;
|
|
267
113
|
}
|
|
268
114
|
|
|
269
|
-
.
|
|
270
|
-
margin: 8px
|
|
271
|
-
color: var(--muted);
|
|
115
|
+
.description-details[open] summary {
|
|
116
|
+
margin-bottom: 8px;
|
|
272
117
|
}
|
|
273
118
|
|
|
274
|
-
.description {
|
|
119
|
+
.description {
|
|
275
120
|
display: grid;
|
|
276
121
|
gap: 10px;
|
|
277
|
-
margin-top:
|
|
122
|
+
margin-top: 12px;
|
|
123
|
+
font-size: 0.9rem;
|
|
278
124
|
color: var(--muted);
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
.description :is(p, ul, figure, h4) {
|
|
282
|
-
margin: 0;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
.description h4 {
|
|
286
|
-
color: var(--text);
|
|
287
|
-
font-size: 0.95rem;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.description ul {
|
|
291
|
-
padding-left: 20px;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.description a {
|
|
295
|
-
color: var(--text);
|
|
296
|
-
text-decoration: underline;
|
|
297
|
-
text-decoration-color: #b8b8b8;
|
|
298
|
-
text-underline-offset: 3px;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.description code {
|
|
302
|
-
padding: 2px 5px;
|
|
303
|
-
background: #ffffff;
|
|
304
|
-
border: 1px solid var(--line);
|
|
305
|
-
border-radius: 4px;
|
|
306
|
-
color: var(--text);
|
|
307
|
-
font-size: 0.9em;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
.description img {
|
|
311
|
-
display: block;
|
|
312
|
-
max-width: 100%;
|
|
313
|
-
height: auto;
|
|
314
|
-
max-height: 620px;
|
|
315
|
-
object-fit: contain;
|
|
316
|
-
border: 1px solid var(--line);
|
|
317
|
-
border-radius: 4px;
|
|
318
|
-
background: #ffffff;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.markdown-table-wrap {
|
|
322
|
-
max-width: 100%;
|
|
323
|
-
overflow-x: auto;
|
|
125
|
+
padding: 14px;
|
|
126
|
+
background: var(--panel);
|
|
324
127
|
border: 1px solid var(--line);
|
|
325
|
-
border-radius:
|
|
326
|
-
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.markdown-table th,
|
|
338
|
-
.markdown-table
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
.markdown-table td:last-child {
|
|
348
|
-
border-right: 0;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.markdown-table tr:last-child td {
|
|
352
|
-
border-bottom: 0;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.markdown-table th {
|
|
356
|
-
background: #f3f3f3;
|
|
357
|
-
color: var(--text);
|
|
358
|
-
font-size: 0.78rem;
|
|
359
|
-
font-weight: 800;
|
|
360
|
-
text-transform: uppercase;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.markdown-table img {
|
|
364
|
-
width: 100%;
|
|
365
|
-
max-height: 440px;
|
|
128
|
+
border-radius: 6px;
|
|
129
|
+
}
|
|
130
|
+
.description p { margin: 0 0 8px; }
|
|
131
|
+
.description p:last-child { margin-bottom: 0; }
|
|
132
|
+
.description h4 { margin: 16px 0 8px; font-size: 0.95rem; color: var(--text); }
|
|
133
|
+
.description ul { margin: 8px 0; padding-left: 20px; }
|
|
134
|
+
.description li { margin: 4px 0; }
|
|
135
|
+
.description code { background: #eee; padding: 2px 5px; border-radius: 4px; font-family: monospace; font-size: 0.88em; }
|
|
136
|
+
.description img { max-width: 100%; border-radius: 6px; border: 1px solid var(--line); margin-top: 12px; }
|
|
137
|
+
|
|
138
|
+
.markdown-table-wrap { margin-top: 12px; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; background: var(--panel); }
|
|
139
|
+
.markdown-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
|
|
140
|
+
.markdown-table th, .markdown-table td { padding: 10px; border: 1px solid var(--line); text-align: left; }
|
|
141
|
+
.markdown-table th { background: var(--panel-soft); font-weight: 600; }
|
|
142
|
+
|
|
143
|
+
.impact-note {
|
|
144
|
+
margin-top: 12px;
|
|
145
|
+
padding: 12px 16px;
|
|
146
|
+
background: #fff9e6;
|
|
147
|
+
border-left: 3px solid #ffc107;
|
|
148
|
+
border-radius: 6px;
|
|
149
|
+
font-size: 0.9rem;
|
|
366
150
|
}
|
|
367
151
|
|
|
368
|
-
.
|
|
369
|
-
color: var(--
|
|
152
|
+
.impact-note strong {
|
|
153
|
+
color: var(--accent-strong);
|
|
370
154
|
}
|
|
371
155
|
|
|
372
|
-
.reviewed-by {
|
|
373
|
-
display: flex;
|
|
374
|
-
|
|
375
|
-
gap: 10px;
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
156
|
+
.reviewed-by {
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
gap: 10px;
|
|
160
|
+
margin-top: 16px;
|
|
161
|
+
padding-top: 14px;
|
|
162
|
+
border-top: 1px solid var(--line);
|
|
163
|
+
font-size: 0.88rem;
|
|
380
164
|
color: var(--muted);
|
|
381
|
-
font-size: 0.88rem;
|
|
382
|
-
font-weight: 700;
|
|
383
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; }
|
|
384
169
|
|
|
385
|
-
.
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
align-items: center;
|
|
389
|
-
}
|
|
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; }
|
|
390
173
|
|
|
391
|
-
.
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
.reviewers img {
|
|
396
|
-
width: 24px;
|
|
397
|
-
height: 24px;
|
|
398
|
-
border: 1px solid #ffffff;
|
|
399
|
-
border-radius: 50%;
|
|
400
|
-
background: #ffffff;
|
|
401
|
-
box-shadow: 0 0 0 1px var(--line);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.merged-by {
|
|
405
|
-
color: var(--text);
|
|
406
|
-
text-decoration: underline;
|
|
407
|
-
text-decoration-color: #b8b8b8;
|
|
408
|
-
text-underline-offset: 3px;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.meta-row,
|
|
412
|
-
.labels {
|
|
413
|
-
display: flex;
|
|
414
|
-
flex-wrap: wrap;
|
|
415
|
-
gap: 8px;
|
|
416
|
-
margin-top: 12px;
|
|
417
|
-
}
|
|
174
|
+
.labels { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }
|
|
175
|
+
.labels span { padding: 3px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; font-size: 0.75rem; font-weight: 500; }
|
|
418
176
|
|
|
419
|
-
.
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
padding: 0 10px;
|
|
425
|
-
border: 1px solid #d4d4d4;
|
|
426
|
-
border-radius: 999px;
|
|
427
|
-
background: #ffffff;
|
|
428
|
-
color: var(--text);
|
|
429
|
-
font-size: 0.88rem;
|
|
430
|
-
font-weight: 700;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.meta-row strong {
|
|
434
|
-
color: var(--muted);
|
|
435
|
-
font-size: 0.76rem;
|
|
436
|
-
font-weight: 700;
|
|
437
|
-
text-transform: uppercase;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.empty {
|
|
441
|
-
margin-top: 28px;
|
|
442
|
-
padding: 24px;
|
|
443
|
-
border: 1px dashed var(--line);
|
|
444
|
-
border-radius: 4px;
|
|
177
|
+
.empty {
|
|
178
|
+
padding: 48px;
|
|
179
|
+
text-align: center;
|
|
180
|
+
border: 1px dashed var(--line);
|
|
181
|
+
border-radius: 8px;
|
|
445
182
|
color: var(--muted);
|
|
446
|
-
text-align: center;
|
|
447
183
|
}
|
|
448
184
|
|
|
449
185
|
footer {
|
|
450
|
-
padding:
|
|
186
|
+
padding: 24px 0;
|
|
451
187
|
border-top: 1px solid var(--line);
|
|
188
|
+
text-align: center;
|
|
452
189
|
color: var(--muted);
|
|
453
|
-
font-size: 0.
|
|
190
|
+
font-size: 0.85rem;
|
|
454
191
|
}
|
|
455
192
|
|
|
456
|
-
@media (max-width:
|
|
457
|
-
.
|
|
458
|
-
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
.
|
|
462
|
-
.toolbar-inner,
|
|
463
|
-
.repo-header {
|
|
464
|
-
grid-template-columns: 1fr;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.stats {
|
|
468
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
469
|
-
min-width: 0;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.bio {
|
|
473
|
-
white-space: normal;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.repo-stats {
|
|
477
|
-
justify-content: flex-start;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
@media (max-width: 460px) {
|
|
482
|
-
.stats {
|
|
483
|
-
grid-template-columns: 1fr;
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
.identity {
|
|
487
|
-
grid-template-columns: 1fr;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
.repo-section {
|
|
491
|
-
padding: 16px;
|
|
492
|
-
}
|
|
193
|
+
@media (max-width: 768px) {
|
|
194
|
+
.navbar-inner { flex-direction: column; gap: 16px; }
|
|
195
|
+
.nav-controls { width: 100%; flex-direction: column; }
|
|
196
|
+
.search { width: 100%; }
|
|
197
|
+
.repo-header { flex-direction: column; }
|
|
198
|
+
.repo-stats { justify-content: flex-start; }
|
|
493
199
|
}
|
|
494
200
|
</style>`;
|
|
495
201
|
}
|
|
496
|
-
export function renderScript() {
|
|
202
|
+
export function renderScript(languageFiltersHtml) {
|
|
497
203
|
return `<script>
|
|
204
|
+
// Inject language filters
|
|
205
|
+
const filtersContainer = document.querySelector('#filters-container');
|
|
206
|
+
if (filtersContainer) {
|
|
207
|
+
filtersContainer.innerHTML = \`${languageFiltersHtml}\`;
|
|
208
|
+
}
|
|
209
|
+
|
|
498
210
|
const search = document.querySelector('#search');
|
|
499
|
-
const filters =
|
|
500
|
-
const sections =
|
|
211
|
+
const filters = document.querySelectorAll('.filter');
|
|
212
|
+
const sections = document.querySelectorAll('.repo-section');
|
|
501
213
|
const empty = document.querySelector('#empty');
|
|
502
214
|
let activeLanguage = 'all';
|
|
503
215
|
|
|
504
|
-
function normalize(value) {
|
|
505
|
-
return value.toLowerCase().trim();
|
|
506
|
-
}
|
|
507
|
-
|
|
508
216
|
function applyFilters() {
|
|
509
|
-
const query =
|
|
217
|
+
const query = search.value.toLowerCase().trim();
|
|
510
218
|
let visibleCount = 0;
|
|
511
219
|
|
|
512
220
|
sections.forEach((section) => {
|
|
513
221
|
const languages = section.dataset.languages.split('|');
|
|
514
|
-
const
|
|
515
|
-
const
|
|
222
|
+
const matchLang = activeLanguage === 'all' || languages.includes(activeLanguage);
|
|
223
|
+
const matchQuery = !query || section.textContent.toLowerCase().includes(query);
|
|
516
224
|
|
|
517
|
-
section.hidden = !(
|
|
518
|
-
if (!section.hidden) visibleCount
|
|
225
|
+
section.hidden = !(matchLang && matchQuery);
|
|
226
|
+
if (!section.hidden) visibleCount++;
|
|
519
227
|
});
|
|
520
228
|
|
|
521
229
|
empty.hidden = visibleCount !== 0;
|
|
522
230
|
}
|
|
523
231
|
|
|
524
|
-
search
|
|
232
|
+
if (search) {
|
|
233
|
+
search.addEventListener('input', applyFilters);
|
|
234
|
+
}
|
|
235
|
+
|
|
525
236
|
filters.forEach((filter) => {
|
|
526
237
|
filter.addEventListener('click', () => {
|
|
527
238
|
activeLanguage = filter.dataset.language;
|
|
528
|
-
filters.forEach((
|
|
239
|
+
filters.forEach((f) => f.classList.toggle('is-active', f === filter));
|
|
529
240
|
applyFilters();
|
|
530
241
|
});
|
|
531
242
|
});
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAsMI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,mBAA2B;IACtD,OAAO;;;;yCAIgC,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAoC9C,CAAC;AACf,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { Contributor, EnrichedContribution } from '../../types/index.js';
|
|
2
2
|
import type { SiteStats } from './utils.js';
|
|
3
|
-
export declare function renderHero(contributor: Contributor,
|
|
4
|
-
export declare function
|
|
3
|
+
export declare function renderHero(contributor: Contributor, _stats: SiteStats): string;
|
|
4
|
+
export declare function renderMainContent(grouped: Array<[string, EnrichedContribution[]]>): string;
|
|
5
5
|
export declare function renderRepositorySection(repo: string, contributions: EnrichedContribution[]): string;
|
|
6
6
|
export declare function renderContributionCard(contribution: EnrichedContribution): string;
|
|
7
|
-
export declare function renderMainContent(grouped: Array<[string, EnrichedContribution[]]>): string;
|
|
8
7
|
export declare function renderFooter(updatedAt: string): string;
|
|
9
8
|
//# sourceMappingURL=components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAO5C,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,GAAG,MAAM,CAkB9E;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC,CAAC,GAC/C,MAAM,CAOR;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,oBAAoB,EAAE,GACpC,MAAM,CA8BR;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,oBAAoB,GAAG,MAAM,CA0DjF;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAMtD"}
|
|
@@ -1,43 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export function renderHero(contributor,
|
|
1
|
+
import { escapeHtml, formatDate, renderRichDescription, } from './utils.js';
|
|
2
|
+
export function renderHero(contributor, _stats) {
|
|
3
3
|
const displayName = contributor.name || contributor.username;
|
|
4
|
-
return `<
|
|
5
|
-
<div class="shell">
|
|
6
|
-
<div class="
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
<p class="handle"><a href="${escapeHtml(contributor.profile_url)}">@${escapeHtml(contributor.username)}</a></p>
|
|
12
|
-
${contributor.bio ? `<p class="bio">${escapeHtml(contributor.bio)}</p>` : ''}
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="stats" aria-label="Contribution summary">
|
|
16
|
-
<div class="stat"><strong>${stats.totalContributions.toLocaleString()}</strong><span>contributions</span></div>
|
|
17
|
-
<div class="stat"><strong>${stats.totalProjects.toLocaleString()}</strong><span>projects</span></div>
|
|
18
|
-
<div class="stat"><strong>${stats.totalLanguages.toLocaleString()}</strong><span>languages</span></div>
|
|
4
|
+
return `<nav class="navbar">
|
|
5
|
+
<div class="shell navbar-inner">
|
|
6
|
+
<div class="nav-identity">
|
|
7
|
+
<img class="nav-avatar" src="https://github.com/${escapeHtml(contributor.username)}.png" alt="${escapeHtml(displayName)}" />
|
|
8
|
+
<div class="nav-info">
|
|
9
|
+
<span class="nav-name">${escapeHtml(displayName)}</span>
|
|
10
|
+
<span class="nav-handle"><a href="${escapeHtml(contributor.profile_url)}">@${escapeHtml(contributor.username)}</a></span>
|
|
19
11
|
</div>
|
|
20
12
|
</div>
|
|
13
|
+
<div class="nav-controls">
|
|
14
|
+
<input class="search" id="search" type="search" placeholder="Search contributions..." />
|
|
15
|
+
<div class="filters" id="filters-container"></div>
|
|
16
|
+
</div>
|
|
21
17
|
</div>
|
|
22
|
-
</
|
|
18
|
+
</nav>`;
|
|
23
19
|
}
|
|
24
|
-
export function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<button class="filter is-active" type="button" data-language="all">All</button>
|
|
29
|
-
${languages
|
|
30
|
-
.map((language) => `<button class="filter" type="button" data-language="${escapeHtml(language.name)}">
|
|
31
|
-
${escapeHtml(language.name)} <span>${language.count}</span>
|
|
32
|
-
</button>`)
|
|
33
|
-
.join('')}
|
|
34
|
-
</div>`;
|
|
35
|
-
return `<div class="toolbar">
|
|
36
|
-
<div class="shell toolbar-inner">
|
|
37
|
-
<input class="search" id="search" type="search" placeholder="Search repositories and pull requests" autocomplete="off" />
|
|
38
|
-
${filters}
|
|
20
|
+
export function renderMainContent(grouped) {
|
|
21
|
+
return `<main class="shell">
|
|
22
|
+
<div id="results">
|
|
23
|
+
${grouped.map(([repo, contributions]) => renderRepositorySection(repo, contributions)).join('')}
|
|
39
24
|
</div>
|
|
40
|
-
|
|
25
|
+
<div class="empty" id="empty" hidden>No matching contributions found.</div>
|
|
26
|
+
</main>`;
|
|
41
27
|
}
|
|
42
28
|
export function renderRepositorySection(repo, contributions) {
|
|
43
29
|
const first = contributions[0];
|
|
@@ -67,35 +53,47 @@ export function renderRepositorySection(repo, contributions) {
|
|
|
67
53
|
}
|
|
68
54
|
export function renderContributionCard(contribution) {
|
|
69
55
|
const description = renderRichDescription(contribution.pr_body);
|
|
70
|
-
const
|
|
71
|
-
const labels = contribution.labels.slice(0, 4);
|
|
56
|
+
const labels = contribution.labels.slice(0, 5);
|
|
72
57
|
const language = contribution.language ?? 'Unknown';
|
|
73
58
|
const reviewers = contribution.reviewers?.slice(0, 5) ?? [];
|
|
59
|
+
// Simplified reviewer display
|
|
74
60
|
const reviewHtml = reviewers.length > 0
|
|
75
61
|
? `<div class="reviewed-by">
|
|
76
|
-
<span
|
|
62
|
+
<span>✅ Approved by</span>
|
|
77
63
|
<div class="reviewers">${reviewers
|
|
78
64
|
.map((reviewer) => `<a href="https://github.com/${escapeHtml(reviewer.login)}" title="${escapeHtml(reviewer.login)}"><img src="${escapeHtml(reviewer.avatar_url)}" alt="${escapeHtml(reviewer.login)}" width="24" height="24" /></a>`)
|
|
79
65
|
.join('')}</div>
|
|
80
66
|
</div>`
|
|
81
67
|
: contribution.merged_by
|
|
82
68
|
? `<div class="reviewed-by">
|
|
83
|
-
<span
|
|
69
|
+
<span>✅ Merged by</span>
|
|
84
70
|
<a class="merged-by" href="https://github.com/${escapeHtml(contribution.merged_by)}">@${escapeHtml(contribution.merged_by)}</a>
|
|
85
71
|
</div>`
|
|
86
72
|
: '';
|
|
73
|
+
// Personal impact note
|
|
74
|
+
const noteHtml = contribution.note
|
|
75
|
+
? `<div class="impact-note">
|
|
76
|
+
<span>💡 <strong>My Impact:</strong> ${escapeHtml(contribution.note)}</span>
|
|
77
|
+
</div>`
|
|
78
|
+
: '';
|
|
87
79
|
return `<article class="contribution" data-title="${escapeHtml(contribution.pr_title)}" data-language="${escapeHtml(language)}">
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
<a class="pr-title" href="${escapeHtml(contribution.pr_url)}">${escapeHtml(contribution.pr_title)}</a>
|
|
81
|
+
|
|
82
|
+
${description ? `<details class="description-details">
|
|
83
|
+
<summary>📝 <strong>See description</strong></summary>
|
|
84
|
+
<div class="description">${description}</div>
|
|
85
|
+
</details>` : ''}
|
|
86
|
+
|
|
92
87
|
${reviewHtml}
|
|
88
|
+
${noteHtml}
|
|
89
|
+
|
|
93
90
|
<div class="meta-row">
|
|
94
91
|
<span><strong>Merged</strong>${escapeHtml(formatDate(contribution.merged_at))}</span>
|
|
95
92
|
<span><strong>Language</strong>${escapeHtml(language)}</span>
|
|
96
93
|
<span><strong>Changes</strong>+${contribution.additions.toLocaleString()} / -${contribution.deletions.toLocaleString()}</span>
|
|
97
94
|
<span><strong>Files</strong>${contribution.files_changed.toLocaleString()}</span>
|
|
98
95
|
</div>
|
|
96
|
+
|
|
99
97
|
${labels.length > 0
|
|
100
98
|
? `<div class="labels">${labels
|
|
101
99
|
.map((label) => `<span>${escapeHtml(label)}</span>`)
|
|
@@ -103,14 +101,6 @@ export function renderContributionCard(contribution) {
|
|
|
103
101
|
: ''}
|
|
104
102
|
</article>`;
|
|
105
103
|
}
|
|
106
|
-
export function renderMainContent(grouped) {
|
|
107
|
-
return `<main class="shell">
|
|
108
|
-
<div id="results">
|
|
109
|
-
${grouped.map(([repo, contributions]) => renderRepositorySection(repo, contributions)).join('')}
|
|
110
|
-
</div>
|
|
111
|
-
<div class="empty" id="empty" hidden>No matching contributions.</div>
|
|
112
|
-
</main>`;
|
|
113
|
-
}
|
|
114
104
|
export function renderFooter(updatedAt) {
|
|
115
105
|
return `<footer>
|
|
116
106
|
<div class="shell">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/repo/site/components.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,UAAU,EACV,UAAU,EACV,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,MAAM,UAAU,UAAU,CAAC,WAAwB,EAAE,MAAiB;IACpE,MAAM,WAAW,GAAG,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,CAAC;IAE7D,OAAO;;;4DAGmD,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,cAAc,UAAU,CAAC,WAAW,CAAC;;qCAE5F,UAAU,CAAC,WAAW,CAAC;gDACZ,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC;;;;;;;;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Y,CAAC,IAAI;QAChC,CAAC,CAAC;yDACmD,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC;uBAC/D;QACnB,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,6CAA6C,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC,oBAAoB,UAAU,CAAC,QAAQ,CAAC;4CACnF,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,UAAU,CAAC,YAAY,CAAC,QAAQ,CAAC;;kBAE/F,WAAW,CAAC,CAAC,CAAC;;6CAEa,WAAW;2BAC7B,CAAC,CAAC,CAAC,EAAE;;kBAEd,UAAU;kBACV,QAAQ;;;iDAGuB,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;mDAC5C,UAAU,CAAC,QAAQ,CAAC;mDACpB,YAAY,CAAC,SAAS,CAAC,cAAc,EAAE,OAAO,YAAY,CAAC,SAAS,CAAC,cAAc,EAAE;gDACxF,YAAY,CAAC,aAAa,CAAC,cAAc,EAAE;;;kBAIzE,MAAM,CAAC,MAAM,GAAG,CAAC;QACf,CAAC,CAAC,uBAAuB,MAAM;aAC1B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC;aACnD,IAAI,CAAC,EAAE,CAAC,QAAQ;QACrB,CAAC,CAAC,EACN;yBACS,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,SAAiB;IAC5C,OAAO;;kBAES,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;;cAErC,CAAC;AACf,CAAC"}
|
|
@@ -45,66 +45,66 @@ function generatePRCard(pr) {
|
|
|
45
45
|
});
|
|
46
46
|
const changes = `+${pr.additions || 0} −${pr.deletions || 0}`;
|
|
47
47
|
const files = pr.files_changed ? `${pr.files_changed} files` : '';
|
|
48
|
-
// Clean
|
|
49
|
-
let
|
|
48
|
+
// Clean description properly
|
|
49
|
+
let cleanedDescription = '';
|
|
50
50
|
if (pr.pr_body) {
|
|
51
|
-
|
|
52
|
-
.replace(/<!--[\s\S]*?-->/g, '')
|
|
53
|
-
.replace(/```[\s\S]*?```/g, '')
|
|
54
|
-
.replace(/#{1,6}\s+/g, '')
|
|
55
|
-
.replace(/\*\*([^*]+)\*\*/g, '$1')
|
|
56
|
-
.replace(/\[([^\]]+)\]\([^\)]+\)/g, '$1')
|
|
57
|
-
.replace(/\n+/g, '
|
|
58
|
-
.replace(/\s+/g, ' ')
|
|
51
|
+
cleanedDescription = pr.pr_body
|
|
52
|
+
.replace(/<!--[\s\S]*?-->/g, '') // Remove HTML comments
|
|
53
|
+
.replace(/```[\s\S]*?```/g, '') // Remove code blocks
|
|
54
|
+
.replace(/#{1,6}\s+/g, '') // Remove markdown headers
|
|
55
|
+
.replace(/\*\*([^*]+)\*\*/g, '$1') // Remove bold
|
|
56
|
+
.replace(/\[([^\]]+)\]\([^\)]+\)/g, '$1') // Remove links but keep text
|
|
57
|
+
.replace(/\n+/g, '\n') // Normalize line breaks
|
|
59
58
|
.trim();
|
|
60
|
-
description = cleaned.length > 300
|
|
61
|
-
? cleaned.substring(0, 300) + '...'
|
|
62
|
-
: cleaned;
|
|
63
59
|
}
|
|
64
|
-
//
|
|
60
|
+
// Description with collapsible details
|
|
61
|
+
const descriptionHtml = cleanedDescription ? `
|
|
62
|
+
<details>
|
|
63
|
+
<summary><strong>📝 See description</strong></summary>
|
|
64
|
+
<blockquote>
|
|
65
|
+
<p>${cleanedDescription}</p>
|
|
66
|
+
</blockquote>
|
|
67
|
+
</details>` : '';
|
|
68
|
+
// Reviewers section - more compact
|
|
65
69
|
let reviewersHtml = '';
|
|
66
70
|
if (pr.reviewers && pr.reviewers.length > 0) {
|
|
67
71
|
const reviewerBadges = pr.reviewers
|
|
68
72
|
.map(r => `<a href="https://github.com/${r.login}"><img src="${r.avatar_url}" width="20" height="20" style="border-radius: 50%; vertical-align: middle;" alt="${r.login}" title="${r.login}"/></a>`)
|
|
69
73
|
.join(' ');
|
|
70
|
-
reviewersHtml =
|
|
71
|
-
<p>
|
|
72
|
-
<sub>✅ <strong>Reviewed by:</strong> ${reviewerBadges}</sub>
|
|
73
|
-
</p>`;
|
|
74
|
+
reviewersHtml = `<sub>✅ Reviewed by: ${reviewerBadges}</sub>`;
|
|
74
75
|
}
|
|
75
76
|
else if (pr.merged_by) {
|
|
76
|
-
reviewersHtml =
|
|
77
|
-
<p>
|
|
78
|
-
<sub>✅ <strong>Merged by:</strong> <a href="https://github.com/${pr.merged_by}">@${pr.merged_by}</a></sub>
|
|
79
|
-
</p>`;
|
|
77
|
+
reviewersHtml = `<sub>✅ Merged by: <a href="https://github.com/${pr.merged_by}">@${pr.merged_by}</a></sub>`;
|
|
80
78
|
}
|
|
81
79
|
// Personal note
|
|
82
80
|
const noteHtml = pr.note ? `
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// Labels
|
|
81
|
+
<blockquote>
|
|
82
|
+
<p>💡 <strong>My Impact:</strong> ${pr.note}</p>
|
|
83
|
+
</blockquote>` : '';
|
|
84
|
+
// Labels - more compact
|
|
87
85
|
const labelsHtml = pr.labels && pr.labels.length > 0
|
|
88
|
-
?
|
|
86
|
+
? pr.labels.slice(0, 5).map(l => `<img src="https://img.shields.io/badge/${encodeURIComponent(l.replace(/-/g, '--'))}-gray?style=flat-square" alt="${l}"/>`).join(' ')
|
|
89
87
|
: '';
|
|
90
88
|
return `
|
|
91
|
-
<div style="padding: 16px; border-left:
|
|
92
|
-
|
|
93
|
-
#### [${pr.pr_title}](${pr.pr_url})
|
|
89
|
+
<div style="padding: 12px 16px; border-left: 3px solid #0969da; margin: 10px 0; background: #f6f8fa; border-radius: 6px;">
|
|
94
90
|
|
|
95
|
-
|
|
91
|
+
<h4 style="margin: 0 0 8px 0;">
|
|
92
|
+
<a href="${pr.pr_url}">${pr.pr_title}</a>
|
|
93
|
+
</h4>
|
|
96
94
|
|
|
97
|
-
|
|
98
|
-
${reviewersHtml}
|
|
99
|
-
|
|
100
|
-
<p>
|
|
95
|
+
<p style="margin: 4px 0; font-size: 0.9em;">
|
|
101
96
|
<img src="https://img.shields.io/badge/📅_${encodeURIComponent(date)}-blue?style=flat-square" alt="Merged ${date}"/>
|
|
102
97
|
<img src="https://img.shields.io/badge/📊_${encodeURIComponent(changes)}-success?style=flat-square" alt="Changes"/>
|
|
103
98
|
${files ? `<img src="https://img.shields.io/badge/📁_${encodeURIComponent(files)}-orange?style=flat-square" alt="${files}"/>` : ''}
|
|
104
|
-
<a href="${pr.pr_url}"><img src="https://img.shields.io/badge/View_PR-→-purple?style=flat-square" alt="View PR"/></a>
|
|
105
99
|
</p>
|
|
106
100
|
|
|
107
|
-
${
|
|
101
|
+
${reviewersHtml ? `<p style="margin: 4px 0;">${reviewersHtml}</p>` : ''}
|
|
102
|
+
|
|
103
|
+
${labelsHtml ? `<p style="margin: 4px 0;">${labelsHtml}</p>` : ''}
|
|
104
|
+
|
|
105
|
+
${descriptionHtml}
|
|
106
|
+
|
|
107
|
+
${noteHtml}
|
|
108
108
|
|
|
109
109
|
</div>
|
|
110
110
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-section.js","sourceRoot":"","sources":["../../src/templates/project-section.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,sBAAsB,CACpC,IAAY,EACZ,aAAqC;IAErC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAChC,MAAM,YAAY,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;IACtC,IAAI,CAAC,YAAY;QAAE,OAAO,EAAE,CAAC;IAE7B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,YAAY,CAAC;IAC9C,MAAM,KAAK,GAAG,UAAU,CAAC,cAAc,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC;IACnC,MAAM,MAAM,GAAG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,CAAC,EAAE;;EAE/D,eAAe;;EAEf,QAAQ;;;CAGT,CAAC;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme-header.d.ts","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE;IAC9D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"readme-header.d.ts","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE;IAC9D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,CAgHT"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Professional README header template with responsive navigation
|
|
3
3
|
*/
|
|
4
4
|
export function generateHeader(contributor, stats) {
|
|
5
|
-
const { username, name, profile_url
|
|
5
|
+
const { username, name, profile_url } = contributor;
|
|
6
6
|
const displayName = name || username;
|
|
7
7
|
const avatarUrl = `https://github.com/${username}.png`;
|
|
8
8
|
return `
|
|
@@ -34,7 +34,6 @@ export function generateHeader(contributor, stats) {
|
|
|
34
34
|
<p style="margin: 5px 0 0 0; color: rgba(255,255,255,0.9); font-size: 18px;">
|
|
35
35
|
<a href="${profile_url}" style="color: white; text-decoration: none;">@${username}</a>
|
|
36
36
|
</p>
|
|
37
|
-
${bio ? `<p style="margin: 8px 0 0 0; color: rgba(255,255,255,0.8); font-size: 14px; font-style: italic;">${bio}</p>` : ''}
|
|
38
37
|
</td>
|
|
39
38
|
<td align="right" style="border: none; vertical-align: middle; padding: 0;">
|
|
40
39
|
<table style="border: none;">
|
|
@@ -75,7 +74,6 @@ export function generateHeader(contributor, stats) {
|
|
|
75
74
|
<p style="margin: 5px 0;">
|
|
76
75
|
<a href="${profile_url}" style="color: #667eea; text-decoration: none; font-size: 18px;">@${username}</a>
|
|
77
76
|
</p>
|
|
78
|
-
${bio ? `<p style="margin: 15px 20px; color: #666; font-style: italic;">${bio}</p>` : ''}
|
|
79
77
|
|
|
80
78
|
<table align="center" style="margin: 20px 0;">
|
|
81
79
|
<tr>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readme-header.js","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,cAAc,CAAC,WAAwB,EAAE,KAIxD;IACC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"readme-header.js","sourceRoot":"","sources":["../../src/templates/readme-header.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,UAAU,cAAc,CAAC,WAAwB,EAAE,KAIxD;IACC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,WAAW,CAAC;IACpD,MAAM,WAAW,GAAG,IAAI,IAAI,QAAQ,CAAC;IACrC,MAAM,SAAS,GAAG,sBAAsB,QAAQ,MAAM,CAAC;IAEvD,OAAO;;;;;;;;;;;;;;;;;;mBAkBU,WAAW;sBACR,SAAS,iCAAiC,QAAQ;;;;;YAK5D,WAAW;;;qBAGF,WAAW,mDAAmD,QAAQ;;;;;;;;iFAQV,KAAK,CAAC,kBAAkB;;;;;;iFAMxB,KAAK,CAAC,aAAa;;;;;;iFAMnB,KAAK,CAAC,cAAc;;;;;;;;;;;;;;;aAexF,WAAW;gBACR,SAAS,mCAAmC,QAAQ;;gCAEpC,WAAW;;eAE5B,WAAW,sEAAsE,QAAQ;;;;;;2EAM7B,KAAK,CAAC,kBAAkB;;;;2EAIxB,KAAK,CAAC,aAAa;;;;2EAInB,KAAK,CAAC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;CAyB9F,CAAC;AACF,CAAC"}
|