File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,13 +112,18 @@ function generateParticles(
112112// ── Section helpers for generateSVG ──────────────────────────────────────
113113
114114function renderHeader ( safeUser : string , stats : StreakStats , sf : number ) : string {
115- const fs = ( n : number ) => Math . round ( n * sf * 10 ) / 10 ;
116115 return `
117116 <title>CommitPulse Stats for ${ safeUser } </title>
118117 <desc>
119118 ${ safeUser } has ${ stats . totalContributions } total contributions and a longest streak of ${ stats . longestStreak } days.
120119 </desc>
121- <defs>
120+ ${ renderDefs ( sf ) } ` ;
121+ }
122+
123+ /** Renders the shared SVG <defs> block (glow filter) scaled by the size factor. */
124+ function renderDefs ( sf : number ) : string {
125+ const fs = ( n : number ) : number => Math . round ( n * sf * 10 ) / 10 ;
126+ return `<defs>
122127 <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>
123128 </defs>` ;
124129}
You can’t perform that action at this time.
0 commit comments