This repository has been archived by the owner on Jan 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Table heading css #143
Merged
Merged
Table heading css #143
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
757a46b
updates to styling of header (including progress steps) and improve l…
awolfe76 cc308f9
better spacing; use an ordered list for progress
awolfe76 31982fe
more cleanup on headings
awolfe76 0747c17
make sure nationwide is capitalized
awolfe76 1caa80c
better break with an hr
awolfe76 130f2c0
adjust spacing
awolfe76 0f1339c
add hr to aggregate too
awolfe76 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.header { | ||
h1, | ||
h2, | ||
h3, | ||
h4 { | ||
margin-bottom: 0; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,62 +91,74 @@ class Disclosure extends React.Component { | |
institution && (institution.institutionId || institution.id) | ||
const header = ( | ||
<Header | ||
type={2} | ||
type={1} | ||
headingText="Disclosure reports" | ||
paragraphText="These reports summarize lending activity for individual | ||
institutions, both nationwide and by MSA/MD." | ||
/> | ||
) | ||
|
||
return this.state.fetched ? ( | ||
<> | ||
<React.Fragment> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another fragment |
||
<div className="usa-grid" id="main-content"> | ||
{header} | ||
|
||
{params.institutionId ? ( | ||
<> | ||
<ProgressCard | ||
title="institution" | ||
name={institution.name} | ||
id={institution.respondentId} | ||
link={`/disclosure-reports/${params.year}`} | ||
/> | ||
<ol className="ProgressCards usa-grid-full"> | ||
<li> | ||
<ProgressCard | ||
title="institution" | ||
name={institution.name} | ||
id={institution.respondentId} | ||
link={`/disclosure-reports/${params.year}`} | ||
/> | ||
</li> | ||
|
||
{params.msaMdId ? ( | ||
<> | ||
<li> | ||
<ProgressCard | ||
title="MSA/MD" | ||
name={msaMd.name} | ||
id={msaMd.id} | ||
link={`/disclosure-reports/${params.year}/${institutionId}`} | ||
/> | ||
{params.reportId ? ( | ||
<> | ||
<ProgressCard | ||
title="report" | ||
name={report.name} | ||
id={report.id} | ||
link={`/disclosure-reports/${ | ||
params.year | ||
}/${institutionId}/${msaMd.id}`} | ||
/> | ||
</> | ||
) : ( | ||
<Reports {...this.props} /> | ||
)} | ||
</> | ||
) : ( | ||
<MsaMds | ||
{...this.props} | ||
fetchedMsas={fetchedMsas} | ||
selectorCallback={this.setMsaMd} | ||
/> | ||
)} | ||
</> | ||
</li> | ||
) : null} | ||
|
||
{params.reportId ? ( | ||
<li> | ||
<ProgressCard | ||
title="report" | ||
name={report.name} | ||
id={report.id} | ||
link={`/disclosure-reports/${ | ||
params.year | ||
}/${institutionId}/${msaMd.id}`} | ||
/> | ||
</li> | ||
) : null} | ||
</ol> | ||
) : null} | ||
|
||
{params.institutionId ? ( | ||
params.msaMdId ? ( | ||
params.reportId ? null : ( | ||
<Reports {...this.props} /> | ||
) | ||
) : ( | ||
<MsaMds | ||
{...this.props} | ||
fetchedMsas={fetchedMsas} | ||
selectorCallback={this.setMsaMd} | ||
/> | ||
) | ||
) : ( | ||
<SearchList makeListItem={this.makeListItem} /> | ||
)} | ||
</div> | ||
|
||
{params.reportId ? <Report {...this.props} /> : null} | ||
</> | ||
</React.Fragment> | ||
) : ( | ||
<LoadingIcon /> | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
import React from 'react' | ||
import { Link } from 'react-router-dom' | ||
import Header from '../common/Header.jsx' | ||
|
||
const capitalize = str => str[0].toUpperCase() + str.slice(1) | ||
const ProgressCard = ({ name, id, link, title }) => { | ||
if (id === 'nationwide') { | ||
name = '' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A |
||
id = capitalize(id) | ||
} else { | ||
name = name + ' - ' | ||
} | ||
|
||
return ( | ||
<div className="ProgressCard usa-width-one-third"> | ||
<h5>{capitalize(title)}</h5> | ||
<div> | ||
{name} | ||
{id} | ||
</div> | ||
<Link to={link}>Select a different {title}</Link> | ||
<div className="ProgressCard"> | ||
<Header | ||
type={4} | ||
headingText={title} | ||
paragraphText={name + id} | ||
headingLink={link} | ||
/> | ||
</div> | ||
) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
.ProgressCard { | ||
background: $color-gray-lightest; | ||
padding: 0.5em; | ||
margin-bottom: 1em; | ||
.ProgressCards { | ||
margin-bottom: 2em !important; | ||
margin-left: 1em; | ||
.ProgressCard { | ||
.header { | ||
margin-bottom: 0; | ||
h4 { | ||
margin-top: 0; | ||
text-transform: capitalize; | ||
} | ||
} | ||
} | ||
|
||
h5 { | ||
margin-bottom: 0.25em; | ||
li { | ||
float: left; | ||
margin-right: 2.35765%; | ||
width: 31.76157%; | ||
&:last-child { | ||
margin-right: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for the reintroduction of the longer fragment syntax?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really ... the
<>
way causes my editor (Sublime) to do odd things and makes it hard to read.