mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-27 13:51:39 -07:00
Basic Layout (#80)
* Basic Layout - Merge with main into new branch - Most of main content and footer working. - Could not get fixed branch of trussworks to `npm install` correctly, so reverted back to public version. (`trussworks/react-uswds#kh-serverside-rendering-fix-1250"`) TODO: - stack sgv warning+cloud icons - get timeline image (which as text that needs to scale) - localization support - move icon includes out of header? - start converting elements over to trussworks * Cleanup - removed unused styles - added some better comments * Revert trussworks to fixed branch * Update package-lock.json * Temporarily pointing toward personal fork until SSR issue has been addressed * Update J40Footer.spec.tsx.snap * setting jestEnvironment to the proper 'jsdom' value, needed for snapshot tests * lingering prettier fix * small version bump Co-authored-by: Nat Hillard <Nathaniel.K.Hillard@omb.eop.gov>
This commit is contained in:
parent
ce7245b1a2
commit
3ca4ca9e6d
8 changed files with 2679 additions and 194 deletions
|
@ -1,15 +1,66 @@
|
|||
import React from 'react';
|
||||
import {Footer} from '@trussworks/react-uswds';
|
||||
import {Link} from 'gatsby-plugin-intl';
|
||||
|
||||
const footerLinks = [
|
||||
<Link to="/" key="/">Home</Link>,
|
||||
];
|
||||
import {Footer, Logo, FooterNav, Address} from '@trussworks/react-uswds';
|
||||
// @ts-ignore
|
||||
import whitehouseIcon from '../images/eop-seal.svg';
|
||||
|
||||
const J40Footer = () => {
|
||||
return (
|
||||
<>
|
||||
<Footer primary={[]} secondary={footerLinks} />
|
||||
<Footer
|
||||
size="big"
|
||||
primary={<></>}
|
||||
secondary={<FooterNav
|
||||
aria-label="Footer navigation"
|
||||
size="big" // fyi you leave this off and it silently fails... lovely
|
||||
className={'nobreak'}
|
||||
links={[
|
||||
[
|
||||
'Agency Partners',
|
||||
<a href="https://www.epa.gov/" target="_blank" rel="noreferrer"
|
||||
key={'epalink'}>Environmental Protection Agency</a>,
|
||||
<a href="https://www.whitehouse.gov/omb" target="_blank"
|
||||
rel="noreferrer" key={'whitehouselink'}>Office of Management
|
||||
and Budget</a>,
|
||||
<a href="https://www.energy.gov/" target="_blank" rel="noreferrer"
|
||||
key={'energylink'}>Department of Energy</a>,
|
||||
<a href="https://www.hud.gov/" target="_blank" rel="noreferrer"
|
||||
key={'hudlink'}>Department of Housing and Urban
|
||||
Development</a>,
|
||||
],
|
||||
[
|
||||
'More Information',
|
||||
<a href="https://www.whitehouse.gov/" target="_blank"
|
||||
rel="noreferrer"
|
||||
key={'whitehouselink2'}>Whitehouse.gov</a>,
|
||||
<a href="#" key={'accessibilitylink'}>Accessibility Statement</a>,
|
||||
<a href="#" key={'privacylink'}>Privacy, Policies, and Legal
|
||||
Information</a>,
|
||||
],
|
||||
// eslint-disable-next-line react/jsx-key
|
||||
[<br/>,
|
||||
<Logo
|
||||
size="medium"
|
||||
key={'logoimg'}
|
||||
image={
|
||||
<img className={'usa-footer__logo-img'} src={whitehouseIcon}
|
||||
alt="Whitehouse logo"/>
|
||||
}
|
||||
/>,
|
||||
],
|
||||
[
|
||||
<>Council on Environmental Quality<br/></>,
|
||||
<Address className={'footerAddressReadability'}
|
||||
key={'footeraddress'}
|
||||
items={[
|
||||
'730 Jackson Pl NW',
|
||||
'Washington, D.C. 20506',
|
||||
'(202) 395-5750',
|
||||
]}
|
||||
/>,
|
||||
],
|
||||
]}
|
||||
/>}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
exports[`J40Footer renders correctly 1`] = `
|
||||
Array [
|
||||
<footer
|
||||
className="usa-footer"
|
||||
className="usa-footer usa-footer--big"
|
||||
>
|
||||
<div
|
||||
className="usa-footer__primary-section"
|
||||
|
@ -14,12 +14,202 @@ Array [
|
|||
<div
|
||||
className="grid-container"
|
||||
>
|
||||
<a
|
||||
href="/en/"
|
||||
onClick={[Function]}
|
||||
<nav
|
||||
aria-label="Footer navigation"
|
||||
className="usa-footer__nav nobreak"
|
||||
>
|
||||
Home
|
||||
</a>
|
||||
<div
|
||||
className="grid-row grid-gap-4"
|
||||
>
|
||||
<div
|
||||
className="mobile-lg:grid-col-6 desktop:grid-col-3"
|
||||
>
|
||||
<section
|
||||
className="usa-footer__primary-content usa-footer__primary-content--collapsible"
|
||||
>
|
||||
<h4
|
||||
className="usa-footer__primary-link"
|
||||
>
|
||||
Agency Partners
|
||||
</h4>
|
||||
<ul
|
||||
className="usa-list usa-list--unstyled"
|
||||
>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="https://www.epa.gov/"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Environmental Protection Agency
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="https://www.whitehouse.gov/omb"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Office of Management and Budget
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="https://www.energy.gov/"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Department of Energy
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="https://www.hud.gov/"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Department of Housing and Urban Development
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<div
|
||||
className="mobile-lg:grid-col-6 desktop:grid-col-3"
|
||||
>
|
||||
<section
|
||||
className="usa-footer__primary-content usa-footer__primary-content--collapsible"
|
||||
>
|
||||
<h4
|
||||
className="usa-footer__primary-link"
|
||||
>
|
||||
More Information
|
||||
</h4>
|
||||
<ul
|
||||
className="usa-list usa-list--unstyled"
|
||||
>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="https://www.whitehouse.gov/"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
Whitehouse.gov
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
>
|
||||
Accessibility Statement
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<a
|
||||
href="#"
|
||||
>
|
||||
Privacy, Policies, and Legal Information
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<div
|
||||
className="mobile-lg:grid-col-6 desktop:grid-col-3"
|
||||
>
|
||||
<section
|
||||
className="usa-footer__primary-content usa-footer__primary-content--collapsible"
|
||||
>
|
||||
<h4
|
||||
className="usa-footer__primary-link"
|
||||
>
|
||||
<br />
|
||||
</h4>
|
||||
<ul
|
||||
className="usa-list usa-list--unstyled"
|
||||
>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<div
|
||||
className="usa-footer__logo grid-row mobile-lg:grid-col-6 mobile-lg:grid-gap-2"
|
||||
data-testid="footerLogo"
|
||||
>
|
||||
<div
|
||||
className="mobile-lg:grid-col-auto"
|
||||
>
|
||||
<img
|
||||
alt="Whitehouse logo"
|
||||
className="usa-footer__logo-img"
|
||||
src="test-file-stub"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
<div
|
||||
className="mobile-lg:grid-col-6 desktop:grid-col-3"
|
||||
>
|
||||
<section
|
||||
className="usa-footer__primary-content usa-footer__primary-content--collapsible"
|
||||
>
|
||||
<h4
|
||||
className="usa-footer__primary-link"
|
||||
>
|
||||
Council on Environmental Quality
|
||||
<br />
|
||||
</h4>
|
||||
<ul
|
||||
className="usa-list usa-list--unstyled"
|
||||
>
|
||||
<li
|
||||
className="usa-footer__secondary-link"
|
||||
>
|
||||
<address
|
||||
className="usa-footer__address footerAddressReadability"
|
||||
>
|
||||
<div
|
||||
className="usa-footer__contact-info grid-row grid-gap"
|
||||
>
|
||||
<div
|
||||
className=""
|
||||
>
|
||||
730 Jackson Pl NW
|
||||
</div>
|
||||
<div
|
||||
className=""
|
||||
>
|
||||
Washington, D.C. 20506
|
||||
</div>
|
||||
<div
|
||||
className=""
|
||||
>
|
||||
(202) 395-5750
|
||||
</div>
|
||||
</div>
|
||||
</address>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</footer>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue