Skip to content

Commit

Permalink
wip Pup 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverbeagle committed May 24, 2017
0 parents commit cdc15f0
Show file tree
Hide file tree
Showing 48 changed files with 1,100 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["es2015", "react"]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
settings-staging.json
settings-production.json
16 changes: 16 additions & 0 deletions .meteor/.finished-upgraders
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

notices-for-0.9.0
notices-for-0.9.1
0.9.4-platform-file
notices-for-facebook-graph-api-2
1.2.0-standard-minifiers-package
1.2.0-meteor-platform-split
1.2.0-cordova-changes
1.2.0-breaking-changes
1.3.0-split-minifiers-package
1.4.0-remove-old-dev-bundle-link
1.4.1-add-shell-server-package
1.4.3-split-account-service-packages
1 change: 1 addition & 0 deletions .meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
local
7 changes: 7 additions & 0 deletions .meteor/.id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file contains a token that is unique to your project.
# Check it into your repository along with the rest of this directory.
# It can be used for purposes such as:
# - ensuring you don't accidentally deploy one app on top of another
# - providing package authors with aggregated statistics

16be20efyo0qb53r01o
32 changes: 32 additions & 0 deletions .meteor/packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected] # The database Meteor supports right now
[email protected] # Compile .html files into Meteor Blaze views
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected] # CSS minifier run for production mode
[email protected] # JS minifier run for production mode
[email protected] # ECMAScript 5 compatibility for older browsers.
[email protected] # Enable ECMAScript2015+ syntax in app code
[email protected] # Server-side component of the `meteor shell` command

