More layout fixes (#94)

* More layout fixes
* Get aside flush with top/bottom
* Media change iconlist to one column on mobile
* Misc other fixes
* convert className to use React syntax consistently.
* Update J40Footer.spec.tsx.snap
TODO: body font need to be addressed at the theme level?
This commit is contained in:
TomNUSDS 2021-06-04 07:36:16 -07:00 committed by GitHub
parent 55d6e6635b
commit 63d33b40d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 35 deletions

View file

@ -67,8 +67,7 @@ const J40Footer = () => {
alt={'Whitehouse logo'}/> alt={'Whitehouse logo'}/>
} }
heading={<p heading={<p
className={'usa-footer__logo-heading ' + className={' j40-footer-logo-heading'}>
' j40-footer-logo-heading'}>
Council on Environmental Quality</p>} Council on Environmental Quality</p>}
/> />
</>, </>,

View file

@ -180,7 +180,7 @@ exports[`J40Footer renders correctly 1`] = `
class="grid-col-auto" class="grid-col-auto"
> >
<p <p
class="usa-footer__logo-heading j40-footer-logo-heading" class=" j40-footer-logo-heading"
> >
Council on Environmental Quality Council on Environmental Quality
</p> </p>

View file

@ -38,13 +38,13 @@ const IndexPage = () => {
return ( return (
<Layout> <Layout>
<main id="main-content" role="main"> <main id="main-content" role="main">
<section className="grid-container usa-section"> <div className={'grid-row grid-gap-2'}>
<div className="grid-row grid-gap-2"> <section className={'grid-container usa-section'}>
<div className={'desktop:grid-col'}>
<div className="desktop:grid-col"> <div className={'grid-row grid-gap'}>
<div className="grid-row grid-gap">
<div <div
className="usa-prose text-asset-container"> className={'usa-prose text-asset-container'}>
<h2>About Justice40</h2> <h2>About Justice40</h2>
<p> <p>
In an effort to address historical environmental injustices, In an effort to address historical environmental injustices,
@ -83,22 +83,22 @@ const IndexPage = () => {
</div> </div>
</div> </div>
<div className="tablet:grid-col-10"> <div className={'grid-gap j40-two-column-confine'}>
<h4>Areas of Focus</h4> <h4>Areas of Focus</h4>
<ul className="usa-icon-list j40-two-column"> <ul className={'usa-icon-list j40-two-column'}>
{readMoreList.map((item, index) => { {readMoreList.map((item, index) => {
return ( return (
<li <li
key={`readmore_li_${index}`} key={`readmore_li_${index}`}
className="usa-icon-list__item"> className={'usa-icon-list__item'}>
<div className="usa-icon-list__icon"> <div className={'usa-icon-list__icon'}>
<img <img
className="j40-two-column-icons-spacing" className={'j40-two-column-icons-spacing'}
key={`readmore_img_${index}`} key={`readmore_img_${index}`}
src={item[0]} alt={item[1] + ' icon'}/> src={item[0]} alt={item[1] + ' icon'}/>
</div> </div>
<div <div
className="usa-icon-list__content"> {item[1]} </div> className={'usa-icon-list__content'}> {item[1]} </div>
</li> </li>
); );
}) })
@ -106,11 +106,9 @@ const IndexPage = () => {
</ul> </ul>
</div> </div>
<div className={'grid-row grid-gap'}>
<div className="grid-row grid-gap">
<div <div
className="desktop:grid-col-10 \ className={'usa-prose text-asset-container'}>
usa-prose text-asset-container">
<h4>A Transparent, Community-First Approach</h4> <h4>A Transparent, Community-First Approach</h4>
<p> <p>
@ -153,32 +151,35 @@ const IndexPage = () => {
</div> </div>
</div> </div>
</div> </div>
</section>
{/* aside */} {/* aside */}
<aside <aside
aria-labelledby="left-sidebar" aria-labelledby="left-sidebar"
className="desktop:grid-col-3 usa-prose grid-gap j40-aside" className={'j40-aside desktop:grid-col-3'}
id="left-sidebar"> id="left-sidebar">
<h2 className={'usa-graphic-list__heading'}>Get Involved</h2> <section
<h3> className={'usa-prose grid-gap grid-container usa-section'}>
<h3 className={'j40-aside-title'}>Get Involved</h3>
<h5>
<img <img
className={'flex-align-self-center width-5'} src={chatIcon} className={'flex-align-self-center width-4'} src={chatIcon}
alt={'chat icon'}/> alt={'chat icon'}/>
<br/> <br/>
Send Feedback Send Feedback
</h3> </h5>
<p>Have ideas about how to acknowledge the on-the-ground <p>Have ideas about how to acknowledge the on-the-ground
experiences of your community? experiences of your community?
</p> </p>
Email: <a href="mailto: justice40open@usds.gov"> Email: <a href="mailto: justice40open@usds.gov">
justice40open@usds.gov</a> justice40open@usds.gov</a>
<p>&nbsp;</p> <p>&nbsp;</p>
<h3> <h5>
<img <img
className={'flex-align-self-center width-5'} className={'flex-align-self-center width-4'}
src={githubIcon} alt={'github icon'}/> src={githubIcon} alt={'github icon'}/>
<br/> <br/>
Join the open source community</h3> Join the open source community</h5>
<p> <p>
Justice40s code is open source, which means it is available for Justice40s code is open source, which means it is available for
the public to view and contribute. Anyone can view and the public to view and contribute. Anyone can view and
@ -192,10 +193,10 @@ const IndexPage = () => {
rel={'noreferrer'} rel={'noreferrer'}
key={'github3'}>Check it out on GitHub</a> key={'github3'}>Check it out on GitHub</a>
</p> </p>
</section>
</aside> </aside>
</div> </div>
</section>
</main> </main>
</Layout> </Layout>
); );

View file

@ -3,9 +3,16 @@
.j40-two-column { .j40-two-column {
overflow: hidden; overflow: hidden;
padding: 0;
@media (min-width: 768px) {
column-count: 2; column-count: 2;
column-gap: 1em; column-gap: 1em;
padding: 0; }
@media (max-width: 768px) {
column-count: 1;
column-gap: 0;
}
} }
.j40-two-column > * { .j40-two-column > * {
@ -21,6 +28,10 @@
max-width: revert; max-width: revert;
} }
.j40-two-column-confine {
max-width: fit-content;
}
.j40-header { .j40-header {
background-color: #112f4e; /* todo: move color to theme */ background-color: #112f4e; /* todo: move color to theme */
color: white; color: white;
@ -28,12 +39,17 @@
.j40-title { .j40-title {
font-size: xx-large; font-size: xx-large;
font-family: "Merriweather Web";
} }
.j40-aside { .j40-aside {
background-color: #eff6fb; background-color: #eff6fb;
} }
.j40-aside-title {
padding-bottom: 1em;
}
.j40-footer-logo { .j40-footer-logo {
display: inline-block; display: inline-block;
text-align: center; text-align: center;