fix #249 header 2 (#425)

* Header updates
* More pixel alignment for nav
* Update unit test snapshots
I removed a stray `,` from `testHelpers.tsx` which changed the output of several snapshots.
* Fixes from PR review
* Forgot to update snapshots after merge with main
* Removed unused (and outdated) timeline page
* Updated some translation descriptions.
This commit is contained in:
TomNUSDS 2021-08-02 07:48:19 -07:00 committed by GitHub
commit 08e21e5d5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 299 additions and 27282 deletions

View file

@ -2,9 +2,9 @@ import React, {ReactNode} from 'react';
import {GridContainer, Grid} from '@trussworks/react-uswds';
import J40Header from './J40Header';
import J40Footer from './J40Footer';
import J40Aside from '../components/J40Aside';
import {URLFlagProvider} from '../contexts/FlagContext';
// this has to be wrong
import {Helmet} from 'react-helmet';
import {useIntl} from 'gatsby-plugin-intl';
interface ILayoutProps {
children: ReactNode,
@ -12,23 +12,23 @@ interface ILayoutProps {
}
const Layout = ({children, location}: ILayoutProps) => {
const isWidthFullPage = location.pathname.match(/cejst\/?/);
const conditionalAside = isWidthFullPage ? <></> : <J40Aside/>;
const gridCssClass = isWidthFullPage ? ' desktop:grid-col-12' :
'desktop:grid-col-9';
const intl = useIntl();
// @ts-ignore
return (
<URLFlagProvider location={location}>
<Helmet htmlAttributes={{lang: intl.locale}}>
<meta charSet="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</Helmet>
<J40Header/>
<GridContainer containerSize={'desktop-lg'}
className={'j40-grid-container'}>
<Grid row>
<main id={'main-content'}
className={'usa-layout-docs j40-main-content ' + gridCssClass}>
className={'usa-layout-docs j40-main-content desktop:grid-col-12'}>
{children}
</main>
{conditionalAside}
</Grid>
</GridContainer>
<J40Footer/>