react-meteor-data
alanning:roles
fourseven:scss
twbs:bootstrap
accounts-base
accounts-password
service-configuration
accounts-facebook
accounts-github
accounts-google
themeteorchef:bert
fortawesome:fontawesome
aldeed:collection2-core
2 changes: 2 additions & 0 deletions .meteor/platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
server
browser
1 change: 1 addition & 0 deletions .meteor/release
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
102 changes: 102 additions & 0 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
alanning:[email protected]
aldeed:[email protected]
aldeed:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
fortawesome:[email protected]_1
fourseven:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
mdg:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
raix:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
themeteorchef:[email protected]
tmeasday:[email protected]
[email protected]
twbs:[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
13 changes: 13 additions & 0 deletions client/main.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<head>
<meta charset="utf-8">
<title>Pup</title>
<meta name="description" content="A description for the application.">
<meta name="viewport" content="initial-scale=1, minimal-ui, maximum-scale=1, minimum-scale=1" />
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
<link rel="shortcut icon" type="image/png" href="/favicon.png?v1" sizes="16x16 32x32 64x64">
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-precomposed.png">
</head>

<body>
<div id="react-root"></div>
</body>
1 change: 1 addition & 0 deletions client/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../imports/startup/client';
51 changes: 51 additions & 0 deletions imports/api/Documents/Documents.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/* eslint-disable consistent-return */

import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';

const Documents = new Mongo.Collection('Documents');

Documents.allow({
insert: () => false,
update: () => false,
remove: () => false,
});

Documents.deny({
insert: () => true,
update: () => true,
remove: () => true,
});

Documents.schema = new SimpleSchema({
owner: {
type: String,
label: 'The ID of the user this document belongs to.',
},
createdAt: {
type: String,
label: 'The date this document was created.',
autoValue() {
if (this.isInsert) return (new Date()).toISOString();
},
},
updatedAt: {
type: String,
label: 'The date this document was last updated.',
autoValue() {
if (this.isInsert || this.isUpdate) return (new Date()).toISOString();
},
},
title: {
type: String,
label: 'The title of the document.',
},
body: {
type: String,
label: 'The body of the document.',
},
});

Documents.attachSchema(Documents.schema);

export default Documents;
4 changes: 4 additions & 0 deletions imports/modules/validate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import $ from 'jquery';
import 'jquery-validation';

export default (form, options) => $(form).validate(options);
8 changes: 8 additions & 0 deletions imports/startup/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import React from 'react';
import { render } from 'react-dom';
import { Meteor } from 'meteor/meteor';
import App from '../../ui/layouts/App/App';

import '../../ui/stylesheets/app.scss';

Meteor.startup(() => render(<App />, document.getElementById('react-root')));
Empty file added imports/startup/server/index.js
Empty file.
22 changes: 22 additions & 0 deletions imports/ui/components/Authenticated/Authenticated.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React, { PropTypes } from 'react';
import { Route, Redirect } from 'react-router-dom';

const Authenticated = ({ loggingIn, authenticated, component, ...rest }) => (
<Route
{...rest}
render={(props) => {
if (loggingIn) return <div />;
return authenticated ?
(React.createElement(component, { ...props, loggingIn, authenticated })) :
(<Redirect to="/login" />);
}}
/>
);

Authenticated.propTypes = {
loggingIn: PropTypes.bool.isRequired,
authenticated: PropTypes.bool.isRequired,
component: PropTypes.func.isRequired,
};

export default Authenticated;
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import PropTypes from 'prop-types';
import { LinkContainer } from 'react-router-bootstrap';
import { Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap';
import { Meteor } from 'meteor/meteor';

const AuthenticatedNavigation = ({ name }) => (
<div>
<Nav>
<LinkContainer to="/documents">
<NavItem eventKey={1} href="/documents">Documents</NavItem>
</LinkContainer>
</Nav>
<Nav pullRight>
<NavDropdown eventKey={2} title={name} id="user-nav-dropdown">
<LinkContainer to="/profile">
<NavItem eventKey={2.1} href="/profile">Profile</NavItem>
</LinkContainer>
<MenuItem divider />
<MenuItem eventKey={2.2} onClick={() => Meteor.logout()}>Logout</MenuItem>
</NavDropdown>
</Nav>
</div>
);

AuthenticatedNavigation.propTypes = {
name: PropTypes.string.isRequired,
};

export default AuthenticatedNavigation;
16 changes: 16 additions & 0 deletions imports/ui/components/InputHint/InputHint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';
import PropTypes from 'prop-types';

import './InputHint.scss';

const InputHint = ({ children }) => (
<div className="InputHint">
{children}
</div>
);

InputHint.propTypes = {
children: PropTypes.node.isRequired,
};

export default InputHint;
9 changes: 9 additions & 0 deletions imports/ui/components/InputHint/InputHint.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import '../../stylesheets/colors';

.InputHint {
display: block;
margin-top: 8px;
font-style: italic;
color: $gray-light;
font-size: 13px;
}
33 changes: 33 additions & 0 deletions imports/ui/components/Navigation/Navigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Navbar } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import PublicNavigation from '../PublicNavigation/PublicNavigation';
import AuthenticatedNavigation from '../AuthenticatedNavigation/AuthenticatedNavigation';

import './Navigation.scss';

const Navigation = ({ authenticated, name }) => (
<Navbar>
<Navbar.Header>
<Navbar.Brand>
<Link to="/">Pup</Link>
</Navbar.Brand>
<Navbar.Toggle />
</Navbar.Header>
<Navbar.Collapse>
{!authenticated ? <PublicNavigation /> : <AuthenticatedNavigation name={name} />}
</Navbar.Collapse>
</Navbar>
);

Navigation.defaultProps = {
name: PropTypes.string,
};

Navigation.propTypes = {
authenticated: PropTypes.bool.isRequired,
name: PropTypes.string,
};

export default Navigation;
6 changes: 6 additions & 0 deletions imports/ui/components/Navigation/Navigation.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.navbar {
border-radius: 0;
border-left: none;
border-right: none;
border-top: none;
}
Loading

0 comments on commit cdc15f0

Please sign in to comment.