Skip to content

Commit 4809101

Browse files
arkujoaopapereira
authored andcommitted
Add Footer component
1 parent aec5540 commit 4809101

File tree

4 files changed

+103
-1
lines changed

4 files changed

+103
-1
lines changed

src/assets/Footer.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.footer {
2+
width: 100%;
3+
margin-top: 3rem;
4+
background-color: #2c3e50;
5+
}
6+
7+
.footer .content {
8+
color: #fff;
9+
margin-top: 1em;
10+
}

src/components/App.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Route, Switch } from 'react-router-dom'
55
import ProjectsList from '../containers/ProjectsList'
66
import ProjectInfo from '../containers/ProjectInfo'
77
import Homepage from '../components/homepage/Homepage'
8+
import Footer from '../components/Footer'
89
import Navbar from './navbar/Navbar'
910
import About from '../containers/About'
1011
import LogIn from '../containers/LogIn'
@@ -85,6 +86,7 @@ class App extends Component {
8586
<Route path='/events/:slug' component={EventInfo} />
8687
<Route path='/getting-started' component={GettingStartedPage} />
8788
</Switch>
89+
<Footer />
8890
</Fragment>
8991
)
9092
}

src/components/Footer.js

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import React from 'react'
2+
import { Grid, Header, List, Container, Segment } from 'semantic-ui-react'
3+
import { Link } from 'react-router-dom'
4+
import '../assets/Footer.css'
5+
6+
const LINKS = {
7+
learnMore: [
8+
{ text: 'About Us', href: '/about-us' },
9+
{ text: 'Getting Started', href: '/getting-started' },
10+
{ text: 'Dashboard', href: '/dashboard' },
11+
{ text: 'Opportunities', href: '/opportunities' },
12+
{ text: 'Blog', href: 'http://nonprofits.agileventures.org/blog/' },
13+
{ text: 'Press Kit', href: 'http://www.agileventures.org/press-kit' }
14+
],
15+
social: [
16+
{ text: 'Facebook', href: 'https://www.facebook.com/agileventures' },
17+
{ text: 'Twitter', href: 'https://twitter.com/AgileVentures' }
18+
],
19+
sponsors: [
20+
{ text: 'Standup Bot', href: 'https://standuply.com/?utm_source=links&amp;utm_medium=agileventures&amp;utm_campaign=partnership' },
21+
{ text: 'Craft Academy', href: 'http://craftacademy.se/english' },
22+
{ text: 'Mooqita', href: 'http://mooqita.org/' },
23+
{ text: 'Becoming a Sponsor', href: '/sponsors' }
24+
]
25+
}
26+
27+
const LinksList = ({ links }) => (
28+
<List>
29+
{links.map(link => (
30+
<List.Item key={link.href}>
31+
{ link.href.startsWith('/') ? (
32+
<Link to={link.href}>
33+
{link.text}
34+
</Link>
35+
) : (
36+
<a href={link.href} target='_blank' rel='noreferrer'>
37+
{link.text}
38+
</a>
39+
)}
40+
</List.Item>
41+
))}
42+
</List>
43+
)
44+
45+
export default () => {
46+
return (
47+
<div className='footer'>
48+
<Grid container stackable columns={4}>
49+
<Grid.Column width={3}>
50+
<Segment basic>
51+
<Header sub className='list-header' color='grey'>Learn More</Header>
52+
<LinksList links={LINKS.learnMore} />
53+
</Segment>
54+
</Grid.Column>
55+
56+
<Grid.Column width={3}>
57+
<Segment basic>
58+
<Header sub className='list-header' color='grey'>Social</Header>
59+
<LinksList links={LINKS.social} />
60+
</Segment>
61+
</Grid.Column>
62+
63+
<Grid.Column width={3}>
64+
<Segment basic>
65+
<Header sub className='list-header' color='grey'>Our Sponsors</Header>
66+
<LinksList links={LINKS.sponsors} />
67+
</Segment>
68+
</Grid.Column>
69+
70+
<Grid.Column width={6}>
71+
<Segment basic>
72+
<Header sub className='list-header' color='grey'>Contact us</Header>
73+
<div className='content'>
74+
Send a traditional email to{' '}
75+
<a href='mailto:info@agileventures.org'>info@agileventures.org</a>
76+
</div>
77+
</Segment>
78+
</Grid.Column>
79+
</Grid>
80+
81+
<Container>
82+
<Segment basic textAlign='center'>
83+
<div className='content'>
84+
We are a Charitable Incorporated Organisation (CIO) in the UK. Ref #1170963
85+
</div>
86+
</Segment>
87+
</Container>
88+
</div>
89+
)
90+
}

src/components/homepage/Homepage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React, { Component, Fragment } from 'react'
22
import { Grid } from 'semantic-ui-react'
33
import HomepageModal from './HomepageModal'
4-
import './Homepage.css'
54
import modals from './modals'
5+
import './Homepage.css'
66

77
export class Homepage extends Component {
88
renderModals () {

0 commit comments

Comments
 (0)