-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add footer #121
base: main
Are you sure you want to change the base?
Add footer #121
Changes from 9 commits
03a7e5f
ee1e45e
05495bc
9c11287
0ee94c0
fec0f01
e616605
ef46ada
7a93654
20af1a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#App { | ||
display: flex; | ||
flex-direction: column; | ||
min-height: 100vh; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.App-footer { | ||
width: 100%; | ||
min-height: 5rem; | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
font-size: 1.25rem; | ||
background-color: var(--cfa-purple-dark); | ||
|
||
p { | ||
color: var(--cfa-white); | ||
font-family: var(--font-family-text); | ||
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. This doesn't seem necessary and it should probably inherit from the rest of the document, so maybe worth removing. |
||
margin-left: 1.0rem; | ||
margin-right: 1.0rem; | ||
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. The links in here have a hover color that blends into the background. Changing that could be a more accessibility friendly improvement. |
||
} | ||
|
||
@media only screen and (max-width: 800px) { | ||
.p { | ||
margin-right: auto; | ||
margin-left: auto; | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react'; | ||
import Footer from './Footer'; | ||
|
||
describe('Footer: <Footer />', () => { | ||
it('should contain a link to open a bug report', function () { | ||
const { getByText } = render(<Footer />); | ||
expect(getByText('bug report').closest('a')).toHaveAttribute( | ||
'href', | ||
'https://github.com/codeforamerica/brigade-project-index-statusboard/issues/new?assignees=&labels=&template=bug_report.md&title=' | ||
); | ||
}); | ||
|
||
it('should contain a link to open a feature request', function () { | ||
const { getByText } = render(<Footer />); | ||
expect(getByText('feature request').closest('a')).toHaveAttribute( | ||
'href', | ||
'https://github.com/codeforamerica/brigade-project-index-statusboard/issues/new?assignees=&labels=&template=feature_request.md&title=' | ||
); | ||
}); | ||
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. Do you also want to make sure the link to the repository is there? 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. I think I am skipping it, I am not sure that I want the GitHub repository link at all :/ |
||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from 'react'; | ||
import './Footer.scss'; | ||
|
||
const submitBugReport = | ||
'https://github.com/codeforamerica/brigade-project-index-statusboard/issues/new?assignees=&labels=&template=bug_report.md&title='; | ||
const submitFeatureRequest = | ||
'https://github.com/codeforamerica/brigade-project-index-statusboard/issues/new?assignees=&labels=&template=feature_request.md&title='; | ||
const githubRepository = | ||
'https://github.com/codeforamerica/brigade-project-index-statusboard'; | ||
|
||
export default function Footer(): JSX.Element { | ||
return ( | ||
<footer className="App-footer"> | ||
<p> | ||
Submit a <a href={submitBugReport}>bug report</a> or{' '} | ||
<a href={submitFeatureRequest}>feature request</a> to our GitHub{' '} | ||
<a href={githubRepository}>repository</a> | ||
</p> | ||
</footer> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ body { | |
margin: 0; | ||
padding: 0; | ||
font-size: 1.25rem; | ||
padding-bottom: 3rem; | ||
} | ||
|
||
a { | ||
|
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.
These don't seem to have an effect. Maybe worth thinking about removing them.
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.
Also, I tend to prefer that the space an element takes up be determined by padding, etc. Using height can be hard to debug for a new person later.