j40-cejst-2/client/src/pages/methodology.tsx
Vim 226017654a
Implement downloads page and May 25th timed copy changes (#1653)
* Add initial side nav

* Add Download page as a sub-page under Meth&Data

- udpate S3 file path in .envs
- remove the DownloadPacket component
- move download copy from methodology to download
- modify header to use two types of navs:
--  mobile (with sub-pages) and
-- desktop (without subpages)
- create a SubPageNav component
- add SubPagNav to Meth and Download page
- update snapshots
- add global CSS overide to remove minus sign on mobile nav link accordion as it's permanently open

* Remove the update tag above Public eng button

* Make the 3rd bullet on explore page update on 5/25

* Make the RFI box text change after 5/25/22

* Update site with RFI expired copy, remove Alerts

- add Spanish translations
- update snapshots

* Fix typo on XLS file path

* Refactor HowYouCanHelp to standard form

* Add custom download links with icons

- add new DownloadLink compnent
- add Spanish translations

* Update download file sizes

* Allow meth&data nav link to collapse on mobile
2022-05-25 21:01:04 -07:00

76 lines
2.2 KiB
TypeScript

import * as React from 'react';
import {Grid} from '@trussworks/react-uswds';
import {useIntl} from 'gatsby-plugin-intl';
import Categories from '../components/Categories';
import DatasetContainer from '../components/DatasetContainer';
import J40MainGridContainer from '../components/J40MainGridContainer';
import MethodologyFormula from '../components/MethodologyFormula';
import Layout from '../components/layout';
import PublicEngageButton from '../components/PublicEngageButton';
import SubPageNav from '../components/SubPageNav';
import {useWindowSize} from 'react-use';
import * as CONSTANTS from '../data/constants';
import * as METHODOLOGY_COPY from '../data/copy/methodology';
interface MethodPageProps {
location: Location;
}
const IndexPage = ({location}: MethodPageProps) => {
const intl = useIntl();
const {width} = useWindowSize();
return (
<Layout location={location} title={intl.formatMessage(METHODOLOGY_COPY.PAGE.TILE)}>
<J40MainGridContainer>
<section className={'page-heading'}>
<h1>{intl.formatMessage(METHODOLOGY_COPY.PAGE.HEADING)}</h1>
<PublicEngageButton />
</section>
<Grid row gap className={'j40-mb5-mt3'}>
{/* First column */}
<Grid col={12} tablet={{col: 8}}>
<section>
<p>
{intl.formatMessage(METHODOLOGY_COPY.PAGE.DESCRIPTION)}
</p>
</section>
{/* Formula section */}
<MethodologyFormula />
{/* Category description */}
<section>
<p>
{intl.formatMessage(METHODOLOGY_COPY.PAGE.CATEGORY_TEXT)}
</p>
</section>
</Grid>
{/* Second column */}
<Grid col={12} tablet={{col: 1}}>
{/* Spacer column */}
</Grid>
{/* Third column */}
{width > CONSTANTS.USWDS_BREAKPOINTS.DESKTOP ?
<Grid col={12} tablet={{col: 3}}>
<SubPageNav activeSubPageIndex={1}/>
</Grid> : ''}
</Grid>
</J40MainGridContainer>
<Categories />
<DatasetContainer/>
</Layout>
);
};
export default IndexPage;