File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ <h1 class="hero-name">
8787 />
8888 </ div >
8989 < div class ="hero-stat hero-stat-1 ">
90- < strong id ="stat-repos "> 17</ strong > repositories
90+ < strong class ="stat-repos "> 17</ strong > repositories
9191 </ div >
9292 < div class ="hero-stat hero-stat-2 ">
9393 < strong id ="stat-contributions "> 269</ strong > Contributions
@@ -162,7 +162,7 @@ <h4>// spoken languages</h4>
162162
163163 < div class ="about-detail ">
164164 < span class ="about-detail-label "> Repositories</ span >
165- < span class ="about-detail-value "> 17 public</ span >
165+ < span class ="about-detail-value "> < span class =" stat-repos " > 17 </ span > public</ span >
166166 </ div >
167167 < div class ="about-detail ">
168168 < span class ="about-detail-label "> Achievement</ span >
Original file line number Diff line number Diff line change @@ -316,12 +316,16 @@ async function handleFormSubmit() {
316316 const res = await fetch ( 'https://api.github.com/users/NVitschDEV' ) ;
317317 if ( res . ok ) {
318318 const data = await res . json ( ) ;
319- const el = document . getElementById ( 'stat-repos' ) ;
320- if ( el && data . public_repos ) el . textContent = data . public_repos ;
319+ // Use querySelectorAll to find every instance of the class
320+ const repoEls = document . querySelectorAll ( '.stat-repos' ) ;
321+ repoEls . forEach ( el => {
322+ if ( data . public_repos ) {
323+ el . textContent = data . public_repos ;
324+ }
325+ } ) ;
321326 }
322327 } catch ( _ ) { /* silently fail — static fallback shown */ }
323328} ) ( ) ;
324-
325329/* ── Smooth active nav highlight ─────────────────────────────────────── */
326330const sections = document . querySelectorAll ( 'section[id]' ) ;
327331const navAnchors = document . querySelectorAll ( '.nav-links a[href^="#"]' ) ;
You can’t perform that action at this time.
0 commit comments