@@ -498,14 +498,31 @@ function changeSeeMoreBtn(x) {
498498 const bigQuoteImg = document . querySelector ( '.wins-card-big-quote' ) ;
499499 bigQuoteImg . alt = "Quote from " + data [ i ] [ name ] ;
500500
501- const overlayIcons = document . querySelector ( '#overlay-icons' ) ;
502- overlayIcons . textContent = "" ;
503-
504- if ( data [ i ] [ linkedin_url ] . length > 0 ) {
505- makeIcon ( data [ i ] [ linkedin_url ] , overlayIcons , 'linkedin-icon' , '/assets/images/wins-page/icon-linkedin-small.svg' , 'LinkedIn profile for ' + data [ i ] [ name ] ) ;
506- } if ( data [ i ] [ github_url ] . length > 0 ) {
507- makeIcon ( data [ i ] [ github_url ] , overlayIcons , 'github-icon' , '/assets/images/wins-page/icon-github-small.svg' , 'GitHub profile for ' + data [ i ] [ name ] ) ;
508- }
501+ const overlayIcons = document . querySelector ( '#overlay-icons' ) ;
502+ overlayIcons . querySelector ( '.wins-card-linkedin-icon' ) . textContent = '' ;
503+
504+ if ( data [ i ] [ linkedin_url ] . length > 0 ) {
505+ makeIcon (
506+ data [ i ] [ linkedin_url ] ,
507+ overlayIcons . querySelector ( '.wins-card-linkedin-icon' ) ,
508+ 'linkedin-icon' ,
509+ '/assets/images/wins-page/icon-linkedin-small.svg' ,
510+ 'LinkedIn profile for ' + data [ i ] [ name ]
511+ ) ;
512+ }
513+
514+ const winsCardGithubIcon = overlayIcons . querySelector ( '.wins-card-github-icon' ) ;
515+
516+ if ( data [ i ] [ github_url ] . length > 0 ) {
517+ winsCardGithubIcon . href = data [ i ] [ github_url ] ;
518+ winsCardGithubIcon . removeAttribute ( 'hidden' ) ;
519+ winsCardGithubIcon . querySelector ( 'div.github-icon' ) . setAttribute (
520+ 'aria-label' ,
521+ 'GitHub profile for ' + data [ i ] [ name ]
522+ ) ;
523+ } else {
524+ winsCardGithubIcon . setAttribute ( 'hidden' , 'true' ) ;
525+ }
509526
510527 const overlayName = document . querySelector ( '#overlay-name' ) ;
511528 overlayName . textContent = data [ i ] [ name ] ;
0 commit comments