Skip to content

Commit d19e7aa

Browse files
committed
feat: add size presets for graph canvas and update theme display
1 parent 15ff370 commit d19e7aa

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Optional query params:
7373
- `theme` — see [Graph Themes](#graph-themes) below
7474
- `year` — 4-digit year (default: last 365 days)
7575
- `animate` — cell animation mode: `glow` (default) | `wave` | `pulse` | `none`
76+
- `size` — canvas size preset: `default` (1200×600) | `small` (800×400) | `medium` (1000×500) | `large` (1400×700)
7677
- `show_title` — show/hide the username + year heading (`true` default, `false` centers remaining content)
7778
- `show_total_contribution` — show/hide the contributions subtitle (`true` default, `false` also shrinks SVG height to fit content)
7879
- `show_background` — show/hide the background gradient, stars, and grid lines (`true` default, `false` makes bg transparent and shrinks SVG width to fit only the cells with 10px margin)
@@ -141,16 +142,18 @@ Full theme list is in [src/utils/themes.ts](src/utils/themes.ts).
141142

142143
These themes are tuned for the `/graph` heatmap card — vivid `iconColor` cells against near-black backgrounds.
143144

144-
| Theme | Key | Preview |
145-
|---|---|---|
146-
| 🌌 Aurora | `aurora` | ![aurora](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=aurora) |
147-
| 💚 Matrix | `matrix` | ![matrix](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=matrix) |
148-
| 🔥 Inferno | `inferno` | ![inferno](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=inferno) |
149-
| 🌊 Ocean | `ocean` | ![ocean](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=ocean) |
150-
| 💜 Neon | `neon` | ![neon](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=neon) |
151-
| ☀️ Solar | `solar` | ![solar](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=solar) |
152-
| 🌠 Galaxy | `galaxy` | ![galaxy](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=galaxy) |
153-
| 🐙 GitHub Dark | `github-dark` | ![github-dark](https://stats.pphat.top/graph?username=mrdoob&size=small&show_title=false&show_total_contribution=false&theme=github-dark) |
145+
<table>
146+
<tr>
147+
<td align="center"><img alt="aurora" src="https://stats.pphat.top/graph?username=pphatdev&size=small&show_title=false&show_total_contribution=false&theme=aurora" /><br /><strong>🌌 aurora</strong></td>
148+
<td align="center"><img alt="matrix" src="https://stats.pphat.top/graph?username=pphatdev&size=small&show_title=false&show_total_contribution=false&theme=matrix" /><br /><strong>💚 matrix</strong></td>
149+
</tr>
150+
<tr>
151+
<td align="center"><img alt="inferno" src="https://stats.pphat.top/graph?username=pphatdev&size=small&show_title=false&show_total_contribution=false&theme=inferno" /><br /><strong>🔥 inferno</strong></td>
152+
<td align="center"><img alt="ocean" src="https://stats.pphat.top/graph?username=pphatdev&size=small&show_title=false&show_total_contribution=false&theme=ocean" /><br /><strong>🌊 ocean</strong></td>
153+
</tr>
154+
</table>
155+
156+
All available themes: `aurora` · `matrix` · `inferno` · `ocean` · `neon` · `solar` · `galaxy` · `github-dark`
154157

155158
### Animate Modes
156159

@@ -161,6 +164,15 @@ These themes are tuned for the `/graph` heatmap card — vivid `iconColor` cells
161164
| `pulse` | ~16 random cells flash independently |
162165
| `none` | No animation — static render |
163166

167+
### Size Presets
168+
169+
| Value | Canvas | Cell size |
170+
|---|---|---|
171+
| `default` | 1200 × 600 | 14 px |
172+
| `small` | 800 × 400 | 9 px |
173+
| `medium` | 1000 × 500 | 12 px |
174+
| `large` | 1400 × 700 | 16 px |
175+
164176
## Development
165177

166178
### Prerequisites

0 commit comments

Comments
 (0)