Commit 758dc7f
authored
feat(svg): add 2D GitHub-style heatmap view (JhaSourav07#1915)
## Description
Introduces a new `view=heatmap` URL parameter that renders a premium,
flat 2D GitHub-style contribution heatmap as an SVG badge.
This provides a cleaner, traditional alternative to the default 3D
isometric monolith while maintaining CommitPulse's high aesthetic
standards.
**Key Features Included:**
- 14-week contribution grid with 5 color intensity levels based on
contribution quartiles.
- Smooth scan-line sweep animation and a pulsing border for "today's"
cell.
- Glow effects on peak contribution days (intensity level 4).
- Full compatibility with existing parameters (themes, `auto` theme,
`size`, `hide_background`, `hide_stats`, `lang`).
- Updated `README.md` documentation and copy examples for the new view.
- Added `'heatmap'` to the Zod validation schema and `BadgeParams.view`
types.
Fixes JhaSourav07#1914
## Pillar
- [x] 🎨 Pillar 1 — New Theme Design
- [x] 📐 Pillar 2 — Geometric SVG Improvement
- [ ] 🕐 Pillar 3 — Timezone Logic Optimization
- [ ] 🛠️ Other (Bug fix, refactoring, docs)
## Visual Preview
<img width="1869" height="919" alt="image"
src="https://github.com/user-attachments/assets/7da63c67-63d9-49ee-a52f-3bd67dee3d94"
/>
## Checklist before requesting a review:
- [x] I have read the `CONTRIBUTING.md` file.
- [x] I have tested these changes locally
(`localhost:3000/api/streak?user=YOUR_USERNAME`).
- [x] I have run `npm run format` and `npm run lint` locally and
resolved all errors (CI will fail otherwise).
- [x] My commits follow the Conventional Commits format (e.g.,
`feat(themes): ...`, `fix(calculate): ...`).
- [x] I have updated `README.md` if I added a new theme or URL
parameter.
- [x] I have starred the repo.
- [x] I have made sure that i have only one commit to merge in this PR.
- [x] The SVG output matches the CommitPulse "premium quality" aesthetic
standard (no raw elements, smooth animations, correct fonts).
- [x] (Recommended) I joined the CommitPulse Discord community for
contributor discussions, mentorship, and faster PR support.5 files changed
Lines changed: 442 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
322 | 330 | | |
323 | 331 | | |
324 | 332 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
197 | 198 | | |
198 | 199 | | |
199 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
200 | 204 | | |
201 | 205 | | |
202 | 206 | | |
| |||
0 commit comments