@danielwh2/contribution-graph 1.0.14
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/LICENSE +21 -0
- package/README.md +327 -0
- package/dist/contributionGraph.d.ts +150 -0
- package/dist/contributionGraph.js +328 -0
- package/dist/github.d.ts +19 -0
- package/dist/github.js +109 -0
- package/dist/htmlGraph.d.ts +13 -0
- package/dist/htmlGraph.js +199 -0
- package/dist/hudGraph.d.ts +25 -0
- package/dist/hudGraph.js +194 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +109 -0
- package/dist/profileGraph.d.ts +7 -0
- package/dist/profileGraph.js +81 -0
- package/dist/react.d.ts +7 -0
- package/dist/react.js +22 -0
- package/dist/solid.d.ts +14 -0
- package/dist/solid.js +13 -0
- package/dist/svelte.d.ts +9 -0
- package/dist/svelte.js +12 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/tooltip.js +84 -0
- package/dist/vue.d.ts +25 -0
- package/dist/vue.js +33 -0
- package/package.json +101 -0
- package/style.css +610 -0
- package/style.css.d.ts +2 -0
package/style.css
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
.contribution-graph {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
font-family: inherit;
|
|
4
|
+
color: #1f2328;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
/* ── SVG mode ── */
|
|
8
|
+
|
|
9
|
+
.contribution-graph svg {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.contribution-graph svg rect {
|
|
14
|
+
transition: fill 120ms ease, opacity 120ms ease, stroke 120ms ease, filter 120ms ease;
|
|
15
|
+
shape-rendering: geometricPrecision;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.contribution-graph svg:hover rect {
|
|
19
|
+
opacity: 0.35;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.contribution-graph svg rect:hover {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
stroke: rgba(0, 0, 0, 0.6);
|
|
25
|
+
stroke-width: 2px;
|
|
26
|
+
filter: brightness(1.3) drop-shadow(0 0 4px rgba(0, 0, 0, 0.25));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ── HTML count mode ── */
|
|
30
|
+
|
|
31
|
+
.contribution-graph--counts {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
scrollbar-width: thin;
|
|
36
|
+
scrollbar-color: gray transparent;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.cg-grid {
|
|
40
|
+
display: grid;
|
|
41
|
+
gap: var(--cg-gap, 4px);
|
|
42
|
+
font-variant-numeric: tabular-nums;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.cg-month-label,
|
|
46
|
+
.cg-weekday-label {
|
|
47
|
+
font-size: 11px;
|
|
48
|
+
line-height: 1;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
user-select: none;
|
|
51
|
+
font-weight: 400;
|
|
52
|
+
text-transform: none;
|
|
53
|
+
letter-spacing: 0;
|
|
54
|
+
color: #7d8590;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.cg-month-label {
|
|
58
|
+
justify-self: start;
|
|
59
|
+
align-self: end;
|
|
60
|
+
padding-bottom: 6px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.cg-weekday-label {
|
|
64
|
+
align-self: center;
|
|
65
|
+
justify-self: end;
|
|
66
|
+
padding-right: 8px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.cg-cell {
|
|
70
|
+
display: grid;
|
|
71
|
+
place-items: center;
|
|
72
|
+
min-width: 0;
|
|
73
|
+
min-height: 0;
|
|
74
|
+
border-radius: var(--cg-radius, 4px);
|
|
75
|
+
transition: transform 150ms ease, opacity 150ms ease;
|
|
76
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.cg-count {
|
|
80
|
+
line-height: 1;
|
|
81
|
+
font-weight: 650;
|
|
82
|
+
font-variant-numeric: tabular-nums;
|
|
83
|
+
pointer-events: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cg-grid .cg-cell:hover {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
transform: scale(1.15);
|
|
89
|
+
z-index: 10;
|
|
90
|
+
position: relative;
|
|
91
|
+
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 4px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* ── Tooltip ── */
|
|
95
|
+
|
|
96
|
+
.cg-tooltip {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 0;
|
|
99
|
+
left: 0;
|
|
100
|
+
z-index: 99999;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
background: rgba(255, 255, 255, 0.85);
|
|
103
|
+
backdrop-filter: blur(8px);
|
|
104
|
+
-webkit-backdrop-filter: blur(8px);
|
|
105
|
+
color: #171717;
|
|
106
|
+
padding: 4px 8px;
|
|
107
|
+
font-size: 11px;
|
|
108
|
+
font-weight: 500;
|
|
109
|
+
font-family: inherit;
|
|
110
|
+
border-radius: 6px;
|
|
111
|
+
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
112
|
+
white-space: nowrap;
|
|
113
|
+
opacity: 0;
|
|
114
|
+
transform: translate(-50%, calc(-100% - 2px)) scale(0.95);
|
|
115
|
+
transition: opacity 150ms cubic-bezier(0.16, 1, 0.3, 1), transform 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
116
|
+
box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.08), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.cg-tooltip-text {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
white-space: pre;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.cg-tooltip.is-visible {
|
|
125
|
+
opacity: 1;
|
|
126
|
+
transform: translate(-50%, calc(-100% - 6px)) scale(1);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* ── Profile mode ── */
|
|
130
|
+
|
|
131
|
+
.cg-profile {
|
|
132
|
+
--cg-profile-outer: #ffffff;
|
|
133
|
+
--cg-profile-inner: #fcfcfd;
|
|
134
|
+
--cg-profile-border: rgba(0, 0, 0, 0.08);
|
|
135
|
+
--cg-profile-border-soft: rgba(0, 0, 0, 0.07);
|
|
136
|
+
--cg-profile-text: #18181b;
|
|
137
|
+
--cg-profile-muted: #71717a;
|
|
138
|
+
--cg-profile-sans: inherit;
|
|
139
|
+
|
|
140
|
+
position: relative;
|
|
141
|
+
width: 100%;
|
|
142
|
+
max-width: 100%;
|
|
143
|
+
background:
|
|
144
|
+
linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0)) ,
|
|
145
|
+
var(--cg-profile-outer);
|
|
146
|
+
border: 1px solid var(--cg-profile-border);
|
|
147
|
+
border-radius: 16px;
|
|
148
|
+
padding: 14px;
|
|
149
|
+
color: var(--cg-profile-text);
|
|
150
|
+
font-family: var(--cg-profile-sans);
|
|
151
|
+
-webkit-font-smoothing: antialiased;
|
|
152
|
+
box-shadow:
|
|
153
|
+
0 1px 1px rgba(0, 0, 0, 0.03),
|
|
154
|
+
0 8px 24px -12px rgba(0, 0, 0, 0.12);
|
|
155
|
+
display: flex;
|
|
156
|
+
flex-direction: column;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.cg-profile-header {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
gap: 12px;
|
|
163
|
+
font-size: 16px;
|
|
164
|
+
letter-spacing: -0.025em;
|
|
165
|
+
padding: 6px 12px 16px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.cg-profile-logo {
|
|
169
|
+
display: inline-flex;
|
|
170
|
+
color: var(--cg-profile-text);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.cg-profile-brand {
|
|
174
|
+
font-weight: 600;
|
|
175
|
+
color: var(--cg-profile-text);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.cg-profile-sep {
|
|
179
|
+
width: 1px;
|
|
180
|
+
align-self: stretch;
|
|
181
|
+
margin: 2px 0;
|
|
182
|
+
background: var(--cg-profile-border);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.cg-profile-user {
|
|
186
|
+
color: var(--cg-profile-muted);
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
letter-spacing: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.cg-profile-inner {
|
|
192
|
+
position: relative;
|
|
193
|
+
min-width: 0;
|
|
194
|
+
background: var(--cg-profile-inner);
|
|
195
|
+
border: 1px solid var(--cg-profile-border-soft);
|
|
196
|
+
border-radius: 10px;
|
|
197
|
+
padding: 20px;
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
|
|
200
|
+
display: flex;
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* one-time diagonal light sweep across the panel on load — the premium touch */
|
|
205
|
+
.cg-profile-inner::before {
|
|
206
|
+
content: "";
|
|
207
|
+
position: absolute;
|
|
208
|
+
inset: 0;
|
|
209
|
+
z-index: 2;
|
|
210
|
+
pointer-events: none;
|
|
211
|
+
background: linear-gradient(
|
|
212
|
+
105deg,
|
|
213
|
+
transparent 38%,
|
|
214
|
+
rgba(255, 255, 255, 0.55) 50%,
|
|
215
|
+
transparent 62%
|
|
216
|
+
);
|
|
217
|
+
transform: translateX(-120%);
|
|
218
|
+
animation: cg-profile-sweep 1.5s var(--cg-profile-ease, cubic-bezier(0.16, 1, 0.3, 1)) 0.25s 1 both;
|
|
219
|
+
}
|
|
220
|
+
@keyframes cg-profile-sweep {
|
|
221
|
+
to { transform: translateX(120%); }
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* premium right-edge fade hinting the graph scrolls under the card */
|
|
225
|
+
.cg-profile-inner::after {
|
|
226
|
+
content: "";
|
|
227
|
+
position: absolute;
|
|
228
|
+
top: 1px;
|
|
229
|
+
bottom: 1px;
|
|
230
|
+
right: 1px;
|
|
231
|
+
width: 40px;
|
|
232
|
+
z-index: 3;
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
border-radius: 0 9px 9px 0;
|
|
235
|
+
background: linear-gradient(90deg, rgba(252, 252, 253, 0), var(--cg-profile-inner));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.cg-profile-graph {
|
|
239
|
+
position: relative;
|
|
240
|
+
z-index: 1;
|
|
241
|
+
width: 100%;
|
|
242
|
+
max-width: 100%;
|
|
243
|
+
min-width: 0;
|
|
244
|
+
overflow-x: auto;
|
|
245
|
+
overflow-y: hidden;
|
|
246
|
+
padding: 0 6px;
|
|
247
|
+
scroll-padding-inline: 6px;
|
|
248
|
+
line-height: 0;
|
|
249
|
+
scrollbar-width: thin;
|
|
250
|
+
scrollbar-color: gray transparent;
|
|
251
|
+
-webkit-overflow-scrolling: touch;
|
|
252
|
+
overscroll-behavior-x: contain;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.cg-profile-graph > .contribution-graph {
|
|
256
|
+
display: block;
|
|
257
|
+
width: max-content;
|
|
258
|
+
line-height: normal;
|
|
259
|
+
}
|
|
260
|
+
.cg-profile-graph::-webkit-scrollbar {
|
|
261
|
+
height: 6px;
|
|
262
|
+
}
|
|
263
|
+
.cg-profile-graph::-webkit-scrollbar-track {
|
|
264
|
+
background: transparent;
|
|
265
|
+
}
|
|
266
|
+
.cg-profile-graph::-webkit-scrollbar-thumb {
|
|
267
|
+
background: gray;
|
|
268
|
+
border-radius: 999px;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.cg-profile .contribution-graph {
|
|
272
|
+
color: var(--cg-profile-text);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.cg-profile-graph svg {
|
|
276
|
+
display: block;
|
|
277
|
+
overflow: visible;
|
|
278
|
+
animation: cg-profile-rise 560ms var(--cg-profile-ease, cubic-bezier(0.16, 1, 0.3, 1)) both;
|
|
279
|
+
}
|
|
280
|
+
@keyframes cg-profile-rise {
|
|
281
|
+
from { opacity: 0; transform: translateY(6px); }
|
|
282
|
+
to { opacity: 1; transform: translateY(0); }
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.cg-profile .cg-month-label {
|
|
286
|
+
padding-bottom: 12px;
|
|
287
|
+
color: var(--cg-profile-muted);
|
|
288
|
+
font-weight: 500;
|
|
289
|
+
}
|
|
290
|
+
.cg-profile .cg-weekday-label {
|
|
291
|
+
padding-right: 12px;
|
|
292
|
+
color: var(--cg-profile-muted);
|
|
293
|
+
font-weight: 500;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Tactile, premium cell interactions — lift the hovered day, dim the rest */
|
|
297
|
+
.cg-profile-graph svg rect {
|
|
298
|
+
stroke-width: 0;
|
|
299
|
+
transform-box: fill-box;
|
|
300
|
+
transform-origin: center;
|
|
301
|
+
transition: opacity 150ms ease, stroke 150ms ease, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.cg-profile-graph svg:hover rect {
|
|
305
|
+
opacity: 0.45;
|
|
306
|
+
}
|
|
307
|
+
.cg-profile-graph svg rect:hover {
|
|
308
|
+
opacity: 1;
|
|
309
|
+
stroke: rgba(0, 0, 0, 0.22);
|
|
310
|
+
stroke-width: 1.25px;
|
|
311
|
+
transform: scale(1.28);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.cg-profile-footer {
|
|
315
|
+
display: flex;
|
|
316
|
+
justify-content: space-between;
|
|
317
|
+
align-items: center;
|
|
318
|
+
gap: 16px;
|
|
319
|
+
flex-wrap: wrap;
|
|
320
|
+
font-size: 13px;
|
|
321
|
+
color: var(--cg-profile-muted);
|
|
322
|
+
margin-top: 12px;
|
|
323
|
+
padding: 0 4px;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.cg-profile-legend {
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
gap: 8px;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.cg-profile-legend-colors {
|
|
333
|
+
display: flex;
|
|
334
|
+
gap: 4px;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.cg-profile-legend-colors i {
|
|
338
|
+
display: block;
|
|
339
|
+
width: 11px;
|
|
340
|
+
height: 11px;
|
|
341
|
+
border-radius: 3px;
|
|
342
|
+
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
|
|
343
|
+
}
|
|
344
|
+
.cg-profile-legend-colors i:nth-child(1) { background: #ebedf0; }
|
|
345
|
+
.cg-profile-legend-colors i:nth-child(2) { background: #9be9a8; }
|
|
346
|
+
.cg-profile-legend-colors i:nth-child(3) { background: #40c463; }
|
|
347
|
+
.cg-profile-legend-colors i:nth-child(4) { background: #30a14e; }
|
|
348
|
+
.cg-profile-legend-colors i:nth-child(5) { background: #216e39; }
|
|
349
|
+
|
|
350
|
+
.cg-profile-total {
|
|
351
|
+
color: var(--cg-profile-text);
|
|
352
|
+
font-weight: 400;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.cg-profile-total strong {
|
|
356
|
+
font-weight: 600;
|
|
357
|
+
font-variant-numeric: tabular-nums;
|
|
358
|
+
letter-spacing: -0.01em;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
@media (prefers-reduced-motion: reduce) {
|
|
362
|
+
.cg-profile-inner::before,
|
|
363
|
+
.cg-profile-graph svg {
|
|
364
|
+
animation: none;
|
|
365
|
+
}
|
|
366
|
+
.cg-profile-graph svg rect:hover {
|
|
367
|
+
transform: none;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
/* ── HUD mode ── */
|
|
373
|
+
|
|
374
|
+
.cg-hud {
|
|
375
|
+
--cg-hud-ink: #e8ecea;
|
|
376
|
+
--cg-hud-dim: #8a988f;
|
|
377
|
+
--cg-hud-green: #7fe07a;
|
|
378
|
+
--cg-hud-amber: #f0a637;
|
|
379
|
+
--cg-hud-line: rgba(232, 236, 234, 0.1);
|
|
380
|
+
--cg-hud-line-strong: rgba(232, 236, 234, 0.22);
|
|
381
|
+
--cg-hud-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
382
|
+
|
|
383
|
+
position: relative;
|
|
384
|
+
display: flex;
|
|
385
|
+
justify-content: center;
|
|
386
|
+
align-items: center;
|
|
387
|
+
overflow: hidden;
|
|
388
|
+
box-sizing: border-box;
|
|
389
|
+
padding: clamp(28px, 6vw, 72px);
|
|
390
|
+
color: var(--cg-hud-ink);
|
|
391
|
+
font-family: var(--cg-hud-mono);
|
|
392
|
+
font-variant-numeric: tabular-nums;
|
|
393
|
+
-webkit-font-smoothing: antialiased;
|
|
394
|
+
background: #05080a;
|
|
395
|
+
isolation: isolate;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.cg-hud *,
|
|
399
|
+
.cg-hud *::before,
|
|
400
|
+
.cg-hud *::after {
|
|
401
|
+
box-sizing: border-box;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* animated glitch backdrop: teal → ember */
|
|
405
|
+
.cg-hud-bg {
|
|
406
|
+
position: absolute;
|
|
407
|
+
inset: 0;
|
|
408
|
+
z-index: 0;
|
|
409
|
+
pointer-events: none;
|
|
410
|
+
background:
|
|
411
|
+
radial-gradient(120% 80% at 30% -10%, #0f3a3a 0%, rgba(15, 58, 58, 0) 55%),
|
|
412
|
+
radial-gradient(120% 90% at 70% 115%, #6e2a08 0%, rgba(110, 42, 8, 0) 50%),
|
|
413
|
+
linear-gradient(180deg, #0a1a1c 0%, #0a0f10 45%, #160c06 100%);
|
|
414
|
+
}
|
|
415
|
+
.cg-hud-bg::before {
|
|
416
|
+
content: "";
|
|
417
|
+
position: absolute;
|
|
418
|
+
inset: -20%;
|
|
419
|
+
background: radial-gradient(40% 40% at 50% 50%, rgba(127, 224, 122, 0.06), transparent 70%);
|
|
420
|
+
animation: cg-hud-drift 14s ease-in-out infinite alternate;
|
|
421
|
+
will-change: transform;
|
|
422
|
+
}
|
|
423
|
+
@keyframes cg-hud-drift {
|
|
424
|
+
from { transform: translate3d(-6%, -4%, 0) scale(1.05); }
|
|
425
|
+
to { transform: translate3d(8%, 6%, 0) scale(1.15); }
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* glitch ASCII bands: teal top, ember bottom */
|
|
429
|
+
.cg-hud-ascii {
|
|
430
|
+
position: absolute;
|
|
431
|
+
left: 0;
|
|
432
|
+
right: 0;
|
|
433
|
+
z-index: 1;
|
|
434
|
+
margin: 0;
|
|
435
|
+
pointer-events: none;
|
|
436
|
+
font-family: var(--cg-hud-mono);
|
|
437
|
+
font-size: 12px;
|
|
438
|
+
line-height: 1.15;
|
|
439
|
+
letter-spacing: 1px;
|
|
440
|
+
white-space: pre-wrap;
|
|
441
|
+
word-break: break-all;
|
|
442
|
+
overflow: hidden;
|
|
443
|
+
user-select: none;
|
|
444
|
+
opacity: 0.5;
|
|
445
|
+
mix-blend-mode: screen;
|
|
446
|
+
}
|
|
447
|
+
.cg-hud-ascii--top {
|
|
448
|
+
top: 0;
|
|
449
|
+
height: 130px;
|
|
450
|
+
color: #2f8f86;
|
|
451
|
+
-webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
|
|
452
|
+
mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
|
|
453
|
+
}
|
|
454
|
+
.cg-hud-ascii--bot {
|
|
455
|
+
bottom: 0;
|
|
456
|
+
height: 150px;
|
|
457
|
+
color: #c4641c;
|
|
458
|
+
-webkit-mask-image: linear-gradient(0deg, #000 0%, transparent 100%);
|
|
459
|
+
mask-image: linear-gradient(0deg, #000 0%, transparent 100%);
|
|
460
|
+
}
|
|
461
|
+
.cg-hud-ascii span { animation: cg-hud-flick 3.2s steps(1) infinite; }
|
|
462
|
+
@keyframes cg-hud-flick { 0%, 92%, 100% { opacity: 1; } 94% { opacity: 0.25; } 96% { opacity: 0.85; } }
|
|
463
|
+
|
|
464
|
+
/* scanlines over the panel */
|
|
465
|
+
.cg-hud-scan {
|
|
466
|
+
position: absolute;
|
|
467
|
+
inset: 0;
|
|
468
|
+
z-index: 60;
|
|
469
|
+
pointer-events: none;
|
|
470
|
+
background: repeating-linear-gradient(180deg, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,0,0,0.16) 3px);
|
|
471
|
+
mix-blend-mode: multiply;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* the glass panel */
|
|
475
|
+
.cg-hud-panel {
|
|
476
|
+
position: relative;
|
|
477
|
+
z-index: 10;
|
|
478
|
+
width: min(1080px, 100%);
|
|
479
|
+
padding: 30px 36px 28px;
|
|
480
|
+
background: rgba(8, 14, 14, 0.62);
|
|
481
|
+
backdrop-filter: blur(10px) saturate(120%);
|
|
482
|
+
-webkit-backdrop-filter: blur(10px) saturate(120%);
|
|
483
|
+
box-shadow:
|
|
484
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.05),
|
|
485
|
+
0 40px 120px -40px rgba(0, 0, 0, 0.9);
|
|
486
|
+
animation: cg-hud-boot 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
|
|
487
|
+
}
|
|
488
|
+
@keyframes cg-hud-boot { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
|
|
489
|
+
|
|
490
|
+
.cg-hud-corner {
|
|
491
|
+
position: absolute;
|
|
492
|
+
width: 22px;
|
|
493
|
+
height: 22px;
|
|
494
|
+
border: 2px solid var(--cg-hud-line-strong);
|
|
495
|
+
}
|
|
496
|
+
.cg-hud-corner--tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
|
|
497
|
+
.cg-hud-corner--tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
|
|
498
|
+
.cg-hud-corner--bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
|
|
499
|
+
.cg-hud-corner--br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
|
|
500
|
+
|
|
501
|
+
.cg-hud-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
|
|
502
|
+
.cg-hud-title {
|
|
503
|
+
margin: 0;
|
|
504
|
+
font-size: clamp(20px, 3vw, 28px);
|
|
505
|
+
font-weight: 700;
|
|
506
|
+
letter-spacing: 0.12em;
|
|
507
|
+
color: #f3f6f4;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.cg-hud-rule { height: 1px; background: var(--cg-hud-line); margin: 22px 0; }
|
|
511
|
+
|
|
512
|
+
.cg-hud-week { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
|
|
513
|
+
.cg-hud-stat { display: inline-flex; align-items: baseline; gap: 10px; }
|
|
514
|
+
.cg-hud-k { color: var(--cg-hud-dim); font-size: 15px; letter-spacing: 0.04em; }
|
|
515
|
+
.cg-hud-big { color: #f3f6f4; font-size: 17px; font-weight: 700; }
|
|
516
|
+
.cg-hud-delta { color: var(--cg-hud-green); font-size: 17px; font-weight: 600; }
|
|
517
|
+
.cg-hud-delta.is-neg { color: var(--cg-hud-amber); }
|
|
518
|
+
.cg-hud .slot-text { display: inline-flex; }
|
|
519
|
+
|
|
520
|
+
.cg-hud-graph-wrap {
|
|
521
|
+
margin: 18px 0 4px;
|
|
522
|
+
width: 100%;
|
|
523
|
+
max-width: 100%;
|
|
524
|
+
min-width: 0;
|
|
525
|
+
overflow-x: auto;
|
|
526
|
+
overflow-y: hidden;
|
|
527
|
+
padding: 0;
|
|
528
|
+
line-height: 0;
|
|
529
|
+
scrollbar-width: thin;
|
|
530
|
+
scrollbar-color: gray transparent;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
.cg-hud-graph-wrap > .cg-hud-graph.contribution-graph {
|
|
534
|
+
display: block;
|
|
535
|
+
width: max-content;
|
|
536
|
+
line-height: normal;
|
|
537
|
+
}
|
|
538
|
+
.cg-hud-graph-wrap::-webkit-scrollbar { height: 6px; }
|
|
539
|
+
.cg-hud-graph-wrap::-webkit-scrollbar-track { background: transparent; }
|
|
540
|
+
.cg-hud-graph-wrap::-webkit-scrollbar-thumb { background: gray; border-radius: 999px; }
|
|
541
|
+
|
|
542
|
+
.cg-hud .cg-hud-graph.contribution-graph { color: var(--cg-hud-ink); }
|
|
543
|
+
.cg-hud .cg-hud-graph svg text { font-family: var(--cg-hud-mono) !important; letter-spacing: 0; }
|
|
544
|
+
.cg-hud .cg-hud-graph svg rect { shape-rendering: crispEdges; }
|
|
545
|
+
.cg-hud .cg-hud-graph svg:hover rect { opacity: 0.22; }
|
|
546
|
+
.cg-hud .cg-hud-graph svg rect:hover { opacity: 1; stroke: var(--cg-hud-green); stroke-width: 1.5px; }
|
|
547
|
+
|
|
548
|
+
.cg-hud-foot { display: flex; align-items: center; justify-content: flex-end; gap: 20px; flex-wrap: wrap; }
|
|
549
|
+
.cg-hud-streak {
|
|
550
|
+
display: inline-flex;
|
|
551
|
+
align-items: center;
|
|
552
|
+
gap: 9px;
|
|
553
|
+
padding: 11px 18px;
|
|
554
|
+
border-radius: 8px;
|
|
555
|
+
background: rgba(240, 166, 55, 0.1);
|
|
556
|
+
box-shadow: inset 0 0 0 1px rgba(240, 166, 55, 0.3);
|
|
557
|
+
color: var(--cg-hud-amber);
|
|
558
|
+
font-size: 16px;
|
|
559
|
+
font-weight: 600;
|
|
560
|
+
letter-spacing: 0.06em;
|
|
561
|
+
transition: transform 200ms cubic-bezier(0.2, 0, 0, 1), box-shadow 200ms ease;
|
|
562
|
+
}
|
|
563
|
+
.cg-hud-streak:hover {
|
|
564
|
+
transform: translateY(-1px);
|
|
565
|
+
box-shadow: inset 0 0 0 1px rgba(240, 166, 55, 0.5), 0 8px 24px -10px rgba(240, 166, 55, 0.4);
|
|
566
|
+
}
|
|
567
|
+
.cg-hud-streak svg { width: 17px; height: 17px; }
|
|
568
|
+
.cg-hud-flame { animation: cg-hud-flame 2.4s ease-in-out infinite; transform-origin: center bottom; }
|
|
569
|
+
@keyframes cg-hud-flame {
|
|
570
|
+
0%, 100% { transform: scaleY(1) translateY(0); opacity: 1; }
|
|
571
|
+
50% { transform: scaleY(1.08) translateY(-0.5px); opacity: 0.85; }
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
@media (max-width: 720px) {
|
|
575
|
+
.cg-hud-panel { padding: 22px 18px 20px; }
|
|
576
|
+
.cg-hud-title { font-size: 20px; }
|
|
577
|
+
.cg-hud-week { gap: 8px; }
|
|
578
|
+
.cg-hud-foot { gap: 16px; }
|
|
579
|
+
}
|
|
580
|
+
@media (prefers-reduced-motion: reduce) {
|
|
581
|
+
.cg-hud-panel,
|
|
582
|
+
.cg-hud-bg::before,
|
|
583
|
+
.cg-hud-ascii span,
|
|
584
|
+
.cg-hud-flame { animation: none; }
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
@media (prefers-color-scheme: dark) {
|
|
588
|
+
.contribution-graph {
|
|
589
|
+
color: #e6edf3;
|
|
590
|
+
}
|
|
591
|
+
.contribution-graph svg rect:hover {
|
|
592
|
+
stroke: rgba(255, 255, 255, 0.2);
|
|
593
|
+
}
|
|
594
|
+
.cg-cell {
|
|
595
|
+
/* nothing */
|
|
596
|
+
}
|
|
597
|
+
.cg-grid .cg-cell:hover {
|
|
598
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
|
|
599
|
+
}
|
|
600
|
+
.cg-tooltip {
|
|
601
|
+
background: rgba(33, 38, 45, 0.85);
|
|
602
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
603
|
+
color: #f4f4f5;
|
|
604
|
+
box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.3), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
|
|
605
|
+
}
|
|
606
|
+
.cg-month-label,
|
|
607
|
+
.cg-weekday-label {
|
|
608
|
+
color: #8b949e;
|
|
609
|
+
}
|
|
610
|
+
}
|
package/style.css.d.ts
ADDED