From 7692c722772e8acd9de4c3428ea7fdfdde3c1b98 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 24 Nov 2019 00:22:46 -0800 Subject: [PATCH 01/23] Added new all-projects file and created some new css styling --- _sass/components/_projects.scss | 36 +++++++++++++++++++++ all-projects.html | 56 +++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 all-projects.html diff --git a/_sass/components/_projects.scss b/_sass/components/_projects.scss index c51a505a08..5bce15752c 100644 --- a/_sass/components/_projects.scss +++ b/_sass/components/_projects.scss @@ -1,3 +1,39 @@ +// All projects + +.project-page-contain { + margin: 5rem; +} + +.subpage-header { + height: 35vh; + display: flex; + justify-content: flex-end; + flex-direction: column; + h2 { + font-size: 3rem; + margin-bottom: 0.3rem; + } + h4 { + // font-size: 3rem; + margin-bottom: 2rem; + } +} + +.all-project-list { + column-count: auto; + column-width: 18rem; + column-gap: 3rem; + .project-card { + margin-bottom: 20px; + break-inside: avoid; + // padding-bottom: 1px; + } +} + + +// End all projects + + .projects { background: $color-teal; padding: 32px 16px; diff --git a/all-projects.html b/all-projects.html new file mode 100644 index 0000000000..e834694801 --- /dev/null +++ b/all-projects.html @@ -0,0 +1,56 @@ +--- +--- +
+
+
+

Current Projects

+

Here's what we're working on. Join us at one of our meetups and contribute!

+
+
    + {%- for item in site.projects -%} + {%- if item.hide != true -%} +
  • +
    +
    + {{item.alt}}/ +
    +
    +

    {{ item.title }}

    +

    {{ item.description }}

    + {%- if item.links -%} + + {%- endif -%} + {%- if item.partner -%} +
    + Partner: + {{ item.partner }} +
    + {%- endif -%} + {%- if item.looking -%} +
    + Looking for: + {{ item.looking }} +
    + {%- endif -%} + + {%- if item.location -%} +
    + Location: + {{ item.location }} +
    + {%- endif -%} +
    +
    +
  • + {%- endif -%} + {%- endfor -%} +
