Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions assets/js/wins.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
const email = "Email Address"
const name = "Full name"
const linkedin_url = "Linkedin URL (optional)"
const linkedin_profile = "LinkedIn Name"
const linkedin_permission = "Could we use your Linkedin profile picture next to your story?"
const github_url = "Github URL (optional)"
const github_handle = "GitHub Handle"
const github_permission = "Could we use your Github profile picture next to your story?"
const team = "Select the team(s) you're on"
const role = "Select your role(s) on the team"
Expand Down Expand Up @@ -42,6 +44,16 @@
{% assign localData = site.data.external._wins-data %}
// Escapes JSON for injections. See: #2134. If this is no longer the case, perform necessary edits, and remove this comment
const cardData = JSON.parse(decodeURIComponent("{{ localData | jsonify | uri_escape }}"));

cardData.forEach(card => {
if (card['Linkedin URL (optional)'].length === 0 && card['LinkedIn Name'].length > 0) {
card['Linkedin URL (optional)'] = `https://www.linkedin.com/in/${card['LinkedIn Name']}`;
}
if (card['Github URL (optional)'].length === 0 && card['GitHub Handle'].length > 0) {
card['Github URL (optional)'] = `https://github.com/${card['GitHub Handle']}`;
}
})

window.localStorage.setItem('data', JSON.stringify(cardData));
makeCards(cardData);
ifPageEmpty();
Expand Down
Loading