Skip to content

Commit 4252202

Browse files
authored
fix: align current_streak and peak_streak with labels in 3D model (JhaSourav07#618)
## Description Fixes JhaSourav07#612 ## Pillar - [ ] 🎨 Pillar 1 β€” New Theme Design - [ ] πŸ“ Pillar 2 β€” Geometric SVG Improvement - [ ] πŸ• Pillar 3 β€” Timezone Logic Optimization - [x] πŸ› οΈ Other (Bug fix, refactoring, docs) ## Visual Preview <img width="966" height="604" alt="image" src="https://github.com/user-attachments/assets/a865ee8f-9745-4c21-8647-0ebf43ebc32a" /> ## 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): ...`). - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started 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). - [ ] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
1 parent df605a6 commit 4252202

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

β€Žlib/svg/generator.tsβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ function renderStatsSection(
128128
const totalLabel = params.mode === 'loc' ? 'TOTAL LINES OF CODE' : labels.ANNUAL_SYNC_TOTAL;
129129

130130
return `
131-
<g transform="translate(${s(40)}, ${s(340)})">
131+
<g transform="translate(${s(100)}, ${s(340)})" text-anchor="middle">
132132
<text class="label">${labels.CURRENT_STREAK}</text>
133133
<text y="${s(40)}" class="stats" filter="url(#glow)">${stats.currentStreak}</text>
134134
</g>
135135
<g transform="translate(${s(300)}, ${s(340)})" text-anchor="middle">
136136
<text class="label">${totalLabel}</text>
137137
<text y="${s(40)}" class="total-val" filter="url(#glow)">${stats.totalContributions}</text>
138138
</g>
139-
<g transform="translate(${s(560)}, ${s(340)})" text-anchor="end">
139+
<g transform="translate(${s(500)}, ${s(340)})" text-anchor="middle">
140140
<text class="label">${labels.PEAK_STREAK}</text>
141141
<text y="${s(40)}" class="stats">${stats.longestStreak}</text>
142142
</g>`;
@@ -782,7 +782,7 @@ export function generateNotFoundSVG(
782782
<text y="40" font-family="Space Grotesk,sans-serif" font-size="24"
783783
fill="${accent}" opacity="0.2">β€”</text>
784784
</g>
785-
<g transform="translate(560, 340)" text-anchor="end">
785+
<g transform="translate(500, 340)" text-anchor="middle">
786786
<text class="label">PEAK_STREAK</text>
787787
<text y="40" class="stats">β€”</text>
788788
</g>

0 commit comments

Comments
Β (0)