+ +
+
From 936902315f30a65705be2ad7d1f9819ac663ae1f Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 24 Nov 2019 20:10:11 -0800 Subject: [PATCH 02/23] adjusting css for all projects --- _sass/components/_projects.scss | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/_sass/components/_projects.scss b/_sass/components/_projects.scss index 5bce15752c..a8f2e9b2fe 100644 --- a/_sass/components/_projects.scss +++ b/_sass/components/_projects.scss @@ -5,17 +5,19 @@ } .subpage-header { - height: 35vh; - display: flex; - justify-content: flex-end; - flex-direction: column; + // height: 35vh; + // display: flex; + // justify-content: flex-end; + // flex-direction: column; + width: -webkit-fill-available; + margin-top: 10rem; h2 { font-size: 3rem; margin-bottom: 0.3rem; } h4 { // font-size: 3rem; - margin-bottom: 2rem; + margin-bottom: 0; } } @@ -29,7 +31,9 @@ // padding-bottom: 1px; } } - +.filter-form { + margin: 2rem 0px;; +} // End all projects From 2618e1ab88dd5a10e06c3941a20f3a976535dcb6 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 24 Nov 2019 21:23:33 -0800 Subject: [PATCH 03/23] Added filter functionality for locations --- _layouts/default.html | 1 + all-projects.html | 14 ++++++++++++-- assets/js/all-projects.js | 18 ++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 assets/js/all-projects.js 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/all-projects.html b/all-projects.html index e834694801..2fcd4f75f7 100644 --- a/all-projects.html +++ b/all-projects.html @@ -6,10 +6,20 @@

Current Projects

Here's what we're working on. Join us at one of our meetups and contribute!

-
    +
    +
    + +
    +
    +
      {%- for item in site.projects -%} {%- if item.hide != true -%} -
    • +
    • {{item.alt}}/ diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js new file mode 100644 index 0000000000..bc19b2057c --- /dev/null +++ b/assets/js/all-projects.js @@ -0,0 +1,18 @@ + + +var lis = document.getElementById("project-list").getElementsByTagName("li"); +var locationSelector = document.getElementById("location-selection"); + +locationSelector.addEventListener('change', (event) => { + var location = event.target.value; + console.log(location) + Array.from(lis).forEach(function(li){ + if (location == "LOCATION"){ + li.style.display = 'block'; + } else if (li.className.includes(location)) { + li.style.display = 'block'; + } else { + li.style.display = 'none'; + } + }); +}); From e6a0649782936d7d6739e8797b40106240ee4758 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 24 Nov 2019 21:36:00 -0800 Subject: [PATCH 04/23] made status selector work individually --- all-projects.html | 15 ++++++++++++++- assets/js/all-projects.js | 17 ++++++++++++++++- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/all-projects.html b/all-projects.html index 2fcd4f75f7..1f6d612035 100644 --- a/all-projects.html +++ b/all-projects.html @@ -15,11 +15,24 @@

      Here's what we're working on. Join us at one of our meetups and contribute!< +

      +
      +
      + +
        {%- for item in site.projects -%} {%- if item.hide != true -%} -
      • +
      • {{item.alt}}/ diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js index bc19b2057c..926306feac 100644 --- a/assets/js/all-projects.js +++ b/assets/js/all-projects.js @@ -2,10 +2,10 @@ var lis = document.getElementById("project-list").getElementsByTagName("li"); var locationSelector = document.getElementById("location-selection"); +var statusSelector = document.getElementById("status-selection"); locationSelector.addEventListener('change', (event) => { var location = event.target.value; - console.log(location) Array.from(lis).forEach(function(li){ if (location == "LOCATION"){ li.style.display = 'block'; @@ -16,3 +16,18 @@ locationSelector.addEventListener('change', (event) => { } }); }); + + +statusSelector.addEventListener('change', (event) => { + var status = event.target.value; + console.log(status) + Array.from(lis).forEach(function(li){ + if (status == "STATUS"){ + li.style.display = 'block'; + } else if (li.className.includes(status)) { + li.style.display = 'block'; + } else { + li.style.display = 'none'; + } + }); +}); From 355b35d12d76bc30b3a12dabf89bc7a12d0b042d Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 24 Nov 2019 23:22:06 -0800 Subject: [PATCH 05/23] Changed it so projects must match every filtered criterea rather than just some. --- all-projects.html | 4 ++-- assets/js/all-projects.js | 45 +++++++++++++++++++-------------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/all-projects.html b/all-projects.html index 1f6d612035..feece730d1 100644 --- a/all-projects.html +++ b/all-projects.html @@ -9,7 +9,7 @@

        Here's what we're working on. Join us at one of our meetups and contribute!<
        - + diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js index 926306feac..b580afecf9 100644 --- a/assets/js/all-projects.js +++ b/assets/js/all-projects.js @@ -1,33 +1,32 @@ -var lis = document.getElementById("project-list").getElementsByTagName("li"); +var projects = document.getElementById("project-list").getElementsByTagName("li"); var locationSelector = document.getElementById("location-selection"); var statusSelector = document.getElementById("status-selection"); +var searchFilters = { + location: "project-card", + status: "project-card" +}; -locationSelector.addEventListener('change', (event) => { - var location = event.target.value; - Array.from(lis).forEach(function(li){ - if (location == "LOCATION"){ - li.style.display = 'block'; - } else if (li.className.includes(location)) { - li.style.display = 'block'; - } else { - li.style.display = 'none'; - } +// 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"} }); -}); +}; +locationSelector.addEventListener('change', (event) => { + searchFilters["location"] = event.target.value; + showHideProjects(); +}); statusSelector.addEventListener('change', (event) => { - var status = event.target.value; - console.log(status) - Array.from(lis).forEach(function(li){ - if (status == "STATUS"){ - li.style.display = 'block'; - } else if (li.className.includes(status)) { - li.style.display = 'block'; - } else { - li.style.display = 'none'; - } - }); + searchFilters["status"] = event.target.value; + showHideProjects(); }); From d671a4f885e298a3026b74ad4447bf24e3fafe56 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Mon, 25 Nov 2019 19:53:39 -0800 Subject: [PATCH 06/23] Organizing styling --- _sass/_main.scss | 1 + _sass/components/_all-projects.scss | 46 +++++++++++++++++++++ _sass/components/_projects.scss | 39 ------------------ all-projects.html | 63 ++++++++++------------------- 4 files changed, 68 insertions(+), 81 deletions(-) create mode 100644 _sass/components/_all-projects.scss 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..4f0431d33d --- /dev/null +++ b/_sass/components/_all-projects.scss @@ -0,0 +1,46 @@ +// All projects + +.project-page-contain { + margin: 5rem; +} + +.subpage-header { + margin-top: 6rem; + h2 { + font-size: 3rem; + margin-bottom: 0.3rem; + } + h4 { + // font-size: 3rem; + margin-bottom: 0; + } +} + +.all-project-list { + column-count: auto; + column-width: 18rem; + column-gap: 3rem; + .project-card { + margin-bottom: 20px; + break-inside: avoid; + // padding-bottom: 1px; + } +} +.filters { + width: 50%; + margin: 2rem 0px; + h2 { + margin: 1rem 0; + } + .filter-forms { + display: flex; + justify-content: space-around; + // .filter-form { + // margin: 0.5rem, 0px; + // } + } +} + + + +// End all projectsd diff --git a/_sass/components/_projects.scss b/_sass/components/_projects.scss index a8f2e9b2fe..47684d3605 100644 --- a/_sass/components/_projects.scss +++ b/_sass/components/_projects.scss @@ -1,42 +1,3 @@ -// All projects - -.project-page-contain { - margin: 5rem; -} - -.subpage-header { - // height: 35vh; - // display: flex; - // justify-content: flex-end; - // flex-direction: column; - width: -webkit-fill-available; - margin-top: 10rem; - h2 { - font-size: 3rem; - margin-bottom: 0.3rem; - } - h4 { - // font-size: 3rem; - margin-bottom: 0; - } -} - -.all-project-list { - column-count: auto; - column-width: 18rem; - column-gap: 3rem; - .project-card { - margin-bottom: 20px; - break-inside: avoid; - // padding-bottom: 1px; - } -} -.filter-form { - margin: 2rem 0px;; -} - -// End all projects - .projects { background: $color-teal; diff --git a/all-projects.html b/all-projects.html index feece730d1..37cb5334e0 100644 --- a/all-projects.html +++ b/all-projects.html @@ -1,30 +1,31 @@ --- ---
        -
        +

        Current Projects

        Here's what we're working on. Join us at one of our meetups and contribute!

        -
        - - - -
        -
        -
        - -
        +
        +

        Sort By:

        +
        +
        + +
        +
        + +
        +
          {%- for item in site.projects -%} @@ -40,28 +41,6 @@

          Here's what we're working on. Join us at one of our meetups and contribute!<

          {{ item.title }}

          {{ item.description }}

          - {%- if item.links -%} - - {%- endif -%} - {%- if item.partner -%} -
          - Partner: - {{ item.partner }} -
          - {%- endif -%} - {%- if item.looking -%} -
          - Looking for: - {{ item.looking }} -
          - {%- endif -%} - {%- if item.location -%}
          Location: From 5e8829bb535e7ccb9d72aaf96f700275d12552e2 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Mon, 2 Dec 2019 15:31:37 -0800 Subject: [PATCH 07/23] Organized classes and HTML and adjusted some styling for the header --- _sass/components/_all-projects.scss | 63 +++++++++++++---- all-projects.html | 102 +++++++++++++--------------- assets/js/all-projects.js | 12 ++-- 3 files changed, 105 insertions(+), 72 deletions(-) diff --git a/_sass/components/_all-projects.scss b/_sass/components/_all-projects.scss index 4f0431d33d..7c25a2bb35 100644 --- a/_sass/components/_all-projects.scss +++ b/_sass/components/_all-projects.scss @@ -1,11 +1,20 @@ // All projects -.project-page-contain { - margin: 5rem; +.all-projects { + background: #030d2d; + padding: 32px 0 0 0; } -.subpage-header { +.all-projects-container { + background: $color-teal; + padding: 0 5rem; +} + +.all-projects__header { margin-top: 6rem; + background: #030d2d; + padding: 0 5rem; + font-size: 1.8rem; h2 { font-size: 3rem; margin-bottom: 0.3rem; @@ -16,31 +25,57 @@ } } -.all-project-list { +.all-projects-list { column-count: auto; column-width: 18rem; column-gap: 3rem; - .project-card { + 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; } } -.filters { +.filter-form { width: 50%; margin: 2rem 0px; - h2 { - margin: 1rem 0; + .filter-form__header { + margin: 0; + padding: 2rem 0 0.5rem 0; + color: #333; } - .filter-forms { + .filter-form__form { display: flex; - justify-content: space-around; - // .filter-form { - // margin: 0.5rem, 0px; - // } + justify-content: space-between; } } +.all-projects-inner { + display: flex; + flex-direction: column; + + @media #{$bp-mobile-up} { + flex-direction: row; + flex-wrap: wrap; + } +} -// End all projectsd +.all-projects-tmb-img { + display: block; + width: 100%; +} + +.all-projects-body { + padding: 16px; +} diff --git a/all-projects.html b/all-projects.html index 37cb5334e0..ad965065bf 100644 --- a/all-projects.html +++ b/all-projects.html @@ -1,58 +1,54 @@ --- --- -
          -
          -
          -

          Current Projects

          -

          Here's what we're working on. Join us at one of our meetups and contribute!

          -
          -
          -

          Sort By:

          -
          -
          - -
          -
          - -
          -
          +
          +
          +

          Current Projects

          +

          Here's what we're working on. Join us at one of our meetups and contribute!

          +
          +
          +
          +

          Sort By:

          +
          + + +
          -
            - {%- for item in site.projects -%} - {%- if item.hide != true -%} -
          • -
            -
            - {{item.alt}}/ -
            -
            -

            {{ item.title }}

            -

            {{ item.description }}

            - {%- if item.location -%} -
            - Location: - {{ item.location }} -
            - {%- endif -%} -
            -
            -
          • +
              + {%- for item in site.projects -%} + {%- if item.hide != true -%} +
            • +
              +
              + {{item.alt}}/ +
              +
              +

              {{ item.title }}

              +

              {{ item.description }}

              + {%- if item.location -%} +
              + Location: + {{ item.location }} +
              {%- endif -%} - {%- endfor -%} -
            - +
          +
          + + {%- endif -%} + {%- endfor -%} +

        -
        + +
        diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js index b580afecf9..0b52a3c6f4 100644 --- a/assets/js/all-projects.js +++ b/assets/js/all-projects.js @@ -3,14 +3,16 @@ 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: "project-card", - status: "project-card" + 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 +/* 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) From 2087f500387e34cf30ab3e5c7d955df8f85ca020 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 14:28:53 -0800 Subject: [PATCH 08/23] deleted all projects and moved that code to the main page --- _includes/current-projects.html | 114 +++++++++++++++------------- _sass/components/_all-projects.scss | 92 +++++++++++++++++++--- all-projects.html | 54 ------------- assets/js/all-projects.js | 84 ++++++++++++++++++++ 4 files changed, 229 insertions(+), 115 deletions(-) delete mode 100644 all-projects.html diff --git a/_includes/current-projects.html b/_includes/current-projects.html index 24c663af89..0e08071627 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -1,53 +1,65 @@ -
        -
        -

        Current Projects

        -
          +
          +
          +
          +
          +

          Current Projects

          +

          Have an idea? + Submit your pitch +

          +
          +

          Here's what we're working on. Join us at one of our meetups and contribute!

          +
          +
          +
          +

          Sort By:

          +
          +
          + +
          +
          + +
          +
          +
          +
            {%- for item in site.projects -%} - {%- if item.hide != true -%} -
          • -
            -
            - {{item.alt}}/ -
            -
            -

            {{ item.title }}

            -

            {{ item.description }}

            - {%- if item.links -%} - - {%- endif -%} - {%- if item.partner -%} -
            - Partner: - {{ item.partner }} -
            - {%- endif -%} - {%- if item.looking -%} -
            - Looking for: - {{ item.looking }} -
            - {%- endif -%} - - {%- if item.location -%} -
            - Location: - {{ item.location }} -
            - {%- endif -%} -
            -
            -
          • - {%- endif -%} - {%- endfor -%} -
          -

          Have an idea? - Submit your pitch -

          + {%- if item.hide != true -%} +
        • +
          +
          + {{item.alt}}/ +
          +
          +

          {{ item.title }}

          +

          {{ item.description }}

          + {%- if item.location -%} +
          + Location: + {{ item.location }} +
          + {%- endif -%} +
          +
          +
        • + {%- endif -%} + {%- endfor -%} +
        -
        \ No newline at end of file +

        + + diff --git a/_sass/components/_all-projects.scss b/_sass/components/_all-projects.scss index 7c25a2bb35..f279c35e02 100644 --- a/_sass/components/_all-projects.scss +++ b/_sass/components/_all-projects.scss @@ -1,30 +1,39 @@ // All projects .all-projects { - background: #030d2d; - padding: 32px 0 0 0; + background: #32ddb1; + padding: 32px 16px; } .all-projects-container { - background: $color-teal; - padding: 0 5rem; + // background: $color-teal; + // padding: 32px 16px; } .all-projects__header { - margin-top: 6rem; - background: #030d2d; - padding: 0 5rem; - font-size: 1.8rem; + // margin-top: 6rem; + // background: #030d2d; + // padding: 0 5rem; + // font-size: 1.8rem; h2 { + color: #dd325e; font-size: 3rem; margin-bottom: 0.3rem; } h4 { - // font-size: 3rem; + 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; @@ -51,7 +60,7 @@ margin: 2rem 0px; .filter-form__header { margin: 0; - padding: 2rem 0 0.5rem 0; + // padding: 2rem 0 0.5rem 0; color: #333; } .filter-form__form { @@ -79,3 +88,66 @@ .all-projects-body { padding: 16px; } + + + +/* The container must be positioned relative: */ +.filter-form__select { + position: relative; + font-family: Arial; +} + +.filter-form__select select { + display: none; /*hide original SELECT element: */ +} + +.select-selected { + color: #fff; + background-color: #dd325e; +} + +/* Style the arrow inside the select element: */ +.select-selected:after { + position: absolute; + content: ""; + top: 14px; + right: 10px; + width: 0; + height: 0; + border: 6px solid transparent; + border-color: #fff transparent transparent transparent; +} + +/* Point the arrow upwards when the select box is open (active): */ +.select-selected.select-arrow-active:after { + border-color: transparent transparent #fff transparent; + top: 7px; +} + +/* style the items (options), including the selected item: */ +.select-items div,.select-selected { + padding: 8px 16px; + border: 1px solid transparent; + border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent; + cursor: pointer; +} + +/* Style items (options): */ +.select-items { + position: absolute; + color: rgba(0, 0, 0, 0.8); + background-color: $color-white; + top: 100%; + left: 0; + right: 0; + z-index: 99; +} + +/* Hide the items when the select box is closed: */ +.select-hide { + display: none; +} + +.select-items div:hover, .same-as-selected { + background-color: rgba(0, 0, 0, 0.1); +} diff --git a/all-projects.html b/all-projects.html deleted file mode 100644 index ad965065bf..0000000000 --- a/all-projects.html +++ /dev/null @@ -1,54 +0,0 @@ ---- ---- -
        -
        -

        Current Projects

        -

        Here's what we're working on. Join us at one of our meetups and contribute!

        -
        -
        -
        -

        Sort By:

        -
        - - -
        -
        -
          - {%- for item in site.projects -%} - {%- if item.hide != true -%} -
        • -
          -
          - {{item.alt}}/ -
          -
          -

          {{ item.title }}

          -

          {{ item.description }}

          - {%- if item.location -%} -
          - Location: - {{ item.location }} -
          - {%- endif -%} -
          -
          -
        • - {%- endif -%} - {%- endfor -%} -
        -
        - -
        diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js index 0b52a3c6f4..d1ab0bd284 100644 --- a/assets/js/all-projects.js +++ b/assets/js/all-projects.js @@ -23,6 +23,7 @@ function showHideProjects(){ }); }; +// 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(); @@ -32,3 +33,86 @@ statusSelector.addEventListener('change', (event) => { searchFilters["status"] = event.target.value; showHideProjects(); }); + +// replace selectors with tyled divs +var parentDivs, index, selectIdx, selElmnt, newParent, optionsContainer, selectOption; +/* Look for any elements with the class "filter-form__select": */ +parentDivs = document.getElementsByClassName("filter-form__select"); +for (index = 0; index < parentDivs.length; index++) { + selElmnt = parentDivs[index].getElementsByTagName("select")[0]; + /* For each element, create a new DIV that will act as the selected item: */ + newParent = document.createElement("DIV"); + newParent.setAttribute("class", "select-selected"); + newParent.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML; + parentDivs[index].appendChild(newParent); + /* For each element, create a new DIV that will contain the option list: */ + optionsContainer = document.createElement("DIV"); + optionsContainer.setAttribute("class", "select-items select-hide"); + + for (selectIdx = 1; selectIdx < selElmnt.length; selectIdx++) { + /* For each option in the original select element, + create a new DIV that will act as an option item: */ + newSelectDiv = document.createElement("DIV"); + newSelectDiv.innerHTML = selElmnt.options[selectIdx].innerHTML; + newSelectDiv.setAttribute("data-value" ,selElmnt.options[selectIdx].value); + newSelectDiv.addEventListener("click", function(e) { + /* When an item is clicked, update the original select box, + and the selected item: */ + var prevSelection, index, idx2, select, defaultSelect; + select = this.parentNode.parentNode.getElementsByTagName("select")[0]; + defaultSelect = this.parentNode.previousSibling; + for (index = 0; index < select.length; index++) { + if (select.options[index].innerHTML == this.innerHTML) { + select.selectedIndex = index; + // update search filter values + searchFilter = select.options[0].label.toLowerCase(); + selectionValue = this.dataset.value; + searchFilters[searchFilter] = selectionValue; + showHideProjects(); + defaultSelect.innerHTML = this.innerHTML; + prevSelection = this.parentNode.getElementsByClassName("same-as-selected"); + for (idx2 = 0; idx2 < prevSelection.length; idx2++) { + prevSelection[idx2].removeAttribute("class"); + } + this.setAttribute("class", "same-as-selected"); + break; + } + } + defaultSelect.click(); + }); + optionsContainer.appendChild(newSelectDiv); + } + parentDivs[index].appendChild(optionsContainer); + newParent.addEventListener("click", function(e) { + /* When the select box is clicked, close any other select boxes, + and open/close the current select box: */ + e.stopPropagation(); + closeAllSelect(this); + this.nextSibling.classList.toggle("select-hide"); + this.classList.toggle("select-arrow-active"); + }); +} + +function closeAllSelect(elmnt) { + /* A function that will close all select boxes in the document, + except the current select box: */ + var x, y, i, arrNo = []; + x = document.getElementsByClassName("select-items"); + y = document.getElementsByClassName("select-selected"); + for (i = 0; i < y.length; i++) { + if (elmnt == y[i]) { + arrNo.push(i) + } else { + y[i].classList.remove("select-arrow-active"); + } + } + for (i = 0; i < x.length; i++) { + if (arrNo.indexOf(i)) { + x[i].classList.add("select-hide"); + } + } +} + +/* If the user clicks anywhere outside the select box, +then close all select boxes: */ +document.addEventListener("click", closeAllSelect); From e13167c4eee242e81c27118bfe7f0ba28b7d4b19 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 14:51:09 -0800 Subject: [PATCH 09/23] added id to secton to repair link --- _includes/current-projects.html | 2 +- website | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 160000 website diff --git a/_includes/current-projects.html b/_includes/current-projects.html index 0e08071627..b86becea6a 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -1,4 +1,4 @@ -
        +
        diff --git a/website b/website new file mode 160000 index 0000000000..bcef537fc1 --- /dev/null +++ b/website @@ -0,0 +1 @@ +Subproject commit bcef537fc1c5e95d199eacc94b9548ef90b1ae22 From 756ccb0d7c57b7db7563ecbdf1c1d2b4fdcd5566 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 15:47:52 -0800 Subject: [PATCH 10/23] added link to project page for each project --- _includes/current-projects.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index b86becea6a..a56c9844ef 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -45,7 +45,7 @@

        Sort By:

        {{item.alt}}/
        -

        {{ item.title }}

        +

        {{item.title}}

        {{ item.description }}

        {%- if item.location -%}
        From 0d50247754c708224da821860a3c96a1706aa153 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 15:57:04 -0800 Subject: [PATCH 11/23] test to see if gh-pages isn't broken anymore --- _includes/current-projects.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index a56c9844ef..c2383e72c5 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -45,7 +45,7 @@

        Sort By:

        {{item.alt}}/
        -

        {{item.title}}

        +

        hello

        {{ item.description }}

        {%- if item.location -%}
        From 6aa175a4ef80134ed385b879bba87fcb525576ba Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 16:00:01 -0800 Subject: [PATCH 12/23] trying to add links again --- _includes/current-projects.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index c2383e72c5..636712df9e 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -45,7 +45,9 @@

        Sort By:

        {{item.alt}}/
        -

        hello

        +

        + {{item.title}} +

        {{ item.description }}

        {%- if item.location -%}
        From ea45d85916af5ad61427d15a717e034c3b4da244 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 16:05:37 -0800 Subject: [PATCH 13/23] removed string from href to see if page can build --- _includes/current-projects.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index 636712df9e..cdd762c021 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -46,7 +46,7 @@

        Sort By:

        - {{item.title}} + {{item.title}}

        {{ item.description }}

        {%- if item.location -%} From e48ba56137177798e55e9f2619196bcc8cf9248f Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Thu, 19 Dec 2019 16:22:57 -0800 Subject: [PATCH 14/23] added item.url to see if that will work --- _includes/current-projects.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index cdd762c021..c68077151b 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -46,7 +46,7 @@

        Sort By:

        - {{item.title}} + {{item.title}}

        {{ item.description }}

        {%- if item.location -%} From 12fb3147f0416a61a96769840a15764278498985 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Mon, 30 Dec 2019 22:03:25 -0800 Subject: [PATCH 15/23] reverted to changes made before adding Kian's project page --- _includes/current-projects.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index c68077151b..2800ef2899 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -45,6 +45,9 @@

        Sort By:

        {{item.alt}}/
        +
        +
        {{item.status}}
        +

        {{item.title}}

        From bfcc0715b308ff47add25fa99a5ce1380d885e0d Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Mon, 30 Dec 2019 22:08:17 -0800 Subject: [PATCH 16/23] Removed hyperlinks to individual project pages --- _includes/current-projects.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index 2800ef2899..b5df9afae9 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -49,7 +49,10 @@

        Sort By:

        {{item.status}}

        - {{item.title}} + + +
        {{item.title}}
        +

        {{ item.description }}

        {%- if item.location -%} From 3d673e707cedd5c23d75b9068b5d13e28de5f834 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Tue, 31 Dec 2019 14:43:47 -0800 Subject: [PATCH 17/23] remove track of CNAME and add to gitignore so it doesn't try to generate page from fork --- .gitignore | 2 ++ CNAME | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) delete mode 100644 CNAME diff --git a/.gitignore b/.gitignore index 6d0c559179..dfa2146ab8 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ dist .DS_store .vscode _site + +CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index f1249fe099..0000000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -www.hackforla.org \ No newline at end of file From 002b097683ae46439827120f2d015b7d6be42279 Mon Sep 17 00:00:00 2001 From: Stephen Nelson Date: Sun, 5 Jan 2020 14:39:43 -0800 Subject: [PATCH 18/23] Create blank.yml --- .github/workflows/blank.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000000..116cef7cff --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,19 @@ +name: CI + +on: + schedule: + - cron: '*/5 * * * *' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Run a one-line script + run: echo Hello, world! + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From e4be139e7826cad29c8456ff660b5a258de44d3e Mon Sep 17 00:00:00 2001 From: Stephen Nelson Date: Sun, 5 Jan 2020 14:46:20 -0800 Subject: [PATCH 19/23] update blank.yml name to tester --- .github/workflows/blank.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index 116cef7cff..662e460e25 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -1,4 +1,4 @@ -name: CI +name: Tester on: schedule: From c4494f86194ba41b62e6a6d0554a0125bf2725a1 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 5 Jan 2020 15:11:06 -0800 Subject: [PATCH 20/23] remove blank --- .github/workflows/blank.yml | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml deleted file mode 100644 index 662e460e25..0000000000 --- a/.github/workflows/blank.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: Tester - -on: - schedule: - - cron: '*/5 * * * *' - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Run a one-line script - run: echo Hello, world! - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. From 3a67461a56ec75b3d7e293b1257ed3cf8d0916eb Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 5 Jan 2020 16:44:50 -0800 Subject: [PATCH 21/23] removed formatting from select buttons --- _includes/current-projects.html | 2 - _sass/components/_all-projects.scss | 63 ---------------------- assets/js/all-projects.js | 83 ----------------------------- 3 files changed, 148 deletions(-) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index b5df9afae9..77b17a413a 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -16,7 +16,6 @@

        Sort By:

        - diff --git a/_sass/components/_all-projects.scss b/_sass/components/_all-projects.scss index f279c35e02..5bdd7f91d8 100644 --- a/_sass/components/_all-projects.scss +++ b/_sass/components/_all-projects.scss @@ -88,66 +88,3 @@ .all-projects-body { padding: 16px; } - - - -/* The container must be positioned relative: */ -.filter-form__select { - position: relative; - font-family: Arial; -} - -.filter-form__select select { - display: none; /*hide original SELECT element: */ -} - -.select-selected { - color: #fff; - background-color: #dd325e; -} - -/* Style the arrow inside the select element: */ -.select-selected:after { - position: absolute; - content: ""; - top: 14px; - right: 10px; - width: 0; - height: 0; - border: 6px solid transparent; - border-color: #fff transparent transparent transparent; -} - -/* Point the arrow upwards when the select box is open (active): */ -.select-selected.select-arrow-active:after { - border-color: transparent transparent #fff transparent; - top: 7px; -} - -/* style the items (options), including the selected item: */ -.select-items div,.select-selected { - padding: 8px 16px; - border: 1px solid transparent; - border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent; - cursor: pointer; -} - -/* Style items (options): */ -.select-items { - position: absolute; - color: rgba(0, 0, 0, 0.8); - background-color: $color-white; - top: 100%; - left: 0; - right: 0; - z-index: 99; -} - -/* Hide the items when the select box is closed: */ -.select-hide { - display: none; -} - -.select-items div:hover, .same-as-selected { - background-color: rgba(0, 0, 0, 0.1); -} diff --git a/assets/js/all-projects.js b/assets/js/all-projects.js index d1ab0bd284..59912a05ea 100644 --- a/assets/js/all-projects.js +++ b/assets/js/all-projects.js @@ -33,86 +33,3 @@ statusSelector.addEventListener('change', (event) => { searchFilters["status"] = event.target.value; showHideProjects(); }); - -// replace selectors with tyled divs -var parentDivs, index, selectIdx, selElmnt, newParent, optionsContainer, selectOption; -/* Look for any elements with the class "filter-form__select": */ -parentDivs = document.getElementsByClassName("filter-form__select"); -for (index = 0; index < parentDivs.length; index++) { - selElmnt = parentDivs[index].getElementsByTagName("select")[0]; - /* For each element, create a new DIV that will act as the selected item: */ - newParent = document.createElement("DIV"); - newParent.setAttribute("class", "select-selected"); - newParent.innerHTML = selElmnt.options[selElmnt.selectedIndex].innerHTML; - parentDivs[index].appendChild(newParent); - /* For each element, create a new DIV that will contain the option list: */ - optionsContainer = document.createElement("DIV"); - optionsContainer.setAttribute("class", "select-items select-hide"); - - for (selectIdx = 1; selectIdx < selElmnt.length; selectIdx++) { - /* For each option in the original select element, - create a new DIV that will act as an option item: */ - newSelectDiv = document.createElement("DIV"); - newSelectDiv.innerHTML = selElmnt.options[selectIdx].innerHTML; - newSelectDiv.setAttribute("data-value" ,selElmnt.options[selectIdx].value); - newSelectDiv.addEventListener("click", function(e) { - /* When an item is clicked, update the original select box, - and the selected item: */ - var prevSelection, index, idx2, select, defaultSelect; - select = this.parentNode.parentNode.getElementsByTagName("select")[0]; - defaultSelect = this.parentNode.previousSibling; - for (index = 0; index < select.length; index++) { - if (select.options[index].innerHTML == this.innerHTML) { - select.selectedIndex = index; - // update search filter values - searchFilter = select.options[0].label.toLowerCase(); - selectionValue = this.dataset.value; - searchFilters[searchFilter] = selectionValue; - showHideProjects(); - defaultSelect.innerHTML = this.innerHTML; - prevSelection = this.parentNode.getElementsByClassName("same-as-selected"); - for (idx2 = 0; idx2 < prevSelection.length; idx2++) { - prevSelection[idx2].removeAttribute("class"); - } - this.setAttribute("class", "same-as-selected"); - break; - } - } - defaultSelect.click(); - }); - optionsContainer.appendChild(newSelectDiv); - } - parentDivs[index].appendChild(optionsContainer); - newParent.addEventListener("click", function(e) { - /* When the select box is clicked, close any other select boxes, - and open/close the current select box: */ - e.stopPropagation(); - closeAllSelect(this); - this.nextSibling.classList.toggle("select-hide"); - this.classList.toggle("select-arrow-active"); - }); -} - -function closeAllSelect(elmnt) { - /* A function that will close all select boxes in the document, - except the current select box: */ - var x, y, i, arrNo = []; - x = document.getElementsByClassName("select-items"); - y = document.getElementsByClassName("select-selected"); - for (i = 0; i < y.length; i++) { - if (elmnt == y[i]) { - arrNo.push(i) - } else { - y[i].classList.remove("select-arrow-active"); - } - } - for (i = 0; i < x.length; i++) { - if (arrNo.indexOf(i)) { - x[i].classList.add("select-hide"); - } - } -} - -/* If the user clicks anywhere outside the select box, -then close all select boxes: */ -document.addEventListener("click", closeAllSelect); From 19d28f4ef2159be95f92f1e5ecbe4cf544ba2179 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Sun, 5 Jan 2020 16:52:45 -0800 Subject: [PATCH 22/23] added details for each project back into the projects section --- _includes/current-projects.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/_includes/current-projects.html b/_includes/current-projects.html index 77b17a413a..87d0b1078f 100644 --- a/_includes/current-projects.html +++ b/_includes/current-projects.html @@ -54,6 +54,27 @@

        {{ item.description }}

        {%- if item.location -%} + {%- if item.links -%} + + {%- endif -%} + {%- if item.partner -%} +
        + Partner: + {{ item.partner }} +
        + {%- endif -%} + {%- if item.looking -%} +
        + Looking for: + {{ item.looking }} +
        + {%- endif -%}
        Location: {{ item.location }} From 27e398c51d4fcef722d9036b4140f21435ab6709 Mon Sep 17 00:00:00 2001 From: StephenVNelson Date: Mon, 13 Jan 2020 22:23:59 -0800 Subject: [PATCH 23/23] adding CNAME back before merge --- .gitignore | 2 +- CNAME | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CNAME diff --git a/.gitignore b/.gitignore index dfa2146ab8..b883ab8ded 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ dist .vscode _site -CNAME +#CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000000..dd05f0411a --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +www.hackforla.org