add footer
This commit is contained in:
parent
b0270cc98b
commit
bd78b8e4d7
8 changed files with 92 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@import '../../stylesheets/colors';
|
||||
|
||||
.AccountPageFooter {
|
||||
margin-top: 25px;
|
||||
margin: 25px 0 0;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid $gray-lighter;
|
||||
}
|
||||
|
|
|
|||
27
imports/ui/components/Footer/Footer.js
Normal file
27
imports/ui/components/Footer/Footer.js
Normal 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">© {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;
|
||||
53
imports/ui/components/Footer/Footer.scss
Normal file
53
imports/ui/components/Footer/Footer.scss
Normal 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;
|
||||
}
|
||||
}
|
||||
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
3
imports/ui/layouts/App/App.scss
Normal file
3
imports/ui/layouts/App/App.scss
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.App > .container {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue