From 885e77b918ccf7b4110b856abd936d05203f996d Mon Sep 17 00:00:00 2001 From: Malaika C <59617356+Mtcarp@users.noreply.github.com> Date: Wed, 18 Mar 2020 09:48:03 -0400 Subject: [PATCH 01/18] Create what-is-social-distancing Add social distancing as its own FAQ --- _content/basics/what-is-social-distancing.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 _content/basics/what-is-social-distancing.md diff --git a/_content/basics/what-is-social-distancing.md b/_content/basics/what-is-social-distancing.md new file mode 100644 index 000000000..796ea6a64 --- /dev/null +++ b/_content/basics/what-is-social-distancing.md @@ -0,0 +1,12 @@ +--- +title: What is social distancing? +category: basics +layout: post +date: March 18, 2020 +source: CDC +source_url: https://webcache.googleusercontent.com/search?q=cache:_WT1yjb8w94J:https://www.cdc.gov/coronavirus/2019-ncov/about/coping.html+&cd=6&hl=en&ct=clnk&gl=us and https://www.cdc.gov/coronavirus/2019-ncov/travelers/faqs.html +--- + +Social distancing means remaining out of places where people meet or gather, avoiding local public transportation (e.g., bus, subway, taxi, rideshare), and maintaining distance (approximately 6 feet or 2 meters) from others. + +You practice social distancing when you stay out of crowded places and avoid group gatherings. \ No newline at end of file From d2575cafe92e8ae7f0bd5e4d8ce689dacb945bbc Mon Sep 17 00:00:00 2001 From: Laura Gerhardt Date: Wed, 18 Mar 2020 09:49:26 -0400 Subject: [PATCH 02/18] fix links refs --- _includes/content-questions.html | 4 ++-- _includes/questions-box.html | 12 ++++++------ index.html | 23 +++++------------------ 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/_includes/content-questions.html b/_includes/content-questions.html index 536a4b0f3..69b6d440d 100644 --- a/_includes/content-questions.html +++ b/_includes/content-questions.html @@ -13,12 +13,12 @@

{{ site_category.title }}

