Stats: match GitHub's contribution-graph look

- GitHub's green scale (#0e4429 -> #39d353) instead of the orange
  accent-mix
- Mon/Wed/Fri row labels down the left (right-aligned, muted),
  month-label row offset to line up with the grid
- legend right-aligned under the grid
This commit is contained in:
jozamudi committed 2026-08-26 19:14:00 +00:00
1 parent 20a90a587e
commit 0afd27d4d2
2 files changed
+16 -7

No files matched your search

+5 -1
View File
@@ -487,6 +487,10 @@ function heatMap(byDay, days) {
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
const grid = el("div", "heat");
const lbl = el("div", "heat-lbl");
const dcol = el("div", "heat-days");
for (const t of ["Mon", "", "Wed", "", "Fri", "", ""]) dcol.append(el("span", null, t));
const row = el("div", "heat-row");
row.append(dcol, grid);
let lastM = -1;
for (let d = new Date(start); d <= today; ) {
const col = el("div", "heat-col");
@@ -523,7 +527,7 @@ function heatMap(byDay, days) {
lg.append(s);
}
lg.append(el("span", "muted", "more"));
return [lbl, grid, lg];
return [lbl, row, lg];
}
function heatSection() {