diff --git a/_sass/components/_wins-page.scss b/_sass/components/_wins-page.scss index 84f09280b7..252f819784 100644 --- a/_sass/components/_wins-page.scss +++ b/_sass/components/_wins-page.scss @@ -1,269 +1,311 @@ //Hero styling .wins-hero{ - margin-top: 40px; - display: flex; - flex-direction: row; - align-items: center; - justify-content: space-evenly; - img{ - height: 366; - } - h1{ - font-size: 59px; - line-height: 69px; - text-align: center; - font-style: normal; - font-weight: normal; - } + margin-top: 40px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-evenly; + img{ + height: 366; + } + h1{ + font-size: 59px; + line-height: 69px; + text-align: center; + font-style: normal; + font-weight: normal; + } } -.wins__see-more-div { - position: absolute; - background-color: white; - right: 0px; - bottom: 0px; - color: red; - padding: 0px 3px; - cursor: pointer; +.wins-btn{ + max-width: 300px; + max-height: 75px; } -.wins__card-text { - padding-top: 40px; - p { - margin: 0; - } + +.wins-see-more-div { + position: absolute; + background-color: white; + right: 0px; + bottom: 0px; + color: red; + padding: 0px 3px; + cursor: pointer; +} + +.wins-card-text { + margin-top: 40px; + height: 88px; + overflow: hidden; + position: relative; + p { + margin: 0; + } } @media #{$bp-below-tablet} { - .wins-hero{ + .wins-hero{ - img{ - height: 230px; - } - h1{ - font-style: normal; - font-weight: normal; - font-size: 38px; - } - .btn--wins{ - height: 60px; - padding: 0 50px; - border-radius: 60px; - font-size: 1.25rem; - } - - } + img{ + height: 230px; + } + h1{ + font-style: normal; + font-weight: normal; + font-size: 38px; + } + .wins-btn{ + max-width: 217px; + max-height: 60.5px; + font-size: 18.5px; + } + + } } @media #{$bp-below-mobile} { - .wins-hero{ + .wins-hero{ - img{ - height: 105px; - } - h1{ - font-style: normal; - font-weight: normal; - font-size: 24px; - line-height: 28px; - } - .btn--wins{ - height: 40px; - padding: 0 32px; - border-radius: 20px; - font-size: 1rem; - } - } + img{ + height: 105px; + } + h1{ + font-style: normal; + font-weight: normal; + font-size: 24px; + line-height: 28px; + } + .wins-btn{ + max-width: 134px; + max-height: 46px; + font-size: 12px; + line-height: 14px; + } + } } // page .wins-page-contain{ - margin:0 auto; - max-width: 1292px; + margin:0 auto; + max-width: 1292px; } .wins-page-contain > p{ - margin: 18px 60px; + margin: 18px 60px; } //card styling .wins-card{ - padding: 45px; - display: flex; - flex-direction: row; + padding: 45px; + display: flex; + flex-direction: column; +} +.wins-card-top{ + display: flex; } -.wins-card-left{ - width: 100px; - margin-right: 10px; - display: flex; - align-items: flex-end; - flex-direction: column; +.wins-card-top-right{ + flex-grow: 1; } .wins-card-profile-img{ - border-radius: 100px; + width: 86px; + height: 86px; + border-radius: 100px; + margin-right: 20px; } .wins-card-big-quote{ - width: 28px; - height: 96.05px; - position: relative; - top: -20px; + width: 28px; + height: 112px; + margin-right: 20px; + margin-left: 58px; + position: relative; +} +.wins-card-bottom{ + display: flex; } .wins-card-content{ - display: flex; - flex-direction: column; - margin-left: 20px; - width: 100%; - position: relative; - height: 225px; - overflow: hidden; - margin-left: 6px; + display: flex; + flex-direction: column; + margin-left: 20px; + width: 100%; + position: relative; + overflow: hidden; + margin-left: 6px; } .wins-card-name{ - font-weight: bold; - font-size: 20px; - line-height: 22px; - margin-top: 13px; + font-weight: bold; + font-size: 20px; + line-height: 22px; + margin-top: 13px; } .wins-card-team{ - font-weight: normal; - font-size: 16px; - line-height: 18px; - display: flex; - align-items: center; + font-weight: normal; + font-size: 16px; + line-height: 18px; + display: flex; + align-items: center; } -.wins-card-top{ - display: flex; - justify-content: space-between; +.wins-card-title{ + display: flex; + justify-content: space-between; } .wins-card-icon{ - margin-left: 18px; + margin-left: 18px; } .wins-card-info{ - font-weight: bold; + font-weight: bold; } .wins-card-overview{ - margin-top: 1em; + margin-top: 1em; } @media #{$bp-below-tablet} { - .wins-card-content{ - height: 233px; - } + .wins-card-text{ + height: 81px; + } } @media #{$bp-below-mobile} { - .wins-card-content{ - height: 215px; - } - .wins-card{ - padding: 24px; - } - .wins-card-left{ - width: 50px; - } - .wins-card-profile-img{ - width: 50px; - height: 50px; - border-radius: 100px; - } - .wins-card-big-quote{ - margin: 4px; - height: 60px; - width: 18px; - position: static; - } + .wins-card-text{ + height: 80px; + } + .wins-card{ + padding: 24px; + } + .wins-card-left{ + width: 50px; + } + .wins-card-profile-img{ + width: 50px; + height: 50px; + border-radius: 100px; + margin-right: 6px; + } + .wins-card-big-quote{ + margin: 0 6px 0 32px; + height: 54px; + width: 18px; + position: static; + } - .wins-card-name{ - font-size: 19px; - line-height: 22px; - margin: 0; - padding-top: 5px; - } - .wins-card-team{ - font-size: 12px; - line-height: 16px; - } - .wins-card-icon{ - margin-left: 13.5px; - } - .github-icon{ - height: 20px; - width: 20px; - } - .linkedin-icon{ - height: 20px; - width: 20px; - } - .wins__card-text{ - padding-top: 16px; - } + .wins-card-name{ + font-size: 19px; + line-height: 22px; + margin: 0; + padding-top: 5px; + } + .wins-card-team{ + font-size: 12px; + line-height: 16px; + } + .wins-card-icon{ + margin-left: 13.5px; + } + .github-icon{ + height: 20px; + width: 20px; + } + .linkedin-icon{ + height: 20px; + width: 20px; + } + .wins-card-text{ + margin-top: 16px; + } - .wins-card-overview{ - margin-top: 0; - font-size: 16px; - } + .wins-card-overview{ + margin-top: 0; + font-size: 16px; + } } //modal overlay @media #{$bp-desktop-up} { - .wins-card-overview{ - overflow: hidden; - text-overflow: ellipsis; - } + .wins-card-overview{ + overflow: hidden; + text-overflow: ellipsis; + } - .overlay { - display: none; - z-index: 1; - position: fixed; - left: 0px; - top: 0px; - width: 100%; - height: 100%; - background-color: rgba(70, 70, 70, 0.5); - padding: 10px; - } + .overlay { + display: none; + z-index: 1; + position: fixed; + left: 0px; + top: 0px; + width: calc(100vw + 17px); + height: 100%; + background-color: rgba(70, 70, 70, 0.5); + padding: 10px; + overflow-y: auto; + overflow-x: hidden; + } - .display-none { - display: none; - } + .display-none { + display: none; + } - .display-initial { - display: initial; + .display-initial { + display: flex; + flex-direction: column; + } + .top-buffer{ + height: 20vh; + } + .bottom-buffer { + height: 5vh; + } + .modal-container{ + position: absolute; + width: 60%; + left: 20%; + } + .center-screen { + opacity: 1; } - - .center-screen { - position: fixed; - opacity: 1; - width: 60%; - left: 20%; - top: 30%; - .wins-card-content{ - height: auto; + .overlay-card-text{ + padding-top: 40px; + } + .wins-card-badges{ + display:flex; + flex-flow: row wrap; + width: 100%; + .badge-item{ + flex: 1 1; + flex-basis: 250px; + // width: 100px; + margin: 4px; + display: flex; + .badge-icon{ + margin: 2px 12.5px 0 0; + height: 15px; + min-width: 30px; + display: flex; + justify-content: center; + } } } } //mobile see more @media #{$bp-below-desktop} { - .overlay { - display: none; - } - .display-none { - display: none; - } - .expanded{ - height: auto; - .wins__see-more-div { - position: relative; - text-align: right; - } - } + .overlay { + display: none; + } + .display-none { + display: none; + } + .expanded{ + height: auto; + .wins-see-more-div { + position: relative; + text-align: right; + } + } } .wins-card-content > * { - flex: 0 0 auto; + flex: 0 0 auto; } \ No newline at end of file diff --git a/assets/images/wins-page/badges/badge-code.svg b/assets/images/wins-page/badges/badge-code.svg new file mode 100644 index 0000000000..119344ee2e --- /dev/null +++ b/assets/images/wins-page/badges/badge-code.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/wins-page/badges/badge-community.svg b/assets/images/wins-page/badges/badge-community.svg new file mode 100644 index 0000000000..4541fd62e4 --- /dev/null +++ b/assets/images/wins-page/badges/badge-community.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wins-page/badges/badge-enterprise.svg b/assets/images/wins-page/badges/badge-enterprise.svg new file mode 100644 index 0000000000..86576f0e09 --- /dev/null +++ b/assets/images/wins-page/badges/badge-enterprise.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wins-page/badges/badge-file.svg b/assets/images/wins-page/badges/badge-file.svg new file mode 100644 index 0000000000..2632b75a5c --- /dev/null +++ b/assets/images/wins-page/badges/badge-file.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wins-page/badges/badge-github.svg b/assets/images/wins-page/badges/badge-github.svg new file mode 100644 index 0000000000..3721b7d2da --- /dev/null +++ b/assets/images/wins-page/badges/badge-github.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/wins-page/badges/badge-giving.svg b/assets/images/wins-page/badges/badge-giving.svg new file mode 100644 index 0000000000..79f723982a --- /dev/null +++ b/assets/images/wins-page/badges/badge-giving.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/wins-page/badges/badge-hammers.svg b/assets/images/wins-page/badges/badge-hammers.svg new file mode 100644 index 0000000000..693747c2da --- /dev/null +++ b/assets/images/wins-page/badges/badge-hammers.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/wins-page/badges/badge-launch.svg b/assets/images/wins-page/badges/badge-launch.svg new file mode 100644 index 0000000000..8ad124ac06 --- /dev/null +++ b/assets/images/wins-page/badges/badge-launch.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wins-page/badges/badge-linkedin.svg b/assets/images/wins-page/badges/badge-linkedin.svg new file mode 100644 index 0000000000..a964c4453c --- /dev/null +++ b/assets/images/wins-page/badges/badge-linkedin.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wins-page/badges/badge-mentor.svg b/assets/images/wins-page/badges/badge-mentor.svg new file mode 100644 index 0000000000..0549c4fe9e --- /dev/null +++ b/assets/images/wins-page/badges/badge-mentor.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/wins-page/badges/badge-new-job.svg b/assets/images/wins-page/badges/badge-new-job.svg new file mode 100644 index 0000000000..3b344eee44 --- /dev/null +++ b/assets/images/wins-page/badges/badge-new-job.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/images/wins-page/badges/badge-software-delivered.svg b/assets/images/wins-page/badges/badge-software-delivered.svg new file mode 100644 index 0000000000..a639f52412 --- /dev/null +++ b/assets/images/wins-page/badges/badge-software-delivered.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/images/wins-page/badges/badge-star.svg b/assets/images/wins-page/badges/badge-star.svg new file mode 100644 index 0000000000..e8fb5d1803 --- /dev/null +++ b/assets/images/wins-page/badges/badge-star.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/images/wins-page/badges/badge-team.svg b/assets/images/wins-page/badges/badge-team.svg new file mode 100644 index 0000000000..982dba7262 --- /dev/null +++ b/assets/images/wins-page/badges/badge-team.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/images/wins-page/badges/badge-twofa.svg b/assets/images/wins-page/badges/badge-twofa.svg new file mode 100644 index 0000000000..1d57ae15de --- /dev/null +++ b/assets/images/wins-page/badges/badge-twofa.svg @@ -0,0 +1,3 @@ + + + diff --git a/wins.html b/wins.html index 775f4458dc..5bd4a760ea 100644 --- a/wins.html +++ b/wins.html @@ -4,23 +4,29 @@ --- {%- include wins-hero.html -%}
-
-
- - -
-
-
- Blank - + @@ -53,6 +59,22 @@ const overview = "Give us a brief overview" const display = "Display?" + const badgeIcons = { + "I got a new job": "badge-new-job.svg", + "I produced something for my portfolio": "badge-file.svg", + "I improved my LinkedIn": "badge-linkedin.svg", + "I learned how to work better on a team": "badge-team.svg", + "I increased the number of commits on my Github profile": "badge-github.svg", + "I learned a new language": "badge-code.svg", + "I setup 2FA": "badge-twofa.svg", + "I worked on an enterprise project": "badge-enterprise.svg", + "I worked on a project that will help the people of Los Angeles": "badge-giving.svg", + "I worked on two or more projects": "badge-hammers.svg", + "I taught or mentored a person on my team": "badge-mentor.svg", + "I taught or mentored a person on another team": "badge-mentor.svg", + "My team delivered software to a stakeholder": "badge-software-delivered.svg", + "My team launched our MVP": "badge-launch.svg" + } function main() { {% assign localData = site.data.wins-data | jsonify %} let localData = {{ localData }}; @@ -90,7 +112,6 @@ if (document.querySelectorAll('.wins-card').length == 0) { const page = document.querySelector('.wins-page-contain'); const p = document.createElement('p'); - //p.classList.add("project-card"); page.appendChild(p); p.innerHTML = "No one has shared a win yet...be the first!"; } @@ -150,57 +171,63 @@ let cardElement = makeElement('li', list, "project-card"); cardElement.classList.add("wins-card"); - let leftDiv = makeElement('div', cardElement, "wins-card-left"); + let topDiv = makeElement('div', cardElement, "wins-card-top"); - let profileImg = makeElement('img', leftDiv, "wins-card-profile-img"); + let profileImg = makeElement('img', topDiv, "wins-card-profile-img"); profileImg.setAttribute("src", profileImgSrc); + let topRightDiv = makeElement('div', topDiv, "wins-card-top-right"); + + let bottomDiv = makeElement('div', cardElement, "wins-card-bottom"); + // bottomDiv.classList.add("project-card-inner"); - let quote = makeElement('img', leftDiv, "wins-card-big-quote"); + let quote = makeElement('img', bottomDiv, "wins-card-big-quote"); quote.setAttribute("src", "/assets/images/wins-page/quote-icon.svg"); - let rightDiv = makeElement('div', cardElement, "wins-card-content"); - rightDiv.classList.add("project-card-inner"); - + + // let bottomRightDiv = makeElement('div', bottomDiv, "wins-card-content"); + + //makes the top of thecard name and icons - let topDiv = makeElement('div', rightDiv, "project-inner"); - topDiv.classList.add("wins-card-top"); - let nameElement = makeElement('span', topDiv, "wins-card-name"); - nameElement.innerHTML = card[name]; - let icons = makeElement('span', topDiv, "wins-card-icons"); - if (card[linkedin_url].length > 0) { - makeIcon(card[linkedin_url], icons, 'linkedin-icon', '/assets/images/wins-page/icon-linkedin-small.svg'); - } if (card[github_url].length > 0) { - makeIcon(card[github_url], icons, 'github-icon', '/assets/images/wins-page/icon-github-small.svg'); - } - + let titleDiv = makeElement('div', topRightDiv, "project-inner"); + titleDiv.classList.add("wins-card-title"); + let nameElement = makeElement('span', titleDiv, "wins-card-name"); + nameElement.innerHTML = card[name]; + let icons = makeElement('span', titleDiv, "wins-card-icons"); + if (card[linkedin_url].length > 0) { + makeIcon(card[linkedin_url], icons, 'linkedin-icon', '/assets/images/wins-page/icon-linkedin-small.svg'); + } if (card[github_url].length > 0) { + makeIcon(card[github_url], icons, 'github-icon', '/assets/images/wins-page/icon-github-small.svg'); + } + //makes the team and roles portion in the middle - let nameDiv = makeElement('div', rightDiv, "project-inner"); - nameDiv.classList.add("wins-card-team"); - nameDiv.innerHTML = `Team(s): ${card[team]}`; - if (card[role].length > 0) { - let roleDiv = makeElement('div', rightDiv, "project-inner"); - roleDiv.classList.add("wins-card-team"); - roleDiv.innerHTML = `Role(s): ${card[role]}`; - } + let nameDiv = makeElement('div', topRightDiv, "project-inner"); + nameDiv.classList.add("wins-card-team"); + nameDiv.innerHTML = `Team(s): ${card[team]}`; + if (card[role].length > 0) { + let roleDiv = makeElement('div', topRightDiv, "project-inner"); + roleDiv.classList.add("wins-card-team"); + roleDiv.innerHTML = `Role(s): ${card[role]}`; + } //makes the win and info text on the bottom of the card - let winDiv = makeElement('div', rightDiv, "project-inner"); - winDiv.classList.add("wins__card-text"); - let overviewElement = makeElement('p', winDiv, "wins-card-overview"); - overviewElement.innerHTML = card[overview];//description - let winElement = makeElement('p', winDiv, "wins-card-info"); - winElement.innerHTML = formatMessage(card[win]); //win + let winDiv = makeElement('div', bottomDiv, "project-inner"); + winDiv.classList.add("wins-card-text"); + let overviewElement = makeElement('p', winDiv, "wins-card-overview"); + overviewElement.innerHTML = card[overview];//description + let winElement = makeElement('p', winDiv, "wins-card-info"); + winElement.innerHTML = formatMessage(card[win]); //win - let innerHeight = Array.from(rightDiv.childNodes).reduce((acc, el) => el.offsetHeight + acc, 0) + let innerHeight = Array.from(winDiv.childNodes).reduce((acc, el) => el.offsetHeight + acc, 0) //makes the see more span on the bottom of the card - if(innerHeight > rightDiv.offsetHeight){ //checks if see more is needed. - let seeMoreDiv = makeElement('div', rightDiv, "project-inner"); - seeMoreDiv.classList.add("wins__see-more-div") - seeMoreDiv.innerHTML = `...see more` + if(innerHeight > winDiv.offsetHeight){ //checks if see more is needed. + let seeMoreDiv = makeElement('div', winDiv, "wins-see-more-div"); + // seeMoreDiv.classList.add("wins-see-more-div") + seeMoreDiv.innerHTML = `...see more` } - idNum++ + idNum++ }) - } + } + function seeMore(id){ screenWidth = window.innerWidth; if (screenWidth > 960){ @@ -221,36 +248,54 @@ } } function updateOverlay(i) { - let stringData = window.localStorage.getItem("data"); - let data = JSON.parse(stringData).reverse(); - - const overlayIcons = document.querySelector('#overlay-icons'); - overlayIcons.innerHTML = ""; - - if (data[i][linkedin_url].length > 0) { - makeIcon(data[i][linkedin_url], overlayIcons, 'linkedin-icon', '/assets/images/wins-page/icon-linkedin-small.svg'); - } if (data[i][github_url].length > 0) { - makeIcon(data[i][github_url], overlayIcons, 'github-icon', '/assets/images/wins-page/icon-github-small.svg'); - } + let stringData = window.localStorage.getItem("data"); + let data = JSON.parse(stringData).reverse(); + + const overlayIcons = document.querySelector('#overlay-icons'); + overlayIcons.innerHTML = ""; + + if (data[i][linkedin_url].length > 0) { + makeIcon(data[i][linkedin_url], overlayIcons, 'linkedin-icon', '/assets/images/wins-page/icon-linkedin-small.svg'); + } if (data[i][github_url].length > 0) { + makeIcon(data[i][github_url], overlayIcons, 'github-icon', '/assets/images/wins-page/icon-github-small.svg'); + } - const overlayName = document.querySelector('#overlay-name'); - overlayName.innerHTML = data[i][name]; + const overlayName = document.querySelector('#overlay-name'); + overlayName.innerHTML = data[i][name]; - const overlayTeams = document.querySelector('#overlay-teams'); - overlayTeams.innerHTML = `Team(s): ${data[i][team]}`; + const overlayTeams = document.querySelector('#overlay-teams'); + overlayTeams.innerHTML = `Team(s): ${data[i][team]}`; - const overlayRoles = document.querySelector('#overlay-roles'); - overlayRoles.innerHTML = `Role(s): ${data[i][role]}`; + const overlayRoles = document.querySelector('#overlay-roles'); + overlayRoles.innerHTML = `Role(s): ${data[i][role]}`; - const overlayOverview = document.querySelector('#overlay-overview'); - overlayOverview.innerHTML = data[i][overview]; + const overlayOverview = document.querySelector('#overlay-overview'); + overlayOverview.innerHTML = data[i][overview]; - const overlayInfo = document.querySelector('#overlay-info'); - overlayInfo.innerHTML = formatMessage(data[i][win]); + // const overlayInfo = document.querySelector('#overlay-badges'); + // overlayInfo.innerHTML = + createBadges(data[i][win]); - const overlayProjectCard = document.querySelector('#overlay-project-card'); - overlayProjectCard.parentNode.classList.add("display-initial"); - } + const overlayProjectCard = document.querySelector('#overlay-project-card'); + overlayProjectCard.parentNode.classList.add("display-initial"); + } + + function createBadges(winStr) { // badges come in as a string with comma seperations + const badges = winStr.split(', '); + const badgeContainer = document.querySelector('#overlay-badges'); + badgeContainer.innerHTML = "" + + badges.forEach(badge => { + const badgeItem = makeElement('div', badgeContainer, 'badge-item') + const badgeIconContainer = makeElement('div', badgeItem, 'badge-icon') + const badgeIcon = makeElement('img', badgeIconContainer, 'badge-icon-svg'); + badgeIcon.setAttribute("src", `/assets/images/wins-page/badges/${badgeIcons[badge] || "badge-star.svg"}`); + const badgeText = makeElement('div', badgeItem, 'badge-item-text') + badgeText.innerHTML = badge; + }) + // let badge = + } + function hideOverlay(e) { e = e || window.event; if (e.target !== e.currentTarget)