{% for question in category_questions limit:4 %} {% if page.lang == question.lang %}
  • - {{ question.title }} + {{ question.title }}
  • {% endif %} {% endfor %} - View All questions about {{ site_category.title }} + View All questions about {{ site_category.title }} {% endfor %} diff --git a/_includes/questions-box.html b/_includes/questions-box.html index dc10ed70e..4a88bc3ab 100644 --- a/_includes/questions-box.html +++ b/_includes/questions-box.html @@ -9,12 +9,12 @@

    {{ include.questions_box.box_1_header }}

    - View All questions about {{ include.questions_box.box_1_header }} + View All questions about {{ include.questions_box.box_1_header }} @@ -42,12 +42,12 @@

    {{ include.questions_box.box_1_header }}

    {{ include.questions_box.box_2_header }}

    - View All questions about {{ include.questions_box.box_2_header }} + View All questions about {{ include.questions_box.box_2_header }} diff --git a/index.html b/index.html index 0aa3c0c95..28b8bea9d 100644 --- a/index.html +++ b/index.html @@ -21,40 +21,27 @@ top_questions: - icon: stethoscope question: What are the symptoms? - link: /symptoms-and-testing.html#what-are-the-symptoms-and-complications-that-covid-19-can-cause + link: /symptoms-and-testing/#what-are-the-symptoms-and-complications-that-covid-19-can-cause - icon: test question: Should I get tested? - link: /symptoms-and-testing.html#should-i-be-tested-for-covid-19 + link: /symptoms-and-testing/#should-i-be-tested-for-covid-19 - icon: chart question: How does it spread? - link: /spread.html#how-does-the-virus-spread + link: /spread/how-does-the-virus-spread - icon: group question: What is social distancing? link: https://www.cdc.gov/coronavirus/2019-ncov/community/index.html - icon: globe question: Cases in the U.S. - link: /protect-yourself.html#has-anyone-in-the-united-states-gotten-infected + link: /protect-yourself/#has-anyone-in-the-united-states-gotten-infected - icon: plane question: Can I travel? - link: /travel.html + link: /travel/ questions_box: box_1_header: "How to protect yourself" box_1_category: protectyourself box_2_header: "What to do if you feel sick" box_2_category: feelingsick -topics: - - tag: about - title: "About COVID-19" - - tag: highrisk - title: Advice for high-risk - - tag: everyone - title: Advice for everyone - - tag: hygiene - title: Hygiene - - tag: travel - title: Travelling - - tag: Quarantine - title: Quarantine --- {% if page.banner.display == true %} From 287eb30c71c54a866624217fa38a2fc2c7a2a75f Mon Sep 17 00:00:00 2001 From: Malaika C <59617356+Mtcarp@users.noreply.github.com> Date: Wed, 18 Mar 2020 09:58:32 -0400 Subject: [PATCH 03/18] Fix to travel FAQ Correct error in travel FAQ headline --- ...ring-when-arriving-to-the-united-states.md | 2 +- ...pect-when-arriving-to-the-united-states.md | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 _content/travel/what-can-I-expect-when-arriving-to-the-united-states.md diff --git a/_content/travel/what-can-I-bring-when-arriving-to-the-united-states.md b/_content/travel/what-can-I-bring-when-arriving-to-the-united-states.md index 87e9c238d..978556d95 100644 --- a/_content/travel/what-can-I-bring-when-arriving-to-the-united-states.md +++ b/_content/travel/what-can-I-bring-when-arriving-to-the-united-states.md @@ -1,5 +1,5 @@ --- -title: What can I bring when arriving to the United States? +title: What can I expect when arriving to the United States? category: travel layout: post date: March 16, 2020 diff --git a/_content/travel/what-can-I-expect-when-arriving-to-the-united-states.md b/_content/travel/what-can-I-expect-when-arriving-to-the-united-states.md new file mode 100644 index 000000000..978556d95 --- /dev/null +++ b/_content/travel/what-can-I-expect-when-arriving-to-the-united-states.md @@ -0,0 +1,19 @@ +--- +title: What can I expect when arriving to the United States? +category: travel +layout: post +date: March 16, 2020 +source: CDC +source_url: https://www.cdc.gov/coronavirus/2019-ncov/travelers/faqs.html +excerpt: Returning from travel +--- + +At this time, travel restrictions and entry screening only apply to travelers arriving from countries with a level 3 travel health notice. [Note: US policies are subject to change as the COVID-19 pandemic evolves.] + +This means that if you traveled from countries other than those listed above, you: +* Won’t be subject to additional health screening upon arrival in the United States, and +* Won’t be under mandatory quarantine orders upon entry to the United States. + +If you are arriving to the United States from a country with level 2 travel health notice, you will be asked to monitor your health and practice social distancing. Social distancing means staying out of crowded places, avoiding group gatherings, and maintaining distance (approximately 6 feet or 2 meters) from others when possible. + +If you are coming from an international destination with a level 3 Travel Health Notice, you will be asked to stay home for 14 days from the time you return from travel, monitor your health and practice social distancing. Social distancing means staying out of crowded places, avoiding group gatherings, and maintaining distance (approximately 6 feet or 2 meters) from others when possible. From dafc468cdaf3e3a394174fa6ecac6082c228d129 Mon Sep 17 00:00:00 2001 From: Joe Krzystan Date: Wed, 18 Mar 2020 00:13:21 -0400 Subject: [PATCH 04/18] search sandbox --- _config.yml | 4 ++-- search/index.html | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index 9f817338f..ece557366 100644 --- a/_config.yml +++ b/_config.yml @@ -96,8 +96,8 @@ secondary_navigation: # 3. Add your site/affiliate name here. searchgov: endpoint: https://search.usa.gov # You should not change this. - affiliate: faq.coronavirus.gov # replace this with your search.gov account - access_key: ACSIQG9J_Xe7h9TTxjMrNqfUCp9O3ryactfBybCMIGc= # This is placeholder. Not private. + affiliate: 18fcvddev # replace this with your search.gov account + access_key: yBQhiqQjR80tDwx5HuPvbluq4NgkO_RTwludGJAPgwg= # This is placeholder. Not private. inline: true #this renders the results on the same domain. Otherwise, it will render the results in the search.gov domain ########################################################################################## diff --git a/search/index.html b/search/index.html index da4e49ac8..88c6f12ea 100644 --- a/search/index.html +++ b/search/index.html @@ -19,11 +19,11 @@ fetch(searchEndpoint).then(function(response) { return response.json() }).then(function(posts) { - for (item in posts.web.results){ + for (item in posts.text_best_bets){ render_result(`
  • - ${posts.web.results[item]['title']} -
    ${posts.web.results[item]['snippet'].replace(/\uE000/g, '').replace(/\uE001/g, '')}
    + ${posts.text_best_bets[item]['title']} +
    ${posts.text_best_bets[item]['description'].replace(/\uE000/g, '').replace(/\uE001/g, '')}
  • `, true) From 0ccd62144e83af38fda6a120dac1826b1320e613 Mon Sep 17 00:00:00 2001 From: Andrew Dunkman Date: Wed, 18 Mar 2020 09:58:16 -0400 Subject: [PATCH 05/18] Restructure javascript so we can collab! --- search/index.html | 84 ++++++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/search/index.html b/search/index.html index 88c6f12ea..a5501bbe5 100644 --- a/search/index.html +++ b/search/index.html @@ -6,50 +6,72 @@ + Object.entries({ + affiliate: '{{site.searchgov.affiliate}}', + access_key: '{{site.searchgov.access_key}}', + query: new URLSearchParams(window.location.search).get('query') + }).forEach(([key, value]) => searchEndpoint.searchParams.append(key, value)); + + const searchgov = fetch(searchEndpoint) + .then(response => response.json()); + searchgov.catch(error => { + console.error('Request for json from search.gov failed', error); + // Start fallback here, if implemented + // If timeout is needed, wrap in a promise which rejects after a setTimeout interval. + }); + + searchgov.then(results => renderResults(translate_fromSearchGov(results))); + })(); + {% if site.searchgov %}

    Search Results

    -
      +
      {% else %} {% if site.searchgov %} -

      Search Results

      -
        +

        Search Results

        +
          {% else %} - -{% endif %} + +{% endif %} \ No newline at end of file From df77b5a20fb58b39ca4fc633d776a2f63940acb3 Mon Sep 17 00:00:00 2001 From: Andrew Dunkman Date: Wed, 18 Mar 2020 11:03:00 -0400 Subject: [PATCH 09/18] Use search results. --- search/index.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/search/index.html b/search/index.html index dc70fd05c..7c8dab080 100644 --- a/search/index.html +++ b/search/index.html @@ -46,7 +46,13 @@

          ${highlight(result.title)}

          // Translation const translate_fromSearchGov = (response) => { - return response.text_best_bets; + return response.web.results.map(result => { + return { + url: result.url, + title: result.title, + description: result.snippet + }; + }); }; ////////////////////////////////// @@ -57,7 +63,8 @@

          ${highlight(result.title)}

          Object.entries({ affiliate: '{{site.searchgov.affiliate}}', access_key: '{{site.searchgov.access_key}}', - query: new URLSearchParams(window.location.search).get('query') + query: new URLSearchParams(window.location.search).get('query'), + limit: 50 }).forEach(([key, value]) => searchEndpoint.searchParams.append(key, value)); const searchgov = fetch(searchEndpoint) From 37cab8489badcfc5cc0c61871c0f8a18e19c4a09 Mon Sep 17 00:00:00 2001 From: Andrew Dunkman Date: Wed, 18 Mar 2020 11:12:53 -0400 Subject: [PATCH 10/18] Merge conflict resolution --- _assets/css/_search.scss | 6 +++--- search/index.html | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/_assets/css/_search.scss b/_assets/css/_search.scss index a3ab56a45..e57cc8621 100644 --- a/_assets/css/_search.scss +++ b/_assets/css/_search.scss @@ -1,4 +1,4 @@ -#search-results { +#search-results ol { padding-left: 0; li { @include u-border-bottom('solid', '1px', 'base-lighter'); @@ -6,7 +6,7 @@ margin-bottom: units(3); list-style: none; &:before { - + } a { @include u-text('no-underline'); @@ -31,4 +31,4 @@ @include u-color('primary-dark'); } } -} \ No newline at end of file +} diff --git a/search/index.html b/search/index.html index 969719cd1..28c41f37d 100644 --- a/search/index.html +++ b/search/index.html @@ -33,9 +33,9 @@ return `
        1. -

          ${highlight(result.title)}

          -

          ${highlight(result.description)}... Continue reading

          -
          +

          ${highlight(result.title)}

          +

          ${highlight(result.description)}... Continue reading

          +
        2. `; }; @@ -84,9 +84,9 @@

          ${highlight(result.title)}

          {% if site.searchgov %}

          Search Results

          -
            +
            {% else %} -{% endif %} \ No newline at end of file +{% endif %} From 4d6ffe9fc76ece4ba6bfac36f94d194031f05afb Mon Sep 17 00:00:00 2001 From: Heather Date: Wed, 18 Mar 2020 09:30:39 -0600 Subject: [PATCH 11/18] remove JS search --- _assets/js/app.js | 12 ++++++------ _includes/hero.html | 7 +++---- _includes/search.html | 30 +++++++++++++----------------- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/_assets/js/app.js b/_assets/js/app.js index a39fa2387..7a5f515ab 100644 --- a/_assets/js/app.js +++ b/_assets/js/app.js @@ -2,7 +2,7 @@ //= require ./simple-jekyll-search (function () { - const form = document.getElementById('search_form'); + // const form = document.getElementById('search_form'); if (form) { const urlParams = new URLSearchParams(window.location.search); const autocomplete = document.getElementById('autocomplete-container'); @@ -22,7 +22,7 @@ const regex = new RegExp(inputValue, 'i'); const output = value.replace(regex, function (v) { - return ''+ v +'' + return '' + v + '' }); return output }, @@ -46,13 +46,13 @@ const EXPANDED = "aria-expanded"; var url = window.location.href; var idx = url.indexOf("#"); -var questionAnchor = idx != -1 ? url.substring(idx+1) : ""; +var questionAnchor = idx != -1 ? url.substring(idx + 1) : ""; -if(questionAnchor.length > 1){ +if (questionAnchor.length > 1) { var accordionButtons = document.querySelectorAll('.usa-accordion__button'); - accordionButtons.forEach(accordion =>{ - if(accordion.getAttribute('id') != questionAnchor) { + accordionButtons.forEach(accordion => { + if (accordion.getAttribute('id') != questionAnchor) { accordion.setAttribute(EXPANDED, "false"); } }) diff --git a/_includes/hero.html b/_includes/hero.html index 49893b378..78cceecb7 100644 --- a/_includes/hero.html +++ b/_includes/hero.html @@ -14,12 +14,11 @@ {% endcomment %}

            {{ include.hero.title }}

            - -

            or you can browse the categories below to find what you are looking for.

            - + \ No newline at end of file diff --git a/_includes/search.html b/_includes/search.html index c1b9ff0d5..1e1116bfe 100644 --- a/_includes/search.html +++ b/_includes/search.html @@ -1,18 +1,14 @@ -