diff --git a/.gitignore b/.gitignore index 6d0c559179..b883ab8ded 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ dist .DS_store .vscode _site + +#CNAME diff --git a/CNAME b/CNAME index f1249fe099..dd05f0411a 100644 --- a/CNAME +++ b/CNAME @@ -1 +1 @@ -www.hackforla.org \ No newline at end of file +www.hackforla.org diff --git a/_includes/current-projects.html b/_includes/current-projects.html index 17212656e6..87d0b1078f 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -1,57 +1,92 @@ - -
-
-

Current Projects

- +
-
\ No newline at end of file + + diff --git a/_layouts/default.html b/_layouts/default.html index 0a682ddd94..7074d90ad3 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -14,6 +14,7 @@ + diff --git a/_sass/_main.scss b/_sass/_main.scss index 648c313c0f..a3e8d2c85b 100644 --- a/_sass/_main.scss +++ b/_sass/_main.scss @@ -40,6 +40,7 @@ @import 'components/press'; @import 'components/projects'; @import 'components/social-links'; +@import 'components/all-projects'; // /** // * Layouts diff --git a/_sass/components/_all-projects.scss b/_sass/components/_all-projects.scss new file mode 100644 index 0000000000..5bdd7f91d8 --- /dev/null +++ b/_sass/components/_all-projects.scss @@ -0,0 +1,90 @@ +// All projects + +.all-projects { + background: #32ddb1; + padding: 32px 16px; +} + +.all-projects-container { + // background: $color-teal; + // padding: 32px 16px; +} + +.all-projects__header { + // margin-top: 6rem; + // background: #030d2d; + // padding: 0 5rem; + // font-size: 1.8rem; + h2 { + color: #dd325e; + font-size: 3rem; + margin-bottom: 0.3rem; + } + h4 { + color: #333; + margin-bottom: 0; + } +} + +.all-projects__header-title { + display: flex; + .btn-complimentary { + background-color: #dd325e; + } +} + + +.all-projects-list { + column-count: auto; + column-width: 18rem; + column-gap: 3rem; + padding: 0 0 4rem 0; + .all-projects-card { + margin-bottom: 20px; + break-inside: avoid; + background: $color-white; + border: 0 solid rgba($color-black, 0.06); + border-radius: 16px; + box-shadow: 0 0 8px 0 rgba($color-black, 0.2); + // margin-bottom: 24px; + overflow: hidden; + + // @media #{$bp-tablet-up} { + // margin-bottom: 0; + // } + // padding-bottom: 1px; + } +} +.filter-form { + width: 50%; + margin: 2rem 0px; + .filter-form__header { + margin: 0; + // padding: 2rem 0 0.5rem 0; + color: #333; + } + .filter-form__form { + display: flex; + justify-content: space-between; + } +} + + +.all-projects-inner { + display: flex; + flex-direction: column; + + @media #{$bp-mobile-up} { + flex-direction: row; + flex-wrap: wrap; + } +} + +.all-projects-tmb-img { + display: block; + width: 100%; +} + +.all-projects-body { + padding: 16px; +} diff --git a/_sass/components/_projects.scss b/_sass/components/_projects.scss index 8fc6fb7040..a04817b77d 100644 --- a/_sass/components/_projects.scss +++ b/_sass/components/_projects.scss @@ -1,3 +1,4 @@ + .projects { background: $color-teal; padding: 32px 16px; diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js new file mode 100644 index 0000000000..59912a05ea --- /dev/null +++ b/assets/js/all-projects.js @@ -0,0 +1,35 @@ + + +var projects = document.getElementById("project-list").getElementsByTagName("li"); +var locationSelector = document.getElementById("location-selection"); +var statusSelector = document.getElementById("status-selection"); +/* all-projects-card is the default class name that all of the +project cards start with */ +var searchFilters = { + location: "all-projects-card", + status: "all-projects-card" +}; + +/* Goes through all projects and +shows them if they have a class in the filter or +hides them if they don't have a class in the filter */ +function showHideProjects(){ + Array.from(projects).forEach(function(project){ + projectClassIncludesFilter = Object.values(searchFilters) + .every((filter) => project.className.includes(filter) ); + + if (projectClassIncludesFilter) {project.style.display = "block"} + else {project.style.display = "none"} + }); +}; + +// current implementation replaces select boxes with styled divs, but this code is still here in case you want to use out-of-the-box selectors in the future +locationSelector.addEventListener('change', (event) => { + searchFilters["location"] = event.target.value; + showHideProjects(); +}); + +statusSelector.addEventListener('change', (event) => { + searchFilters["status"] = event.target.value; + showHideProjects(); +}); diff --git a/website b/website new file mode 160000 index 0000000000..bcef537fc1 --- /dev/null +++ b/website @@ -0,0 +1 @@ +Subproject commit bcef537fc1c5e95d199eacc94b9548ef90b1ae22