diff --git a/_projects/tdm-calculator.md b/_projects/tdm-calculator.md index 462a79db10..4d4d0b0c9b 100644 --- a/_projects/tdm-calculator.md +++ b/_projects/tdm-calculator.md @@ -63,11 +63,12 @@ technologies: - Microsoft SQL Server - Docker - Azure App Service - - Figma location: # - Downtown LA - Remote partner: LA Department of Transportation and Los Angeles City Planning +tools: + - Figma program-area: - Environment visible: true diff --git a/_projects/youthjusticenav.md b/_projects/youthjusticenav.md index 03eeb6a2c1..7fc810f468 100644 --- a/_projects/youthjusticenav.md +++ b/_projects/youthjusticenav.md @@ -58,15 +58,14 @@ looking: skill: UI Designer - category: UI/UX skill: UX Researcher -technologies: - - Figma - - Miro location: - Remote partner: UCLA School of Law, Golden Gate University School of Law tools: + - Figma - Google Docs - Google Sheets + - Miro program-area: - Justice visible: true diff --git a/assets/js/current-projects.js b/assets/js/current-projects.js index 1d98fbd8d8..3e508e51ab 100644 --- a/assets/js/current-projects.js +++ b/assets/js/current-projects.js @@ -25,7 +25,11 @@ document.addEventListener("DOMContentLoaded",function(){ if(filterName === "programs"){ filterTitle = "program areas" } else if(filterName === 'technologies') { - filterTitle = 'languages / technologies' + if (window.location.pathname === '/projects-check/') { + filterTitle = filterName; + } else { + filterTitle = 'languages / technologies' + } filterValue.sort((a,b)=> { a = a.toLowerCase() b = b.toLowerCase() @@ -34,7 +38,7 @@ document.addEventListener("DOMContentLoaded",function(){ return 0; }) } else { - filterTitle = filterName + filterTitle = filterName; } document.querySelector('.filter-list').insertAdjacentHTML( 'beforeend', dropDownFilterComponent( filterName,filterValue,filterTitle) ); if (document.getElementById(filterName).getElementsByTagName("li").length > 8) { @@ -194,14 +198,21 @@ function projectDataSorter(projectdata){ * Returns a filter object -> {filter_type1:[filter_value1,filter_value2], filter_type2:[filter_value1,filter_value2], ... } */ function createFilter(sortedProjectData){ - return { + if (window.location.pathname === '/projects-check/') { + return { + 'technologies': [...new Set(sortedProjectData.map(item => (item.project.technologies?.length > 0) ? [item.project.technologies].flat() : '').flat() ) ].filter(v=>v!='').sort(), + 'languages': [...new Set(sortedProjectData.map(item => (item.project.languages?.length > 0) ? [item.project.languages].flat() : '').flat() ) ].filter(v=>v!='').sort(), + 'tools': [...new Set(sortedProjectData.map(item => (item.project.tools?.length > 0) ? [item.project.tools].flat() : '').flat() ) ].filter(v=>v!='').sort(), + } + } else { + return { // 'looking': [ ... new Set( (sortedProjectData.map(item => item.project.looking ? item.project.looking.map(item => item.category) : '')).flat() ) ].filter(v=>v!='').sort(), // ^ See issue #1997 for more info on why this is commented out 'programs': [...new Set(sortedProjectData.map(item => item.project.programAreas ? item.project.programAreas.map(programArea => programArea) : '').flat() ) ].filter(v=>v!='').sort(), 'technologies': [...new Set(sortedProjectData.map(item => (item.project.technologies && item.project.languages?.length > 0) ? [item.project.languages, item.project.technologies].flat() : '').flat() ) ].filter(v=>v!='').sort(), - 'status': [... new Set(sortedProjectData.map(item => item.project.status))].sort(), - - } + 'status': [... new Set(sortedProjectData.map(item => item.project.status))].sort() + } + } } /** @@ -627,7 +638,9 @@ function projectCardComponent(project){