add footer

This commit is contained in:
cleverbeagle 2017-05-29 22:48:28 -05:00
parent b0270cc98b
commit bd78b8e4d7
8 changed files with 92 additions and 5 deletions

View file

@ -24,8 +24,9 @@ Meteor.methods({
});
try {
Documents.update(doc._id, { $set: doc });
return doc._id; // Return _id so we can redirect to document after update.
const documentId = doc._id;
Documents.update(documentId, { $set: doc });
return documentId; // Return _id so we can redirect to document after update.
} catch (exception) {
throw new Meteor.Error('500', exception);
}

View file

@ -1,7 +1,7 @@
@import '../../stylesheets/colors';
.AccountPageFooter {
margin-top: 25px;
margin: 25px 0 0;
padding-top: 20px;
border-top: 1px solid $gray-lighter;
}

View file

@ -0,0 +1,27 @@
import React from 'react';
import { year } from '@cleverbeagle/dates';
import { Link } from 'react-router-dom';
import { Grid } from 'react-bootstrap';
import './Footer.scss';
const copyrightYear = () => {
const currentYear = year();
return currentYear === '2017' ? '2017' : `2017-${currentYear}`;
};
const Footer = () => (
<div className="Footer">
<Grid>
<p className="pull-left">&copy; {copyrightYear()} Application Name</p>
<ul className="pull-right">
<li><Link to="/terms">Terms<span className="hidden-xs"> of Service</span></Link></li>
<li><Link to="/privacy">Privacy<span className="hidden-xs"> Policy</span></Link></li>
</ul>
</Grid>
</div>
);
Footer.propTypes = {};
export default Footer;

View file

@ -0,0 +1,53 @@
@import '../../stylesheets/mixins';
@import '../../stylesheets/colors';
html {
position: relative;
min-height: 100%;
}
body {
margin-bottom: 80px;
}
.Footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
background-color: #fff;
border-top: 1px solid $gray-lighter;
padding: 20px 0;
p {
color: $gray-light;
}
ul {
list-style: none;
padding: 0;
}
ul li {
float: left;
&:first-child {
margin-right: 15px;
}
a {
color: $gray-light;
}
a:hover {
text-decoration: none;
color: $gray;
}
}
}
@include breakpoint(tablet) {
.Footer ul li:first-child {
margin-right: 30px;
}
}

View file

@ -20,6 +20,9 @@ import RecoverPassword from '../../pages/RecoverPassword/RecoverPassword';
import ResetPassword from '../../pages/ResetPassword/ResetPassword';
import Profile from '../../pages/Profile/Profile';
import NotFound from '../../pages/NotFound/NotFound';
import Footer from '../../components/Footer/Footer';
import './App.scss';
const App = props => (
<Router>
@ -41,6 +44,7 @@ const App = props => (
<Route component={NotFound} />
</Switch>
</Grid>
<Footer />
</div> : ''}
</Router>
);

View file

@ -0,0 +1,3 @@
.App > .container {
margin-bottom: 20px;
}

View file

@ -73,7 +73,6 @@ Documents.propTypes = {
export default createContainer(() => {
const subscription = Meteor.subscribe('documents');
console.log(DocumentsCollection.find().fetch());
return {
loading: !subscription.ready(),
documents: DocumentsCollection.find().fetch(),