File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,13 +95,18 @@ function generateParticles(
9595// ── Section helpers for generateSVG ──────────────────────────────────────
9696
9797function renderHeader ( safeUser : string , stats : StreakStats , sf : number ) : string {
98- const fs = ( n : number ) => Math . round ( n * sf * 10 ) / 10 ;
9998 return `
10099 <title>CommitPulse Stats for ${ safeUser } </title>
101100 <desc>
102101 ${ safeUser } has ${ stats . totalContributions } total contributions and a longest streak of ${ stats . longestStreak } days.
103102 </desc>
104- <defs>
103+ ${ renderDefs ( sf ) } ` ;
104+ }
105+
106+ /** Renders the shared SVG <defs> block (glow filter) scaled by the size factor. */
107+ function renderDefs ( sf : number ) : string {
108+ const fs = ( n : number ) : number => Math . round ( n * sf * 10 ) / 10 ;
109+ return `<defs>
105110 <filter id="glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="${ fs ( 5 ) } " result="blur" /><feComposite in="SourceGraphic" in2="blur" operator="over" /></filter>
106111 </defs>` ;
107112}
You can’t perform that action at this time.
0 commit comments