-
Notifications
You must be signed in to change notification settings - Fork 16
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 /> component #47
Open
kryptokinght
wants to merge
10
commits into
GirlScriptSummerOfCode:master
Choose a base branch
from
kryptokinght:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f45a5e5
add plugin zeit/next-css
kryptokinght ebf979d
configured jest to handle stylesheets
kryptokinght ef83ea2
created basic template for <Footer /> component
kryptokinght ccea92e
add footer to document
kryptokinght ed25c4c
Merge remote-tracking branch 'upstream/master'
kryptokinght e2d84ba
basic version of footer completed
kryptokinght 498d411
updated snapshot
kryptokinght c022ebf
solved indentation problem
kryptokinght 2032393
removed @zeit/next-css, added css inside component js file itself
kryptokinght aacbc2b
update snapshot
kryptokinght 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,247 @@ | ||
import { Fragment, PureComponent } from 'react'; | ||
import Link from 'next/link'; | ||
|
||
|
||
export default class Footer extends PureComponent { | ||
render() { | ||
return ( | ||
<Fragment> | ||
<style jsx>{` | ||
.footer-distributed { | ||
background-color: #292c2f; | ||
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12); | ||
box-sizing: border-box; | ||
width: 100%; | ||
text-align: left; | ||
font: bold 16px sans-serif; | ||
|
||
padding: 55px 50px; | ||
margin-top: 80px; | ||
} | ||
|
||
.footer-distributed .footer-left, | ||
.footer-distributed .footer-center, | ||
.footer-distributed .footer-right { | ||
display: inline-block; | ||
vertical-align: top; | ||
} | ||
|
||
/* Footer left */ | ||
|
||
.footer-distributed .footer-left { | ||
width: 40%; | ||
} | ||
|
||
/* The company logo */ | ||
|
||
.footer-distributed h3 { | ||
color: #ffffff; | ||
font: normal 36px 'Cookie', cursive; | ||
margin: 0; | ||
} | ||
|
||
.footer-distributed h3 span { | ||
color: #5383d3; | ||
} | ||
|
||
/* Footer links */ | ||
|
||
.footer-distributed .footer-links { | ||
color: #ffffff; | ||
margin: 20px 0 12px; | ||
padding: 0; | ||
} | ||
|
||
.footer-distributed .footer-links a { | ||
display: inline-block; | ||
line-height: 1.8; | ||
text-decoration: none; | ||
color: inherit; | ||
} | ||
|
||
.footer-distributed .footer-company-name { | ||
color: #8f9296; | ||
font-size: 14px; | ||
font-weight: normal; | ||
margin: 0; | ||
} | ||
|
||
/* Footer Center */ | ||
|
||
.footer-distributed .footer-center { | ||
width: 35%; | ||
} | ||
|
||
.footer-distributed .footer-center i { | ||
background-color: #33383b; | ||
color: #ffffff; | ||
font-size: 25px; | ||
width: 38px; | ||
height: 38px; | ||
border-radius: 50%; | ||
text-align: center; | ||
line-height: 42px; | ||
margin: 10px 15px; | ||
vertical-align: middle; | ||
} | ||
|
||
.footer-distributed .footer-center i.fa-envelope { | ||
font-size: 17px; | ||
line-height: 38px; | ||
} | ||
|
||
.footer-distributed .footer-center p { | ||
display: inline-block; | ||
color: #ffffff; | ||
vertical-align: middle; | ||
margin: 0; | ||
} | ||
|
||
.footer-distributed .footer-center p span { | ||
display: block; | ||
font-weight: normal; | ||
font-size: 14px; | ||
line-height: 2; | ||
} | ||
|
||
.footer-distributed .footer-center p a { | ||
color: #5383d3; | ||
text-decoration: none; | ||
} | ||
|
||
/* Footer Right */ | ||
|
||
.footer-distributed .footer-right { | ||
width: 20%; | ||
} | ||
|
||
.footer-distributed .footer-company-about { | ||
line-height: 20px; | ||
color: #92999f; | ||
font-size: 13px; | ||
font-weight: normal; | ||
margin: 0; | ||
} | ||
|
||
.footer-distributed .footer-company-about span { | ||
display: block; | ||
color: #ffffff; | ||
font-size: 14px; | ||
font-weight: bold; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.footer-distributed .footer-icons { | ||
margin-top: 25px; | ||
} | ||
|
||
.footer-distributed .footer-icons a { | ||
display: inline-block; | ||
width: 35px; | ||
height: 35px; | ||
cursor: pointer; | ||
background-color: #33383b; | ||
border-radius: 2px; | ||
|
||
font-size: 20px; | ||
color: #ffffff; | ||
text-align: center; | ||
line-height: 35px; | ||
|
||
margin-right: 3px; | ||
margin-bottom: 5px; | ||
} | ||
|
||
/* If you don't want the footer to be responsive, remove these media queries */ | ||
|
||
@media (max-width: 880px) { | ||
.footer-distributed { | ||
font: bold 14px sans-serif; | ||
} | ||
|
||
.footer-distributed .footer-left, | ||
.footer-distributed .footer-center, | ||
.footer-distributed .footer-right { | ||
display: block; | ||
width: 100%; | ||
margin-bottom: 40px; | ||
text-align: center; | ||
} | ||
|
||
.footer-distributed .footer-center i { | ||
margin-left: 0; | ||
} | ||
} | ||
|
||
`}</style> | ||
<footer className="footer-distributed"> | ||
<div className="footer-left"> | ||
<h3> | ||
UPAY<span>logo</span> | ||
</h3> | ||
|
||
<p className="footer-links"> | ||
<Link href="/"> | ||
<a>Home</a> | ||
</Link> | ||
· | ||
<Link href="/about"> | ||
<a>About</a> | ||
</Link> | ||
</p> | ||
|
||
<p className="footer-company-name">UPAY NGO © 2016</p> | ||
</div> | ||
|
||
<div className="footer-center"> | ||
<div> | ||
<i className="fa fa-map-marker" /> | ||
<p> | ||
<span>205, Honey Sagar Apartments,</span> | ||
<span>Wardhman Nagar Square,</span> | ||
Nagpur, 440008, Maharashtra | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<i className="fa fa-phone" /> | ||
<p>7030735531</p> | ||
</div> | ||
|
||
<div> | ||
<i className="fa fa-envelope" /> | ||
<p> | ||
<a href="mailto:info@upay.org.in">info@upay.org.in</a> | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div className="footer-right"> | ||
<p className="footer-company-about"> | ||
<span>About the company</span> | ||
The foundation of development for every society is the education | ||
of its youth. Keeping this in mind, an NGO UPAY (Underprivileged | ||
Advancement by Youth), was established in May 2010 by a group of | ||
young engineers from IITs and NITs. | ||
</p> | ||
|
||
<div className="footer-icons"> | ||
<a href="https://www.facebook.com/UPAY-%E0%A4%89%E0%A4%AA%E0%A4%BE%E0%A4%AF-245407178844117/?fref=ts"> | ||
<i className="fa fa-facebook" /> | ||
</a> | ||
<a href="https://twitter.com/upayorg"> | ||
<i className="fa fa-twitter" /> | ||
</a> | ||
<a href="https://www.youtube.com/results?search_query=upay+ngo"> | ||
<i className="fa fa-youtube" /> | ||
</a> | ||
<a href="https://www.instagram.com/ngo_upay/"> | ||
<i className="fa fa-instagram" /> | ||
</a> | ||
</div> | ||
</div> | ||
</footer> | ||
</Fragment> | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# <Footer /> | ||
|
||
Footer shows contact info and social links | ||
|
||
```jsx | ||
<Footer /> | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* globals describe, it, expect */ | ||
import React from 'react'; | ||
import { mount } from 'enzyme'; | ||
import { shallowToJson } from 'enzyme-to-json'; //removes unnecessary JSON from snapshot | ||
import Footer from '../'; | ||
|
||
describe('<Footer />', () => { | ||
it('renders correctly', () => { | ||
const wrapper = mount(<Footer />); | ||
expect(shallowToJson(wrapper)).toMatchSnapshot(); | ||
}); | ||
}); |
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.
Would it be possible to break the Footer component into smaller components? Anything beyond 150 lines of code seems excessive enough to read.
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.
ok, working on it!