Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nickharb/wwf-deforestation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: wwfus/wwf-deforestation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 11 commits
  • 25 files changed
  • 1 contributor

Commits on Oct 6, 2022

  1. Add LinkToTop component

    This is to make it easier for users to navigate to the other diease and locations tabs, especially on mobile.
    noahpatterson committed Oct 6, 2022
    Copy the full SHA
    034a148 View commit details

Commits on Dec 12, 2023

  1. Save font’s to app instead of loading through google

    this should reduce load times
    noahpatterson committed Dec 12, 2023
    Copy the full SHA
    189b84e View commit details
  2. Copy the full SHA
    e3b21dc View commit details
  3. Copy the full SHA
    4d06d48 View commit details
  4. Copy the full SHA
    1634d0b View commit details
  5. Copy the full SHA
    f8b1cb4 View commit details
  6. Copy the full SHA
    9c448dd View commit details

Commits on Jan 2, 2024

  1. Copy the full SHA
    c44ab0a View commit details
  2. Copy the full SHA
    bc1e4c7 View commit details
  3. Copy the full SHA
    4c9115f View commit details

Commits on Jan 29, 2024

  1. Content updates

    noahpatterson committed Jan 29, 2024
    Copy the full SHA
    e8a2029 View commit details
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,17 @@

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## Project specific deployment instructions

These project file are hosted on WWF's file share: files.worldwildlife.org. In order to ensure all links and images work, please:

a. Ensure that images or svgs start with "static/media/IMAGE_NAME" where "IMAGE_NAME" is subsituted with the image name.
b. Ensure all other links or file start with "https://files.worldwildlife.org/wwfcmsprod/misc/disease_and_deforestation".

After running `npm run build` you may need to swap these urls before any new files are uploaded to the file share.

Extra tip: I find that editing this through VSCode applies auto formatting which can break the files. To prevent this, you can usje textpad, notepad, or VIM.

## Available Scripts

