add last minute tweaks found while writing docs

This commit is contained in:
cleverbeagle 2017-06-13 08:12:26 -05:00
parent ab22ebc967
commit 3bc98bc3a6
15 changed files with 45 additions and 15 deletions

View file

@ -1,3 +0,0 @@
{
"presets": ["es2015", "react"]
}

View file

@ -9,9 +9,5 @@ Meteor.publish('documents', function documents() {
// Note: documents.view is also used when editing an existing document. // Note: documents.view is also used when editing an existing document.
Meteor.publish('documents.view', function documentsView(documentId) { Meteor.publish('documents.view', function documentsView(documentId) {
check(documentId, String); check(documentId, String);
return Documents.find({ _id: documentId, owner: this.userId });
const doc = Documents.find(documentId);
const isOwner = doc.fetch()[0].owner === this.userId;
return isOwner ? doc : this.ready();
}); });

View file

@ -0,0 +1,3 @@
import { Meteor } from 'meteor/meteor';
if (Meteor.isDevelopment) process.env.MAIL_URL = Meteor.settings.private.MAIL_URL;

View file

@ -1,3 +1,4 @@
import './accounts'; import './accounts';
import './api'; import './api';
import './fixtures'; import './fixtures';
import './email';

View file

@ -0,0 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
const Icon = ({ icon }) => (<i className={`fa fa-${icon}`} />);
Icon.propTypes = {
icon: PropTypes.string.isRequired,
};
export default Icon;

View file

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import './InputHint.css'; import './InputHint.scss';
const InputHint = ({ children }) => ( const InputHint = ({ children }) => (
<div className="InputHint"> <div className="InputHint">

View file

@ -2,6 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Meteor } from 'meteor/meteor'; import { Meteor } from 'meteor/meteor';
import { Bert } from 'meteor/themeteorchef:bert'; import { Bert } from 'meteor/themeteorchef:bert';
import Icon from '../Icon/Icon';
import './OAuthLoginButton.scss'; import './OAuthLoginButton.scss';
@ -30,9 +31,9 @@ const handleLogin = (service, callback) => {
}; };
const serviceLabel = { const serviceLabel = {
facebook: <span><i className="fa fa-facebook" /> Log In with Facebook</span>, facebook: <span><Icon icon="facebook-official" /> Log In with Facebook</span>,
github: <span><i className="fa fa-github" /> Log In with GitHub</span>, github: <span><Icon icon="github" /> Log In with GitHub</span>,
google: <span><i className="fa fa-google" /> Log In with Google</span>, google: <span><Icon icon="google" /> Log In with Google</span>,
}; };
const OAuthLoginButton = ({ service, callback }) => ( const OAuthLoginButton = ({ service, callback }) => (

View file

@ -23,6 +23,7 @@ import NotFound from '../../pages/NotFound/NotFound';
import Footer from '../../components/Footer/Footer'; import Footer from '../../components/Footer/Footer';
import Terms from '../../pages/Terms/Terms'; import Terms from '../../pages/Terms/Terms';
import Privacy from '../../pages/Privacy/Privacy'; import Privacy from '../../pages/Privacy/Privacy';
import ExamplePage from '../../pages/ExamplePage/ExamplePage';
import './App.scss'; import './App.scss';
@ -45,6 +46,7 @@ const App = props => (
<Route name="reset-password" path="/reset-password/:token" component={ResetPassword} /> <Route name="reset-password" path="/reset-password/:token" component={ResetPassword} />
<Route name="terms" path="/terms" component={Terms} /> <Route name="terms" path="/terms" component={Terms} />
<Route name="privacy" path="/privacy" component={Privacy} /> <Route name="privacy" path="/privacy" component={Privacy} />
<Route name="examplePage" path="/example-page" component={ExamplePage} />
<Route component={NotFound} /> <Route component={NotFound} />
</Switch> </Switch>
</Grid> </Grid>

View file

@ -0,0 +1,14 @@
import React from 'react';
import Page from '../Page/Page';
const ExamplePage = () => (
<div className="ExamplePage">
<Page
title="My Example Page"
subtitle="A subtitle for my example page."
page="example-page"
/>
</div>
);
export default ExamplePage;

View file

@ -1,4 +1,5 @@
import React from 'react'; import React from 'react';
import Icon from '../../components/Icon/Icon';
import './Logout.scss'; import './Logout.scss';
@ -11,9 +12,9 @@ const Logout = () => (
<h1>Stay safe out there.</h1> <h1>Stay safe out there.</h1>
<p>{'Don\'t forget to like and follow Clever Beagle elsewhere on the web:'}</p> <p>{'Don\'t forget to like and follow Clever Beagle elsewhere on the web:'}</p>
<ul className="FollowUsElsewhere"> <ul className="FollowUsElsewhere">
<li><a href="https://facebook.com/cleverbeagle"><i className="fa fa-facebook-official" /></a></li> <li><a href="https://facebook.com/cleverbeagle"><Icon icon="facebook-official" /></a></li>
<li><a href="https://twitter.com/clvrbgl"><i className="fa fa-twitter" /></a></li> <li><a href="https://twitter.com/clvrbgl"><Icon icon="twitter" /></a></li>
<li><a href="https://github.com/cleverbeagle"><i className="fa fa-github" /></a></li> <li><a href="https://github.com/cleverbeagle"><Icon icon="github" /></a></li>
</ul> </ul>
</div> </div>
); );

View file

@ -0,0 +1,5 @@
### This is my Markdown page
I can type **any** Markdown I want into this file and it will ultimately be `parsed` as HTML by Pup's `utility.getPage` Method.
To learn more, you can [read about this Method here](http://cleverbeagle.com/pup/v1/the-basics/methods#utility-methods).

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB