From cc1c87f4225f0418d795d768235a290db77b5fa8 Mon Sep 17 00:00:00 2001 From: Myron Chen <125855279+myronchen-git@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:16:32 -0700 Subject: [PATCH] Update Wins overlay to use different SVG --- _includes/wins-page/wins-overlay.html | 9 +++++++- _sass/components/_wins-page.scss | 12 ++++++++-- assets/js/wins.js | 33 ++++++++++++++++++++------- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/_includes/wins-page/wins-overlay.html b/_includes/wins-page/wins-overlay.html index 4f409bd817..b27e63dcff 100644 --- a/_includes/wins-page/wins-overlay.html +++ b/_includes/wins-page/wins-overlay.html @@ -9,7 +9,14 @@
Blank - + + + + + +
Team(s): Blank
Role(s): Blank
diff --git a/_sass/components/_wins-page.scss b/_sass/components/_wins-page.scss index 088e559265..be96e9737d 100644 --- a/_sass/components/_wins-page.scss +++ b/_sass/components/_wins-page.scss @@ -442,8 +442,16 @@ } } } - - + #overlay-icons { + .linkedin-icon, .github-icon { + height: 32px; + width: 32px; + } + .linkedin-icon > svg, .github-icon > svg { + height: 100%; + width: 100%; + } + } } //mobile see more diff --git a/assets/js/wins.js b/assets/js/wins.js index 531b664f4d..31de118eaa 100644 --- a/assets/js/wins.js +++ b/assets/js/wins.js @@ -498,14 +498,31 @@ function changeSeeMoreBtn(x) { const bigQuoteImg = document.querySelector('.wins-card-big-quote'); bigQuoteImg.alt = "Quote from " + data[i][name]; - const overlayIcons = document.querySelector('#overlay-icons'); - overlayIcons.textContent = ""; - - if (data[i][linkedin_url].length > 0) { - makeIcon(data[i][linkedin_url], overlayIcons, 'linkedin-icon', '/assets/images/wins-page/icon-linkedin-small.svg', 'LinkedIn profile for ' + data[i][name]); - } if (data[i][github_url].length > 0) { - makeIcon(data[i][github_url], overlayIcons, 'github-icon', '/assets/images/wins-page/icon-github-small.svg', 'GitHub profile for ' + data[i][name]); - } + const overlayIcons = document.querySelector('#overlay-icons'); + overlayIcons.querySelector('.wins-card-linkedin-icon').textContent = ''; + + if (data[i][linkedin_url].length > 0) { + makeIcon( + data[i][linkedin_url], + overlayIcons.querySelector('.wins-card-linkedin-icon'), + 'linkedin-icon', + '/assets/images/wins-page/icon-linkedin-small.svg', + 'LinkedIn profile for ' + data[i][name] + ); + } + + const winsCardGithubIcon = overlayIcons.querySelector('.wins-card-github-icon'); + + if (data[i][github_url].length > 0) { + winsCardGithubIcon.href = data[i][github_url]; + winsCardGithubIcon.removeAttribute('hidden'); + winsCardGithubIcon.querySelector('div.github-icon').setAttribute( + 'aria-label', + 'GitHub profile for ' + data[i][name] + ); + } else { + winsCardGithubIcon.setAttribute('hidden', 'true'); + } const overlayName = document.querySelector('#overlay-name'); overlayName.textContent = data[i][name];