In the project directory, you can run:
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@
"name": "wwf-deforestation",
"version": "0.1.0",
"private": true,
"homepage": "https://files.worldwildlife.org/wwfcmsprod/misc/disease_and_deforestation",
"dependencies": {
"@emotion/react": "^11.10.4",
"@emotion/styled": "^11.10.4",
Binary file removed public/favicon.ico
Binary file not shown.
43 changes: 22 additions & 21 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--

<head>
<meta charset="utf-8" />
<!-- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description"
content="An interactive about Disease and Deforestation. Approximately half of today’s infectious diseases are zoonotic in origin – meaning they transmit to humans from other animals – including COVID-19, Ebola, Malaria, and Lyme disease." />
<!-- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> -->
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
@@ -24,12 +23,13 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
<title>Disease and Deforestation</title>
</head>

<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
@@ -39,5 +39,6 @@
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
</body>

</html>
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
10 changes: 5 additions & 5 deletions src/components/Blurb.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
.blurb {
.App .blurb {
display: flex;
justify-content: left;
margin-bottom: 40px;
}

.blurb img {
.App .blurb img {
height: 60px;
width: 60px;
margin-right: 20px;
}

.blurb p {
.App .blurb p {
margin: 0;
font-size: 14px;
}

@media (min-width: 768px) {
.blurb p {
.App .blurb p {
font-size: 15px;
}
}

.blurb span {
.App .blurb span {
text-transform: uppercase;
color: #0D6B83;
font-weight: bold;
12 changes: 6 additions & 6 deletions src/components/Content.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.main-content {
.App .main-content {
max-width: 1280px;
padding: 20px;
display: flex;
@@ -7,28 +7,28 @@
}

@media (min-width: 768px) {
.main-content {
.App .main-content {
flex-direction: row;
}
}

@media (min-width: 768px) {
.main-content {
.App .main-content {
margin: 0 -15px;
}

.layout-column {
.App .layout-column {
width: 50%;
margin: 0 15px;
}
}

@media (min-width: 1024px) {
.main-content {
.App .main-content {
margin: 0 -30px;
}

.layout-column {
.App .layout-column {
margin: 0 30px;
}
}
15 changes: 10 additions & 5 deletions src/components/CountryTab.css
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
.country-tabs {
.App .country-tabs {
display: flex;
flex-wrap: wrap;
margin: 0 -10px 20px;
}

.country-tab-wrapper {
.App .country-tab-wrapper {
border-right: 1px solid #02252D;
margin-bottom: 5px;
}

.country-tab-wrapper:last-of-type {
.App .country-tab-wrapper:last-of-type {
border-right: none;
}

.country-tab {
.App .country-tab-wrapper button {
color: #000;
}

.App .country-tab {
font-family: 'Open Sans', sans-serif;
list-style: none;
margin: 0 10px;
cursor: pointer;
@@ -25,6 +30,6 @@
padding: 0 0 4px;
}

.country-tab.active {
.App .country-tab.active {
border-bottom-color: #D35C27;
}
12 changes: 7 additions & 5 deletions src/components/DriverTab.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.driver-tab {
.App .driver-tab {
font-family: 'Open Sans', sans-serif;
list-style: none;
padding: 8px 12px;
margin-right: 10px;
@@ -15,16 +16,17 @@
}

@media (min-width: 768px) {
.driver-tab {
.App .driver-tab {
padding: 8px 20px;
}
}

.driver-tab.active:first-of-type {
.App .driver-tab.active:first-of-type {
background-color: #0D6B83;
color: #A3D6D2;
color: #f6f5f2;
}

.driver-tab.active:last-of-type {
.App .driver-tab.active:last-of-type {
background-color: #A3D6D2;
color: #000
}
10 changes: 5 additions & 5 deletions src/components/Header.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
.main-header {
.App .main-header {
background-color: #02252d;
padding: 20px;
}

.main-header h1 {
.App .main-header h1 {
color: #ffffff;
}

@media (min-width: 768px) {
.main-header h1 {
.App .main-header h1 {
text-align: center;
}
}

.main-header p {
.App .main-header p {
color: #ffffff;
max-width: 860px;
margin: 0 auto 60px;
letter-spacing: 0.02em;
}

@media (min-width: 768px) {
.main-header p {
.App .main-header p {
font-size: 18px;
}
}
6 changes: 3 additions & 3 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -6,11 +6,11 @@ const Header = () => {
<h1>Disease and Deforestation</h1>
<p>
Approximately half of today’s infectious diseases are zoonotic in
origin meaning they transmit to humans from other animals including
COVID-19, Ebola, Malaria, and Lyme disease. As outbreaks and pandemics
origin &mdash; meaning they transmit to humans from other animals &mdash; including
COVID-19, Ebola, malaria, and Lyme disease. As outbreaks and pandemics
threaten global health and economies, scientists are looking at the
origins of zoonotic disease and why these spillovers from animals to
humans are on the rise. Emerging research shows that land-use, and
humans are on the rise. Emerging research shows that land use, and
specifically deforestation, can increase the risk and spread of
infectious diseases. Forest loss and fragmentation lead to greater
concentrations of disease pathogens and more frequent interactions
7 changes: 7 additions & 0 deletions src/components/LinkToTop.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const LinkToTop = (props) => {
return (
<a className="linkToTop" href="#nav">Explore other diseases and locations.</a>
);
}

export default LinkToTop;
34 changes: 18 additions & 16 deletions src/components/Map.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.map {
.App .map {
height: 500px;
width: 100%;
background-color: lightgrey;
margin-bottom: 100px;
}

@media (min-width: 768px) {
.map {
.App .map {
height: 80vh;
min-height: 400px;
position: sticky;
@@ -15,7 +15,7 @@
}
}

.map__container {
.App .map__container {
height: 100%;
width: 100%;
}
@@ -48,46 +48,48 @@
margin-bottom: 10px;
} */

.map__legend {
.App .map__legend {
margin: 0 -10px;
margin-left: -20px;
display: flex;
justify-content: left;
margin-top: 10px;
}

.map__legend-item {
.App .map__legend .map__legend_formGroup {
display: flex;
flex-direction: row;
}

.App .map__legend-item {
margin: 0 10px;
color: #000;
display: flex;
align-items: center;
font-size: 14px;
}

.map__legend-item span {
.App .map__legend-item span {
font-weight: bold;
font-size: 14px;
}

.map__legend-item:first-of-type .MuiButtonBase-root.Mui-checked {
.App .map__legend-item:first-of-type .MuiButtonBase-root.Mui-checked {
color: #0d6b83 !important;
}

.map__legend-item:first-of-type .MuiButtonBase-root.Mui-checked:hover {
.App .map__legend-item:first-of-type .MuiButtonBase-root.Mui-checked:hover {
background-color: rgba(13, 107, 131, 0.07) !important;
}

.map__legend-item:last-of-type .MuiButtonBase-root.Mui-checked {
.App .map__legend-item:last-of-type .MuiButtonBase-root.Mui-checked {
color: #a3d6d2 !important;
}

.map__legend-item:last-of-type .MuiButtonBase-root.Mui-checked:hover {
.App .map__legend-item:last-of-type .MuiButtonBase-root.Mui-checked:hover {
background-color: rgba(163, 214, 210, 0.16) !important;
}

.map__legend-item:first-of-type .MuiSwitch-track {
.App .map__legend-item:first-of-type .MuiSwitch-track {
background-color: rgba(13, 107, 131, 0.7) !important;
}

.map__legend-item:last-of-type .MuiSwitch-track {
.App .map__legend-item:last-of-type .MuiSwitch-track {
background-color: rgba(163, 214, 210, 1) !important;
}
Loading