mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 17:44:20 -08:00
Site content and style update for sprint2/3 (#279)
* add legend and styling for map page * update header to latest style/content * add contact page * add methodology page #199 and #200
This commit is contained in:
parent
00fd51de8b
commit
f4f7c35ca8
8 changed files with 202 additions and 74 deletions
|
@ -5,7 +5,7 @@ const HowYouCanHelp = () => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.howYouCanHelpContainer}>
|
<div className={styles.howYouCanHelpContainer}>
|
||||||
<h2>How You Can Help Improve the Tool</h2>
|
<h2>How You Can Help Improve the Tool</h2>
|
||||||
<ul>
|
<ul className={'usa-list'}>
|
||||||
<li>If you have information that could help, we’d love to hear from you.</li>
|
<li>If you have information that could help, we’d love to hear from you.</li>
|
||||||
<li>View our full set of data sources and methodology
|
<li>View our full set of data sources and methodology
|
||||||
where you can add or download sources and check statuses on our data roadmap.</li>
|
where you can add or download sources and check statuses on our data roadmap.</li>
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import React, {useState} from 'react';
|
import React, {useState} from 'react';
|
||||||
import {Link, useIntl} from 'gatsby-plugin-intl';
|
import {Link, useIntl} from 'gatsby-plugin-intl';
|
||||||
import {
|
import {
|
||||||
|
Alert,
|
||||||
Header,
|
Header,
|
||||||
NavMenuButton,
|
NavMenuButton,
|
||||||
PrimaryNav,
|
PrimaryNav,
|
||||||
SiteAlert,
|
GovBanner,
|
||||||
Title,
|
Title,
|
||||||
} from '@trussworks/react-uswds';
|
} from '@trussworks/react-uswds';
|
||||||
import {Helmet} from 'react-helmet';
|
import {Helmet} from 'react-helmet';
|
||||||
|
@ -30,26 +31,42 @@ const J40Header = () => {
|
||||||
const menuData = new Map<string, JSX.Element>([
|
const menuData = new Map<string, JSX.Element>([
|
||||||
['about',
|
['about',
|
||||||
<Link
|
<Link
|
||||||
key={'about'} className={'j40-header'}
|
to={'/'}
|
||||||
to={'/'}>About</Link>],
|
key={'about'}
|
||||||
['timeline',
|
activeClassName="usa-current"
|
||||||
<Link
|
className={'j40-header'}>About</Link>],
|
||||||
to={'/timeline'}
|
|
||||||
key={'timline'}
|
|
||||||
className={'j40-header'}>Timeline</Link>],
|
|
||||||
['cejst',
|
['cejst',
|
||||||
<Link
|
<Link
|
||||||
to={'/cejst'}
|
to={'/cejst'}
|
||||||
key={'cejst'}
|
key={'cejst'}
|
||||||
className={'j40-header'}>CEJST</Link>],
|
activeClassName="usa-current"
|
||||||
|
className={'j40-header'}>Explore the tool</Link>],
|
||||||
|
['methodology',
|
||||||
|
<Link
|
||||||
|
to={'/methodology'}
|
||||||
|
key={'methodology'}
|
||||||
|
activeClassName="usa-current"
|
||||||
|
className={'j40-header'}>Methodology</Link>],
|
||||||
|
['contact',
|
||||||
|
<Link
|
||||||
|
to={'/contact'}
|
||||||
|
key={'contact'}
|
||||||
|
activeClassName="usa-current"
|
||||||
|
className={'j40-header'}>Contact</Link>],
|
||||||
|
['timeline',
|
||||||
|
<Link
|
||||||
|
to={'/timeline'}
|
||||||
|
key={'timline'}
|
||||||
|
activeClassName="usa-current"
|
||||||
|
className={'j40-header'}>Timeline</Link>],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// select which items from the above map to show, right now it's only two
|
// select which items from the above map to show, right now it's only two
|
||||||
// possibilities so it's simple. Note: strings are used as react keys
|
// possibilities so it's simple. Note: strings are used as react keys
|
||||||
const menu =
|
const menu =
|
||||||
flags?.includes('timeline') ?
|
flags?.includes('sprint3') ?
|
||||||
['about', 'timeline', 'cejst'] :
|
['about', 'cejst', 'methodology', 'contact'] :
|
||||||
['about', 'timeline', 'cejst']; // ['about', 'cejst'];
|
['about', 'cejst', 'methodology', 'contact'];
|
||||||
// TODO: make feature flags flags work.
|
// TODO: make feature flags flags work.
|
||||||
return menu.map((key) => menuData.get(key));
|
return menu.map((key) => menuData.get(key));
|
||||||
};
|
};
|
||||||
|
@ -60,21 +77,18 @@ const J40Header = () => {
|
||||||
<meta charSet="utf-8"/>
|
<meta charSet="utf-8"/>
|
||||||
<title>{title}</title>
|
<title>{title}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
{/* <GovBanner/> */}
|
<GovBanner/>
|
||||||
<SiteAlert
|
|
||||||
variant="info"
|
|
||||||
className={'j40-sitealert'}>
|
|
||||||
<b>Welcome to Justice40's Temporary Home</b> While Justice40 gets
|
|
||||||
up and running, we are using GitHub Pages as a temporary website
|
|
||||||
host. To learn more about GitHub Pages, click
|
|
||||||
<a href="https://pages.github.com/">here</a>.
|
|
||||||
</SiteAlert>
|
|
||||||
<Header
|
<Header
|
||||||
basic={true} role={'banner'}
|
basic={true} role={'banner'}
|
||||||
className={'usa-header j40-header'}>
|
className={'usa-header j40-header'}>
|
||||||
<div className="usa-nav-container">
|
<div className="usa-nav-container">
|
||||||
<div className="usa-navbar">
|
<div className="usa-navbar">
|
||||||
<Title>{title}</Title>
|
<Title>{title}
|
||||||
|
<div className={'byline'}>
|
||||||
|
A climate and economic justice screening tool
|
||||||
|
</div>
|
||||||
|
</Title>
|
||||||
|
|
||||||
<NavMenuButton
|
<NavMenuButton
|
||||||
key={'mobileMenuButton'}
|
key={'mobileMenuButton'}
|
||||||
onClick={toggleMobileNav}
|
onClick={toggleMobileNav}
|
||||||
|
@ -89,6 +103,25 @@ const J40Header = () => {
|
||||||
</PrimaryNav>
|
</PrimaryNav>
|
||||||
</div>
|
</div>
|
||||||
</Header>
|
</Header>
|
||||||
|
<Alert
|
||||||
|
className={'j40-sitealert'}
|
||||||
|
type="info">
|
||||||
|
<b>Public beta — </b>
|
||||||
|
Welcome to the public beta of the Just Progress Map, a climate and
|
||||||
|
economic justice screening tool. The tool will be continuously updated.
|
||||||
|
Please submit feedback.
|
||||||
|
<br/>
|
||||||
|
</Alert>
|
||||||
|
<Alert
|
||||||
|
className={'j40-sitealert'}
|
||||||
|
type="warning">
|
||||||
|
<b>Limited data sources — </b>
|
||||||
|
This tool currently includes 16 datasets. Over time, datasets could be
|
||||||
|
added, updated, or removed. The datasets come from a variety of sources
|
||||||
|
based on availability, quality, and relevance to environmental, energy,
|
||||||
|
and climate issues. Each dataset has limitations, such as how recently
|
||||||
|
the data was updated.
|
||||||
|
</Alert>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
19
client/src/components/MapLegend.tsx
Normal file
19
client/src/components/MapLegend.tsx
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const MapLegend = () => {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<dl className={'j40-maplegend'}>
|
||||||
|
<h4>Color Key</h4>
|
||||||
|
<dt className={'mapsquare-a'}> </dt>
|
||||||
|
<dd>Prioritized community</dd>
|
||||||
|
<dt className={'mapsquare-b'}> </dt>
|
||||||
|
<dd>Threshold community</dd>
|
||||||
|
<dt className={'mapsquare-c'}>$nbsp;</dt>
|
||||||
|
<dd>Non-Prioritized community</dd>
|
||||||
|
</dl>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MapLegend;
|
|
@ -3,8 +3,8 @@ import Layout from '../components/layout';
|
||||||
// import MapWrapper from '../components/map';
|
// import MapWrapper from '../components/map';
|
||||||
import MapWrapper from '../components/mapWrapper';
|
import MapWrapper from '../components/mapWrapper';
|
||||||
import HowYouCanHelp from '../components/HowYouCanHelp';
|
import HowYouCanHelp from '../components/HowYouCanHelp';
|
||||||
import {Alert} from '@trussworks/react-uswds';
|
|
||||||
import * as styles from './cejst.module.scss';
|
import * as styles from './cejst.module.scss';
|
||||||
|
import MapLegend from '../components/MapLegend';
|
||||||
|
|
||||||
|
|
||||||
interface IMapPageProps {
|
interface IMapPageProps {
|
||||||
|
@ -17,39 +17,26 @@ const CEJSTPage = ({location}: IMapPageProps) => {
|
||||||
return (
|
return (
|
||||||
<Layout location={location}>
|
<Layout location={location}>
|
||||||
<main id="main-content" role="main">
|
<main id="main-content" role="main">
|
||||||
|
<h2>Just Progress communities</h2>
|
||||||
<p className={styles.disclaimer}>
|
<p className={styles.disclaimer}>
|
||||||
The Climate and Economic Justice Screening Tool helps
|
Just Progress helps identify and prioritize communities across the
|
||||||
identify and prioritize communities across the United
|
United States and U.S. territories that have been historically
|
||||||
States and US territories that have been historically
|
overburdened and underserved. These communities will receive 40% of
|
||||||
overburdened and underserved so that they may receive
|
the benefits from investments in key areas outlined by the
|
||||||
40% of the benefits from investments in six key areas as
|
<a
|
||||||
outlined in the <a
|
|
||||||
href={'https://www.whitehouse.gov/briefing-room/' +
|
href={'https://www.whitehouse.gov/briefing-room/' +
|
||||||
'presidential-actions/2021/01/27/' +
|
'presidential-actions/2021/01/27/' +
|
||||||
'executive-order-on-tackling-the-climate-' +
|
'executive-order-on-tackling-the-climate-' +
|
||||||
'crisis-at-home-and-abroad/'}
|
'crisis-at-home-and-abroad/'}
|
||||||
target={'_blank'}
|
target={'_blank'}
|
||||||
rel={'noreferrer'}>
|
rel={'noreferrer'}>
|
||||||
Executive Order on Tackling the Climate Crisis at Home and
|
Executive Order on Tackling the Climate Crisis at Home and
|
||||||
Abroad</a>.
|
Abroad</a>.
|
||||||
Explore the map below or learn
|
|
||||||
more about the methodology and data indicators used to
|
|
||||||
prioritize Justice40 communities.
|
|
||||||
</p>
|
</p>
|
||||||
<Alert
|
|
||||||
type="warning"
|
|
||||||
heading="Limited Data Sources">
|
|
||||||
<p>
|
|
||||||
In this tool, we are using data sources that our
|
|
||||||
combined by our cumulative impact methodology.
|
|
||||||
Our sources were selected because sit amet,
|
|
||||||
consectetur adipiscing. See all the sources we
|
|
||||||
are investigating on our data roadmap.
|
|
||||||
</p>
|
|
||||||
</Alert>
|
|
||||||
<h2>Explore the Tool</h2>
|
<h2>Explore the Tool</h2>
|
||||||
<MapWrapper/>
|
<MapWrapper/>
|
||||||
<HowYouCanHelp />
|
<MapLegend/>
|
||||||
|
<HowYouCanHelp/>
|
||||||
</main>
|
</main>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
|
|
20
client/src/pages/contact.tsx
Normal file
20
client/src/pages/contact.tsx
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import * as React from 'react';
|
||||||
|
import Layout from '../components/layout';
|
||||||
|
|
||||||
|
interface ContactPageProps {
|
||||||
|
location: Location;
|
||||||
|
}
|
||||||
|
|
||||||
|
const ContactPage = ({location}: ContactPageProps) => {
|
||||||
|
return (<Layout location={location}>
|
||||||
|
<section className={'usa-prose'}>
|
||||||
|
<h1>Contact</h1>
|
||||||
|
<p>
|
||||||
|
<i>Information pending</i>
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ContactPage;
|
|
@ -1,7 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import Layout from '../components/layout';
|
import Layout from '../components/layout';
|
||||||
|
|
||||||
// import {GridContainer, Grid} from '@trussworks/react-uswds';
|
|
||||||
|
|
||||||
// this section seems too verbose? must be a more readable way to do this.
|
// this section seems too verbose? must be a more readable way to do this.
|
||||||
// this inlines the svg as data:image/svg+xml For larger images this
|
// this inlines the svg as data:image/svg+xml For larger images this
|
||||||
|
@ -18,7 +17,8 @@ import pollutionIcon // @ts-ignore
|
||||||
from '/node_modules/uswds/dist/img/usa-icons/severe_weather.svg';
|
from '/node_modules/uswds/dist/img/usa-icons/severe_weather.svg';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import washIcon from '/node_modules/uswds/dist/img/usa-icons/wash.svg';
|
import washIcon from '/node_modules/uswds/dist/img/usa-icons/wash.svg';
|
||||||
|
// @ts-ignore
|
||||||
|
import publicIcon from '/node_modules/uswds/dist/img/usa-icons/public.svg';
|
||||||
|
|
||||||
interface IndexPageProps {
|
interface IndexPageProps {
|
||||||
location: Location;
|
location: Location;
|
||||||
|
@ -27,6 +27,7 @@ interface IndexPageProps {
|
||||||
// markup
|
// markup
|
||||||
const IndexPage = ({location}: IndexPageProps) => {
|
const IndexPage = ({location}: IndexPageProps) => {
|
||||||
const readMoreList: (any | string)[][] = [
|
const readMoreList: (any | string)[][] = [
|
||||||
|
[publicIcon, 'Climate change'],
|
||||||
[ecoIcon, 'Clean energy and energy efficiency'],
|
[ecoIcon, 'Clean energy and energy efficiency'],
|
||||||
[busIcon, 'Clean transit'],
|
[busIcon, 'Clean transit'],
|
||||||
[homeIcon, 'Affordable and sustainable housing'],
|
[homeIcon, 'Affordable and sustainable housing'],
|
||||||
|
|
46
client/src/pages/methodology.tsx
Normal file
46
client/src/pages/methodology.tsx
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
import * as React from 'react';
|
||||||
|
import Layout from '../components/layout';
|
||||||
|
|
||||||
|
interface MethodPageProps {
|
||||||
|
location: Location;
|
||||||
|
}
|
||||||
|
|
||||||
|
// markup
|
||||||
|
const IndexPage = ({location}: MethodPageProps) => {
|
||||||
|
return (<Layout location={location}>
|
||||||
|
<section className={'usa-prose'}>
|
||||||
|
<h1>Methodology</h1>
|
||||||
|
<p>
|
||||||
|
The Just Progress tool combines demographic, environmental, and
|
||||||
|
socio-economic data to generate a cumulative index score, referred to
|
||||||
|
as the Just Progress Index. The tool currently utilizes national,
|
||||||
|
publically-available data from the United States Census Bureau’s
|
||||||
|
American Community Survey (ACS) and the EPA’s EJScreen tool.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
The various inputs into the Just Progress Index are averaged into 2
|
||||||
|
categories: Pollution Burden and Demographics.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Pollution Burden: health risks arising from proximity and potential
|
||||||
|
exposures to pollution and other adverse environmental conditions
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Demographics: sensitive populations and socioeconomic factors that
|
||||||
|
make a community more vulnerable
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<b>Pollution Burden average x Demographics average = Just Progress
|
||||||
|
Index</b>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<h2>Just Progress Index datasets</h2>
|
||||||
|
|
||||||
|
<p><i>Data pending</i></p>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default IndexPage;
|
|
@ -45,7 +45,7 @@ $j40-max-width: 80ex;
|
||||||
.j40-two-column > * {
|
.j40-two-column > * {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
padding-bottom: 1.5em;
|
padding-bottom: 1.2em; /* space between items */
|
||||||
padding-left: 1em;
|
padding-left: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,8 +69,7 @@ $j40-max-width: 80ex;
|
||||||
.j40-header,
|
.j40-header,
|
||||||
.j40-primary-nav,
|
.j40-primary-nav,
|
||||||
.j40-header > li > a {
|
.j40-header > li > a {
|
||||||
background-color: #112f4e; /* todo: move color to theme */
|
color: #112f4e !important;
|
||||||
color: white !important;
|
|
||||||
z-index: 5;
|
z-index: 5;
|
||||||
|
|
||||||
.usa-nav-container {
|
.usa-nav-container {
|
||||||
|
@ -79,7 +78,7 @@ $j40-max-width: 80ex;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
// make sure the open close chevron is colored correctly
|
// make sure the open close chevron is colored correctly
|
||||||
color: white;
|
color: #112f4e;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is the title
|
// this is the title
|
||||||
|
@ -88,25 +87,14 @@ $j40-max-width: 80ex;
|
||||||
font-family: "serif";
|
font-family: "serif";
|
||||||
}
|
}
|
||||||
|
|
||||||
.usa-current::after,
|
|
||||||
:hover::after {
|
|
||||||
background-color: #2491ff !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
// menu item font
|
// menu item font
|
||||||
.usa-nav__primary {
|
.usa-nav__primary {
|
||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
// invert the hover color so contrast stays good enough for accessibility
|
.byline {
|
||||||
.usa-nav__primary a:not(.usa-button):hover {
|
font-size: .4em;
|
||||||
background-color: #2491ff !important;
|
font-weight: normal;
|
||||||
}
|
|
||||||
|
|
||||||
// this is the closebox, it's not easy to change the X color, so we change
|
|
||||||
// the background to keep it's contrast high
|
|
||||||
.usa-nav__close {
|
|
||||||
background-color: white;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,10 +183,44 @@ $j40-max-width: 80ex;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
padding-top: 0;
|
padding-top: 7px;
|
||||||
padding-bottom: 0;
|
padding-bottom: 7px;
|
||||||
|
min-height: 4em;
|
||||||
|
|
||||||
.usa-alert:before {
|
* + .usa-alert {
|
||||||
margin-top: 12px !important;
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.j40-maplegend {
|
||||||
|
dt {
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid #282828;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
vertical-align: top;
|
||||||
|
padding-top: 0.1em;
|
||||||
|
|
||||||
|
display: inline-block;
|
||||||
|
width: 12em;
|
||||||
|
margin: 0 0 0 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapsquare-a {
|
||||||
|
background-color: #1A4480;
|
||||||
|
color: #1A4480;
|
||||||
|
}
|
||||||
|
.mapsquare-b {
|
||||||
|
background-color: #a9a9aa;
|
||||||
|
color: #a9a9aa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mapsquare-c {
|
||||||
|
background-color: #ecececff;
|
||||||
|
color: #ecececff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue