Skip to content

Commit

Permalink
added footer
Browse files Browse the repository at this point in the history
  • Loading branch information
fitwit authored and fitwit committed Mar 25, 2020
1 parent ee1bd11 commit f817c2c
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 15 deletions.
11 changes: 10 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@ import UserNav from './UserNav';
import Favicon from 'react-favicon';
import DocumentTitle from 'react-document-title';
import ReactGA from 'react-ga';
import Footer from './Footer';

configureAnchors({ scrollDuration: 250 });

const socialLinks= [
'https://www.facebook.com/hackDartmouth',
'https://www.instagram.com/hackdartmouth/',
'https://twitter.com/hackdartmouth',
'https://www.linkedin.com/company/6588725?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A6588725%2Cidx%3A1-1-1%2CtarId%3A1439363530321%2Ctas%3Ahackdartmouth',
'https://github.com/hackdartmouth',
'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
];
function initializeReactGA() {
ReactGA.initialize('UA-60214500-2');
ReactGA.pageview('/mainpage');
Expand Down Expand Up @@ -46,6 +54,7 @@ export default class App extends React.Component {
</Fragment>
)
}})}
<Footer socialLinks={socialLinks}/>
</div>
)
}
Expand Down
12 changes: 12 additions & 0 deletions src/Footer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.socialContainer{
display: flex;
justify-content: center;
background-color: #9BCFB8;
padding: 1em;
}
.social{
margin: 1.5em .5vw 0 .5vw;
}
.socialMobile{
margin: 1.5em 1vw 1em 1vw;
}
17 changes: 17 additions & 0 deletions src/Footer.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import './Footer.css';
import { Button } from 'react-bootstrap';
import { Link, DirectLink, Element , Events, animateScroll, scrollSpy, scroller } from 'react-scroll';
import { isMobile } from 'react-device-detect';
import { SocialIcon } from 'react-social-icons';

const socialSize = isMobile ? 25 : 35;
const Footer = (props) => (
<div className='socialContainer'>
{props.socialLinks.map(link => (
<SocialIcon url={link} bgColor='#ffffff' className={ isMobile ? 'socialMobile' : 'social' } style={{ height: socialSize, width: socialSize }} />
))}
</div>
);

export default Footer;
6 changes: 0 additions & 6 deletions src/RegisterBody.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class RegisterBody extends React.Component {
constructor(props) {
super(props);
this.form = null;
this.socialSize = isMobile ? 25 : 35
}

componentDidMount() {
Expand All @@ -28,11 +27,6 @@ class RegisterBody extends React.Component {
<h1 className="registerSubTitle">{`${this.props.bodyContent.date} | ${this.props.bodyContent.location}`}</h1>
<p className="registerDetails">{this.props.bodyContent.info}</p>
<div ref={(form) => this.form = form} style={{width: '100%', height: isMobile ? '10em' : '20em', marginTop: '1em'}} />
<div className='socialContainer'>
{this.props.bodyContent.socialLinks.map(link => (
<SocialIcon url={link} bgColor='#ffffff' className={ isMobile ? 'socialMobile' : 'social' } style={{ height: this.socialSize, width: this.socialSize }} />
))}
</div>
</div>
);
}
Expand Down
8 changes: 0 additions & 8 deletions src/data/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,6 @@ const pages = [
location: 'Thayer School of Engineering',
info: 'Registration for non-Dartmouth students closes March 20th. Dartmouth students may register up to the day of the hackathon',
typeformUrl: 'https://hackdartmouth.typeform.com/to/foXT8j',
socialLinks: [
'https://www.facebook.com/hackDartmouth',
'https://www.instagram.com/hackdartmouth/',
'https://twitter.com/hackdartmouth',
'https://www.linkedin.com/company/6588725?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A6588725%2Cidx%3A1-1-1%2CtarId%3A1439363530321%2Ctas%3Ahackdartmouth',
'https://github.com/hackdartmouth',
'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
],
},
key: 'RegisterBody',
},
Expand Down

0 comments on commit f817c2c

Please sign in to comment.