From c437713a9f2640a0338f6b12d88bdf54fe3ae417 Mon Sep 17 00:00:00 2001 From: tamara-snyder Date: Mon, 10 Jan 2022 19:22:23 -0500 Subject: [PATCH 1/3] Change open-community-survey.md's program-area from 'Vote / Representation' to 'Citizen Engagement' --- _projects/open-community-survey.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_projects/open-community-survey.md b/_projects/open-community-survey.md index 25f1b0408d..7e825bf9d5 100644 --- a/_projects/open-community-survey.md +++ b/_projects/open-community-survey.md @@ -88,7 +88,7 @@ partner: 'LA Department of Neighborhood Empowerment (DONE), LA Neighborhood Coun tools: 'ArcGIS surveys, Figma, Google Docs, Zoom' visible: true program-area: - - Vote / Representation + - Citizen Engagement status: Active # citizen engagement card data problem: Most Neighborhood Councils do not have access or resources to hire technical experts necessary to create a citywide survey so that they can use the data to create inclusive websites targeted towards the needs of their specific communities. From cb7046cc200d8e2dc172d8264717849571586f99 Mon Sep 17 00:00:00 2001 From: tamara-snyder Date: Fri, 11 Mar 2022 13:25:08 -0500 Subject: [PATCH 2/3] Hide contributors div if number of all time contributors is less than number of people on the current project team --- assets/js/project.js | 49 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/assets/js/project.js b/assets/js/project.js index 5c5728498e..02c82288e5 100644 --- a/assets/js/project.js +++ b/assets/js/project.js @@ -68,27 +68,34 @@ if(project != null){ } } - // Creates DOM elements for contributors - for(let contributor of contributorsArray){ - if (contributorsArray.length >= 1) { - let contributorDiv = document.createElement('div'); - contributorDiv.classList.add('contributor-div'); - - let contributorProfile = document.createElement('a'); - contributorProfile.classList.add('contributor-link'); - contributorProfile.setAttribute('href', contributor.github_url); - contributorProfile.setAttribute('target', '_blank'); - let contributorUrl = contributor.github_url.split('/'); - let contributorName = contributorUrl.pop(); - contributorProfile.setAttribute('title', contributorName); - - let contributorImg = document.createElement('img'); - contributorImg.style['border-radius'] = '12px'; - contributorImg.setAttribute('src', contributor.avatar_url); - - contributorProfile.appendChild(contributorImg); - contributorDiv.appendChild(contributorProfile); - contributors.appendChild(contributorDiv); + let projectTeam = document.querySelectorAll('.leader-card') + + if (contributorsArray.length < projectTeam.length) { + let contributorSection = document.getElementById('contributor-header'); + contributorSection.style.display = 'none'; + } else { + // Creates DOM elements for contributors + for(let contributor of contributorsArray){ + if (contributorsArray.length >= 1) { + let contributorDiv = document.createElement('div'); + contributorDiv.classList.add('contributor-div'); + + let contributorProfile = document.createElement('a'); + contributorProfile.classList.add('contributor-link'); + contributorProfile.setAttribute('href', contributor.github_url); + contributorProfile.setAttribute('target', '_blank'); + let contributorUrl = contributor.github_url.split('/'); + let contributorName = contributorUrl.pop(); + contributorProfile.setAttribute('title', contributorName); + + let contributorImg = document.createElement('img'); + contributorImg.style['border-radius'] = '12px'; + contributorImg.setAttribute('src', contributor.avatar_url); + + contributorProfile.appendChild(contributorImg); + contributorDiv.appendChild(contributorProfile); + contributors.appendChild(contributorDiv); + } } } } else { From ab314af50e3572b01bdb07be59ecf5664fa5b47c Mon Sep 17 00:00:00 2001 From: tamara-snyder Date: Fri, 11 Mar 2022 14:42:31 -0500 Subject: [PATCH 3/3] Add explanatory comment --- assets/js/project.js | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/js/project.js b/assets/js/project.js index 02c82288e5..ffd67022f9 100644 --- a/assets/js/project.js +++ b/assets/js/project.js @@ -71,6 +71,7 @@ if(project != null){ let projectTeam = document.querySelectorAll('.leader-card') if (contributorsArray.length < projectTeam.length) { + // Hides all-time contributors if number of contributors is less than size of current project team let contributorSection = document.getElementById('contributor-header'); contributorSection.style.display = 'none'; } else {