├── .gitignore ├── FINAL CODE ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.html │ ├── main.js │ └── main.css ├── server │ └── main.js ├── package.json └── imports │ ├── client │ ├── Item.js │ └── App.js │ └── api │ └── Items.js ├── votingAppReact end of #2 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ └── main.css ├── server │ └── main.js └── package.json ├── votingAppReact end of #4 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.css │ ├── main.html │ └── main.js ├── server │ └── main.js ├── package.json └── imports │ └── client │ └── App.js ├── votingAppReact end of #7 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.css │ ├── main.html │ └── main.js ├── imports │ ├── api │ │ └── Items.js │ └── client │ │ └── App.js ├── package.json └── server │ └── main.js ├── votingAppReact end of #8 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.css │ ├── main.html │ └── main.js ├── imports │ ├── api │ │ └── Items.js │ └── client │ │ ├── Item.js │ │ └── App.js ├── package.json └── server │ └── main.js ├── votingAppReact end of #9 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.css │ ├── main.html │ └── main.js ├── imports │ ├── api │ │ └── Items.js │ └── client │ │ ├── Item.js │ │ └── App.js ├── server │ └── main.js └── package.json ├── votingAppReact end of $5 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.css │ ├── main.html │ └── main.js ├── server │ └── main.js ├── package.json └── imports │ └── client │ └── App.js ├── votingAppReact end of #10 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.html │ ├── main.js │ └── main.css ├── imports │ ├── api │ │ └── Items.js │ └── client │ │ ├── Item.js │ │ └── App.js ├── server │ └── main.js └── package.json ├── votingAppReact end of #11 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.html │ ├── main.js │ └── main.css ├── imports │ ├── api │ │ └── Items.js │ └── client │ │ ├── Item.js │ │ └── App.js ├── server │ └── main.js └── package.json ├── votingAppReact end of #12 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.html │ ├── main.js │ └── main.css ├── server │ └── main.js ├── package.json └── imports │ ├── client │ ├── Item.js │ └── App.js │ └── api │ └── Items.js ├── votingAppReact end of #13 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.html │ ├── main.js │ └── main.css ├── server │ └── main.js ├── package.json └── imports │ ├── client │ ├── Item.js │ └── App.js │ └── api │ └── Items.js ├── votingAppReact end of #14 ├── .gitignore ├── .meteor │ ├── .gitignore │ ├── release │ ├── platforms │ ├── .id │ ├── .finished-upgraders │ ├── packages │ └── versions ├── client │ ├── main.html │ ├── main.js │ └── main.css ├── server │ └── main.js ├── package.json └── imports │ ├── client │ ├── Item.js │ └── App.js │ └── api │ └── Items.js └── STYLES TO IMPORT.css /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /FINAL CODE/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /FINAL CODE/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /FINAL CODE/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #4/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #7/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #8/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #9/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of $5/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /FINAL CODE/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #11/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #12/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #13/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #14/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/.gitignore: -------------------------------------------------------------------------------- 1 | local 2 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.2 2 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.1.1 2 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.1.1 2 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/release: -------------------------------------------------------------------------------- 1 | METEOR@1.4.1.1 2 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/platforms: -------------------------------------------------------------------------------- 1 | server 2 | browser 3 | -------------------------------------------------------------------------------- /votingAppReact end of #2/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /votingAppReact end of #4/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /votingAppReact end of #7/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /votingAppReact end of #8/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /votingAppReact end of #9/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /votingAppReact end of $5/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | -------------------------------------------------------------------------------- /FINAL CODE/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #10/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #11/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #12/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #13/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #14/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #2/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | Meteor.startup(() => { 4 | // code to run on server at startup 5 | }); 6 | -------------------------------------------------------------------------------- /votingAppReact end of #4/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #4/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | Meteor.startup(() => { 4 | // code to run on server at startup 5 | }); 6 | -------------------------------------------------------------------------------- /votingAppReact end of #7/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #8/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of #9/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of $5/client/main.html: -------------------------------------------------------------------------------- 1 | 2 | React Meteor Voting 3 | 4 | 5 |
6 | 7 | -------------------------------------------------------------------------------- /votingAppReact end of $5/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | Meteor.startup(() => { 4 | // code to run on server at startup 5 | }); 6 | -------------------------------------------------------------------------------- /votingAppReact end of #10/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | export default Items; 6 | -------------------------------------------------------------------------------- /votingAppReact end of #11/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | export default Items; 6 | -------------------------------------------------------------------------------- /votingAppReact end of #7/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | export default Items; 6 | -------------------------------------------------------------------------------- /votingAppReact end of #8/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | export default Items; 6 | -------------------------------------------------------------------------------- /votingAppReact end of #9/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | export default Items; 6 | -------------------------------------------------------------------------------- /FINAL CODE/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #10/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #11/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #12/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #13/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #14/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #9/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | // code to run on server at startup 8 | }); 9 | -------------------------------------------------------------------------------- /votingAppReact end of #2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /votingAppReact end of #4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0", 9 | "react": "^15.3.2", 10 | "react-dom": "^15.3.2" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /votingAppReact end of $5/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0", 9 | "react": "^15.3.2", 10 | "react-dom": "^15.3.2" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /FINAL CODE/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #10/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #11/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #12/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #13/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #14/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #4/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #7/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #8/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #9/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of $5/client/main.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Meteor } from 'meteor/meteor'; 3 | import { render } from 'react-dom'; 4 | 5 | import App from '../imports/client/App'; 6 | 7 | Meteor.startup(() => { 8 | render(, document.getElementById('render-target')); 9 | }); 10 | -------------------------------------------------------------------------------- /votingAppReact end of #10/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0", 9 | "react": "^15.3.2", 10 | "react-addons-pure-render-mixin": "^15.3.2", 11 | "react-dom": "^15.3.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /votingAppReact end of #7/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0", 9 | "react": "^15.3.2", 10 | "react-addons-pure-render-mixin": "^15.3.2", 11 | "react-dom": "^15.3.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /votingAppReact end of #8/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0", 9 | "react": "^15.3.2", 10 | "react-addons-pure-render-mixin": "^15.3.2", 11 | "react-dom": "^15.3.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /votingAppReact end of #9/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "meteor-node-stubs": "~0.2.0", 9 | "react": "^15.3.2", 10 | "react-addons-pure-render-mixin": "^15.3.2", 11 | "react-dom": "^15.3.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /FINAL CODE/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/.id: -------------------------------------------------------------------------------- 1 | # This file contains a token that is unique to your project. 2 | # Check it into your repository along with the rest of this directory. 3 | # It can be used for purposes such as: 4 | # - ensuring you don't accidentally deploy one app on top of another 5 | # - providing package authors with aggregated statistics 6 | 7 | q19zuf1be1biu1yrjh8u 8 | -------------------------------------------------------------------------------- /votingAppReact end of #7/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | Items.insert({ 8 | itemOne: { 9 | text: 'Hi', 10 | value: 0, 11 | }, 12 | itemTwo: { 13 | text: 'Hello', 14 | value: 0, 15 | } 16 | }); 17 | // code to run on server at startup 18 | }); 19 | -------------------------------------------------------------------------------- /votingAppReact end of #8/server/main.js: -------------------------------------------------------------------------------- 1 | import { Meteor } from 'meteor/meteor'; 2 | 3 | import Items from '../imports/api/Items'; 4 | 5 | 6 | Meteor.startup(() => { 7 | Items.insert({ 8 | itemOne: { 9 | text: 'Hi', 10 | value: 0, 11 | }, 12 | itemTwo: { 13 | text: 'Hello', 14 | value: 0, 15 | } 16 | }); 17 | // code to run on server at startup 18 | }); 19 | -------------------------------------------------------------------------------- /votingAppReact end of #11/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "classnames": "^2.2.5", 9 | "meteor-node-stubs": "~0.2.0", 10 | "react": "^15.3.2", 11 | "react-addons-pure-render-mixin": "^15.3.2", 12 | "react-dom": "^15.3.2", 13 | "react-komposer": "^1.13.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /votingAppReact end of #12/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "classnames": "^2.2.5", 9 | "meteor-node-stubs": "~0.2.0", 10 | "react": "^15.3.2", 11 | "react-addons-pure-render-mixin": "^15.3.2", 12 | "react-dom": "^15.3.2", 13 | "react-komposer": "^1.13.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /votingAppReact end of #13/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "classnames": "^2.2.5", 9 | "meteor-node-stubs": "~0.2.0", 10 | "react": "^15.3.2", 11 | "react-addons-pure-render-mixin": "^15.3.2", 12 | "react-dom": "^15.3.2", 13 | "react-komposer": "^1.13.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /votingAppReact end of #14/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "classnames": "^2.2.5", 9 | "meteor-node-stubs": "~0.2.0", 10 | "react": "^15.3.2", 11 | "react-addons-pure-render-mixin": "^15.3.2", 12 | "react-dom": "^15.3.2", 13 | "react-komposer": "^1.13.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /FINAL CODE/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "votingAppReact", 3 | "private": true, 4 | "scripts": { 5 | "start": "meteor run" 6 | }, 7 | "dependencies": { 8 | "classnames": "^2.2.5", 9 | "meteor-node-stubs": "~0.2.0", 10 | "react": "^15.3.2", 11 | "react-addons-pure-render-mixin": "^15.3.2", 12 | "react-big-calendar": "^0.11.0", 13 | "react-dom": "^15.3.2", 14 | "react-komposer": "^1.13.1" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /votingAppReact end of #4/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | let hello = 'Scott'; 4 | 5 | // let headingClick = function() { 6 | // console.log('hello'); 7 | // } 8 | 9 | export default class App extends Component { 10 | headingClick() { 11 | console.log('hello'); 12 | } 13 | 14 | render() { 15 | return ( 16 |

Hello {hello}!

17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /FINAL CODE/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/.finished-upgraders: -------------------------------------------------------------------------------- 1 | # This file contains information which helps Meteor properly upgrade your 2 | # app when you run 'meteor update'. You should check it into version control 3 | # with your project. 4 | 5 | notices-for-0.9.0 6 | notices-for-0.9.1 7 | 0.9.4-platform-file 8 | notices-for-facebook-graph-api-2 9 | 1.2.0-standard-minifiers-package 10 | 1.2.0-meteor-platform-split 11 | 1.2.0-cordova-changes 12 | 1.2.0-breaking-changes 13 | 1.3.0-split-minifiers-package 14 | 1.4.0-remove-old-dev-bundle-link 15 | 1.4.1-add-shell-server-package 16 | -------------------------------------------------------------------------------- /votingAppReact end of #8/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | export default class Item extends Component { 4 | render() { 5 | return ( 6 |
7 |
8 | {this.props.item.itemOne.value} 9 |

{this.props.item.itemOne.text}

10 |
11 | vs 12 |
13 | {this.props.item.itemTwo.value} 14 |

{this.props.item.itemTwo.text}

15 |
16 |
17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /votingAppReact end of #9/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | export default class Item extends Component { 4 | render() { 5 | return ( 6 |
7 |
8 | {this.props.item.itemOne.value} 9 |

{this.props.item.itemOne.text}

10 |
11 | vs 12 |
13 | {this.props.item.itemTwo.value} 14 |

{this.props.item.itemTwo.text}

15 |
16 |
17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /votingAppReact end of $5/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | export default class App extends Component { 4 | constructor() { 5 | super(); 6 | this.state = { 7 | count: 0 8 | } 9 | } 10 | 11 | headingClick() { 12 | this.setState({count: this.state.count + 1}); 13 | } 14 | 15 | render() { 16 | return ( 17 |
18 | 19 |
20 | ); 21 | } 22 | } 23 | 24 | class Heading extends Component { 25 | render() { 26 | return ( 27 |

{this.props.count}

28 | ) 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /votingAppReact end of #8/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import Item from './Item'; 4 | 5 | import Items from '../api/Items'; 6 | 7 | class App extends Component { 8 | render() { 9 | return ( 10 |
11 |
12 |

Level Up Voting

13 |
14 |
15 | {this.props.items.map((item) => { 16 | return 17 | })} 18 |
19 |
20 | ); 21 | } 22 | } 23 | 24 | 25 | export default createContainer(() => { 26 | return { 27 | items: Items.find({}).fetch() 28 | } 29 | }, App); 30 | -------------------------------------------------------------------------------- /votingAppReact end of #7/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import Items from '../api/Items'; 4 | 5 | class App extends Component { 6 | constructor() { 7 | super(); 8 | this.state = { 9 | count: 0 10 | } 11 | } 12 | headingClick() { 13 | this.setState({count: this.state.count + 1}); 14 | } 15 | render() { 16 | return ( 17 |
18 | 19 |
20 | ); 21 | } 22 | } 23 | 24 | 25 | export default createContainer(() => { 26 | return { 27 | items: Items.find({}).fetch() 28 | } 29 | }, App); 30 | 31 | 32 | 33 | 34 | class Heading extends Component { 35 | render() { 36 | return ( 37 |

{this.props.count}

38 | ) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /FINAL CODE/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Items from '../api/Items'; 3 | 4 | export default class Item extends Component { 5 | voteOne() { 6 | Meteor.call('voteOnItem', this.props.item, 'itemOne'); 7 | } 8 | 9 | voteTwo() { 10 | Meteor.call('voteOnItem', this.props.item, 'itemTwo'); 11 | } 12 | 13 | render() { 14 | return ( 15 |
16 |
17 | {this.props.item.itemOne.value} 18 |

{this.props.item.itemOne.text}

19 |
20 | vs 21 |
22 | {this.props.item.itemTwo.value} 23 |

{this.props.item.itemTwo.text}

24 |
25 |
26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /votingAppReact end of #12/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Items from '../api/Items'; 3 | 4 | export default class Item extends Component { 5 | voteOne() { 6 | Meteor.call('voteOnItem', this.props.item, 'itemOne'); 7 | } 8 | 9 | voteTwo() { 10 | Meteor.call('voteOnItem', this.props.item, 'itemTwo'); 11 | } 12 | 13 | render() { 14 | return ( 15 |
16 |
17 | {this.props.item.itemOne.value} 18 |

{this.props.item.itemOne.text}

19 |
20 | vs 21 |
22 | {this.props.item.itemTwo.value} 23 |

{this.props.item.itemTwo.text}

24 |
25 |
26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /votingAppReact end of #13/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Items from '../api/Items'; 3 | 4 | export default class Item extends Component { 5 | voteOne() { 6 | Meteor.call('voteOnItem', this.props.item, 'itemOne'); 7 | } 8 | 9 | voteTwo() { 10 | Meteor.call('voteOnItem', this.props.item, 'itemTwo'); 11 | } 12 | 13 | render() { 14 | return ( 15 |
16 |
17 | {this.props.item.itemOne.value} 18 |

{this.props.item.itemOne.text}

19 |
20 | vs 21 |
22 | {this.props.item.itemTwo.value} 23 |

{this.props.item.itemTwo.text}

24 |
25 |
26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /votingAppReact end of #14/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Items from '../api/Items'; 3 | 4 | export default class Item extends Component { 5 | voteOne() { 6 | Meteor.call('voteOnItem', this.props.item, 'itemOne'); 7 | } 8 | 9 | voteTwo() { 10 | Meteor.call('voteOnItem', this.props.item, 'itemTwo'); 11 | } 12 | 13 | render() { 14 | return ( 15 |
16 |
17 | {this.props.item.itemOne.value} 18 |

{this.props.item.itemOne.text}

19 |
20 | vs 21 |
22 | {this.props.item.itemTwo.value} 23 |

{this.props.item.itemTwo.text}

24 |
25 |
26 | ) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /votingAppReact end of #12/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | Meteor.methods({ 6 | insertNewItem(itemOne, itemTwo) { 7 | check(itemOne, String); 8 | check(itemTwo, String); 9 | Items.insert({ 10 | itemOne: { 11 | text: itemOne, 12 | value: 0, 13 | }, 14 | itemTwo: { 15 | text: itemTwo, 16 | value: 0, 17 | } 18 | }); 19 | }, 20 | 21 | voteOnItem(item, position) { 22 | check(item, Object); 23 | if(Meteor.userId()) { 24 | if(position === 'itemOne') { 25 | Items.update(item._id, { 26 | $inc: { 27 | 'itemOne.value': 1 28 | } 29 | }) 30 | } else { 31 | Items.update(item._id, { 32 | $inc: { 33 | 'itemTwo.value': 1 34 | } 35 | }) 36 | } 37 | } 38 | } 39 | }); 40 | 41 | 42 | export default Items; 43 | -------------------------------------------------------------------------------- /votingAppReact end of #10/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Items from '../api/Items'; 3 | 4 | export default class Item extends Component { 5 | voteOne() { 6 | Items.update(this.props.item._id, { 7 | $inc: { 8 | 'itemOne.value': 1 9 | } 10 | }) 11 | } 12 | 13 | voteTwo() { 14 | Items.update(this.props.item._id, { 15 | $inc: { 16 | 'itemTwo.value': 1 17 | } 18 | }) 19 | } 20 | 21 | render() { 22 | return ( 23 |
24 |
25 | {this.props.item.itemOne.value} 26 |

{this.props.item.itemOne.text}

27 |
28 | vs 29 |
30 | {this.props.item.itemTwo.value} 31 |

{this.props.item.itemTwo.text}

32 |
33 |
34 | ) 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /votingAppReact end of #11/imports/client/Item.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import Items from '../api/Items'; 3 | 4 | export default class Item extends Component { 5 | voteOne() { 6 | if(Meteor.userId()) { 7 | Items.update(this.props.item._id, { 8 | $inc: { 9 | 'itemOne.value': 1 10 | } 11 | }) 12 | } 13 | 14 | } 15 | 16 | voteTwo() { 17 | if(Meteor.userId()) { 18 | Items.update(this.props.item._id, { 19 | $inc: { 20 | 'itemTwo.value': 1 21 | } 22 | }) 23 | } 24 | } 25 | 26 | render() { 27 | return ( 28 |
29 |
30 | {this.props.item.itemOne.value} 31 |

{this.props.item.itemOne.text}

32 |
33 | vs 34 |
35 | {this.props.item.itemTwo.value} 36 |

{this.props.item.itemTwo.text}

37 |
38 |
39 | ) 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /votingAppReact end of #13/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | if (Meteor.isServer) { 6 | 7 | Meteor.publish('allItems', function() { 8 | return Items.find(); 9 | }); 10 | 11 | 12 | Meteor.methods({ 13 | insertNewItem(itemOne, itemTwo) { 14 | check(itemOne, String); 15 | check(itemTwo, String); 16 | Items.insert({ 17 | itemOne: { 18 | text: itemOne, 19 | value: 0, 20 | }, 21 | itemTwo: { 22 | text: itemTwo, 23 | value: 0, 24 | } 25 | }); 26 | }, 27 | 28 | voteOnItem(item, position) { 29 | check(item, Object); 30 | if(Meteor.userId()) { 31 | if(position === 'itemOne') { 32 | Items.update(item._id, { 33 | $inc: { 34 | 'itemOne.value': 1 35 | } 36 | }) 37 | } else { 38 | Items.update(item._id, { 39 | $inc: { 40 | 'itemTwo.value': 1 41 | } 42 | }) 43 | } 44 | } 45 | } 46 | }); 47 | } 48 | 49 | 50 | 51 | export default Items; 52 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | react-meteor-data 22 | okgrow:accounts-ui-react 23 | accounts-password 24 | 25 | check 26 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | react-meteor-data 22 | okgrow:accounts-ui-react 23 | accounts-password 24 | 25 | check 26 | -------------------------------------------------------------------------------- /FINAL CODE/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | react-meteor-data 22 | okgrow:accounts-ui-react 23 | accounts-password 24 | accounts-facebook 25 | accounts-twitter 26 | accounts-google 27 | 28 | check 29 | 30 | session 31 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.12 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.10 # Reactive variable for tracker 12 | jquery@1.11.9 # Helpful client-side library 13 | tracker@1.1.0 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.2.0 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.0 # JS minifier run for production mode 17 | es5-shim@4.6.14 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.8 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.12 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.10 # Reactive variable for tracker 12 | jquery@1.11.9 # Helpful client-side library 13 | tracker@1.1.0 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.2.0 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.0 # JS minifier run for production mode 17 | es5-shim@4.6.14 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.8 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.12 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.10 # Reactive variable for tracker 12 | jquery@1.11.9 # Helpful client-side library 13 | tracker@1.1.0 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.2.0 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.0 # JS minifier run for production mode 17 | es5-shim@4.6.14 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.8 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | 23 | react-meteor-data 24 | okgrow:accounts-ui-react 25 | accounts-password 26 | 27 | check 28 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | react-meteor-data 24 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | react-meteor-data 24 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | react-meteor-data 24 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | react-meteor-data 24 | -------------------------------------------------------------------------------- /FINAL CODE/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | if (Meteor.isServer) { 6 | 7 | Meteor.publish('allItems', function() { 8 | return Items.find({}, { 9 | limit: 50, 10 | sort: { lastUpdated: 1 } 11 | }); 12 | }); 13 | 14 | 15 | Meteor.methods({ 16 | insertNewItem(itemOne, itemTwo) { 17 | check(itemOne, String); 18 | check(itemTwo, String); 19 | Items.insert({ 20 | itemOne: { 21 | text: itemOne, 22 | value: 0, 23 | }, 24 | itemTwo: { 25 | text: itemTwo, 26 | value: 0, 27 | } 28 | }); 29 | }, 30 | 31 | voteOnItem(item, position) { 32 | check(item, Object); 33 | let lastUpdated = new Date(); 34 | if(Meteor.userId()) { 35 | if(position === 'itemOne') { 36 | Items.update(item._id, { 37 | $inc: { 38 | 'itemOne.value': 1 39 | }, 40 | $set: { 41 | lastUpdated 42 | } 43 | }) 44 | } else { 45 | Items.update(item._id, { 46 | $inc: { 47 | 'itemTwo.value': 1 48 | }, 49 | $set: { 50 | lastUpdated 51 | } 52 | }) 53 | } 54 | } 55 | } 56 | }); 57 | } 58 | 59 | 60 | 61 | export default Items; 62 | -------------------------------------------------------------------------------- /votingAppReact end of #14/imports/api/Items.js: -------------------------------------------------------------------------------- 1 | import { Mongo } from 'meteor/mongo'; 2 | 3 | const Items = new Mongo.Collection('items'); 4 | 5 | if (Meteor.isServer) { 6 | 7 | Meteor.publish('allItems', function() { 8 | return Items.find({}, { 9 | limit: 50, 10 | sort: { lastUpdated: 1 } 11 | }); 12 | }); 13 | 14 | 15 | Meteor.methods({ 16 | insertNewItem(itemOne, itemTwo) { 17 | check(itemOne, String); 18 | check(itemTwo, String); 19 | Items.insert({ 20 | itemOne: { 21 | text: itemOne, 22 | value: 0, 23 | }, 24 | itemTwo: { 25 | text: itemTwo, 26 | value: 0, 27 | } 28 | }); 29 | }, 30 | 31 | voteOnItem(item, position) { 32 | check(item, Object); 33 | let lastUpdated = new Date(); 34 | if(Meteor.userId()) { 35 | if(position === 'itemOne') { 36 | Items.update(item._id, { 37 | $inc: { 38 | 'itemOne.value': 1 39 | }, 40 | $set: { 41 | lastUpdated 42 | } 43 | }) 44 | } else { 45 | Items.update(item._id, { 46 | $inc: { 47 | 'itemTwo.value': 1 48 | }, 49 | $set: { 50 | lastUpdated 51 | } 52 | }) 53 | } 54 | } 55 | } 56 | }); 57 | } 58 | 59 | 60 | 61 | export default Items; 62 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/packages: -------------------------------------------------------------------------------- 1 | # Meteor packages used by this project, one per line. 2 | # Check this file (and the other files in this directory) into your repository. 3 | # 4 | # 'meteor add' and 'meteor remove' will edit this file for you, 5 | # but you can also edit it by hand. 6 | 7 | meteor-base@1.0.4 # Packages every Meteor app needs to have 8 | mobile-experience@1.0.4 # Packages for a great mobile UX 9 | mongo@1.1.14 # The database Meteor supports right now 10 | blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views 11 | reactive-var@1.0.11 # Reactive variable for tracker 12 | jquery@1.11.10 # Helpful client-side library 13 | tracker@1.1.1 # Meteor's client-side reactive programming library 14 | 15 | standard-minifier-css@1.3.2 # CSS minifier run for production mode 16 | standard-minifier-js@1.2.1 # JS minifier run for production mode 17 | es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers. 18 | ecmascript@0.5.9 # Enable ECMAScript2015+ syntax in app code 19 | shell-server@0.2.1 # Server-side component of the `meteor shell` command 20 | 21 | autopublish@1.0.7 # Publish all data to the clients (for prototyping) 22 | insecure@1.0.7 # Allow all DB writes from clients (for prototyping) 23 | react-meteor-data 24 | okgrow:accounts-ui-react 25 | accounts-password 26 | -------------------------------------------------------------------------------- /votingAppReact end of #9/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import Item from './Item'; 4 | 5 | import Items from '../api/Items'; 6 | 7 | class App extends Component { 8 | addItems(event) { 9 | event.preventDefault(); 10 | const itemOne = this.refs.itemOne.value.trim(); 11 | const itemTwo = this.refs.itemTwo.value.trim(); 12 | if (itemOne !== '' && itemTwo !== '') { 13 | Items.insert({ 14 | itemOne: { 15 | text: itemOne, 16 | value: 0, 17 | }, 18 | itemTwo: { 19 | text: itemTwo, 20 | value: 0, 21 | } 22 | }); 23 | this.refs.itemOne.value = ''; 24 | this.refs.itemTwo.value = ''; 25 | } 26 | } 27 | render() { 28 | return ( 29 |
30 |
31 |

Level Up Voting

32 |
33 |
34 |
35 | 36 | 37 | 38 |
39 | {this.props.items.map((item) => { 40 | return 41 | })} 42 |
43 |
44 | ); 45 | } 46 | } 47 | 48 | 49 | export default createContainer(() => { 50 | return { 51 | items: Items.find({}).fetch() 52 | } 53 | }, App); 54 | -------------------------------------------------------------------------------- /votingAppReact end of #10/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import Item from './Item'; 4 | 5 | import Items from '../api/Items'; 6 | 7 | class App extends Component { 8 | addItems(event) { 9 | event.preventDefault(); 10 | const itemOne = this.refs.itemOne.value.trim(); 11 | const itemTwo = this.refs.itemTwo.value.trim(); 12 | if (itemOne !== '' && itemTwo !== '') { 13 | Items.insert({ 14 | itemOne: { 15 | text: itemOne, 16 | value: 0, 17 | }, 18 | itemTwo: { 19 | text: itemTwo, 20 | value: 0, 21 | } 22 | }); 23 | this.refs.itemOne.value = ''; 24 | this.refs.itemTwo.value = ''; 25 | } 26 | } 27 | render() { 28 | return ( 29 |
30 |
31 |

Level Up Voting

32 |
33 |
34 |
35 | 36 | 37 | 38 |
39 | {this.props.items.map((item) => { 40 | return 41 | })} 42 |
43 |
44 | ); 45 | } 46 | } 47 | 48 | 49 | export default createContainer(() => { 50 | return { 51 | items: Items.find({}).fetch() 52 | } 53 | }, App); 54 | -------------------------------------------------------------------------------- /votingAppReact end of #12/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import { LoginButtons } from 'meteor/okgrow:accounts-ui-react'; 4 | 5 | 6 | import Item from './Item'; 7 | 8 | import Items from '../api/Items'; 9 | 10 | class App extends Component { 11 | addItems(event) { 12 | event.preventDefault(); 13 | const itemOne = this.refs.itemOne.value.trim(); 14 | const itemTwo = this.refs.itemTwo.value.trim(); 15 | if (itemOne !== '' && itemTwo !== '') { 16 | Meteor.call('insertNewItem', itemOne, itemTwo, (err, res) => { 17 | if(!err) { 18 | this.refs.itemOne.value = ''; 19 | this.refs.itemTwo.value = ''; 20 | } 21 | }); 22 | } 23 | } 24 | render() { 25 | return ( 26 |
27 |
28 |

Level Up Voting

29 | 30 |
31 |
32 |
33 | 34 | 35 | 36 |
37 | {this.props.items.map((item) => { 38 | return 39 | })} 40 |
41 |
42 | ); 43 | } 44 | } 45 | 46 | 47 | export default createContainer(() => { 48 | return { 49 | items: Items.find({}).fetch() 50 | } 51 | }, App); 52 | -------------------------------------------------------------------------------- /votingAppReact end of #2/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.9.1 5 | babel-runtime@0.1.11 6 | base64@1.0.9 7 | binary-heap@1.0.9 8 | blaze@2.1.8 9 | blaze-html-templates@1.0.4 10 | blaze-tools@1.0.9 11 | boilerplate-generator@1.0.9 12 | caching-compiler@1.0.6 13 | caching-html-compiler@1.0.6 14 | callback-hook@1.0.9 15 | check@1.2.3 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.6 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.6 22 | ecmascript@0.5.8 23 | ecmascript-runtime@0.3.14 24 | ejson@1.0.12 25 | es5-shim@4.6.14 26 | fastclick@1.0.12 27 | geojson-utils@1.0.9 28 | hot-code-push@1.0.4 29 | html-tools@1.0.10 30 | htmljs@1.0.10 31 | http@1.1.8 32 | id-map@1.0.8 33 | insecure@1.0.7 34 | jquery@1.11.9 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.15 38 | meteor@1.2.17 39 | meteor-base@1.0.4 40 | minifier-css@1.2.14 41 | minifier-js@1.2.14 42 | minimongo@1.0.17 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.12 45 | modules@0.7.6 46 | modules-runtime@0.7.6 47 | mongo@1.1.12 48 | mongo-id@1.0.5 49 | npm-mongo@1.5.48 50 | observe-sequence@1.0.12 51 | ordered-dict@1.0.8 52 | promise@0.8.4 53 | random@1.0.10 54 | reactive-var@1.0.10 55 | reload@1.1.10 56 | retry@1.0.8 57 | routepolicy@1.0.11 58 | shell-server@0.2.1 59 | spacebars@1.0.12 60 | spacebars-compiler@1.0.12 61 | standard-minifier-css@1.2.0 62 | standard-minifier-js@1.2.0 63 | templating@1.1.14 64 | templating-tools@1.0.4 65 | tracker@1.1.0 66 | ui@1.0.11 67 | underscore@1.0.9 68 | url@1.0.10 69 | webapp@1.3.11 70 | webapp-hashing@1.0.9 71 | -------------------------------------------------------------------------------- /votingAppReact end of #4/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.9.1 5 | babel-runtime@0.1.11 6 | base64@1.0.9 7 | binary-heap@1.0.9 8 | blaze@2.1.8 9 | blaze-html-templates@1.0.4 10 | blaze-tools@1.0.9 11 | boilerplate-generator@1.0.9 12 | caching-compiler@1.0.6 13 | caching-html-compiler@1.0.6 14 | callback-hook@1.0.9 15 | check@1.2.3 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.6 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.6 22 | ecmascript@0.5.8 23 | ecmascript-runtime@0.3.14 24 | ejson@1.0.12 25 | es5-shim@4.6.14 26 | fastclick@1.0.12 27 | geojson-utils@1.0.9 28 | hot-code-push@1.0.4 29 | html-tools@1.0.10 30 | htmljs@1.0.10 31 | http@1.1.8 32 | id-map@1.0.8 33 | insecure@1.0.7 34 | jquery@1.11.9 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.15 38 | meteor@1.2.17 39 | meteor-base@1.0.4 40 | minifier-css@1.2.14 41 | minifier-js@1.2.14 42 | minimongo@1.0.17 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.12 45 | modules@0.7.6 46 | modules-runtime@0.7.6 47 | mongo@1.1.12 48 | mongo-id@1.0.5 49 | npm-mongo@1.5.48 50 | observe-sequence@1.0.12 51 | ordered-dict@1.0.8 52 | promise@0.8.4 53 | random@1.0.10 54 | reactive-var@1.0.10 55 | reload@1.1.10 56 | retry@1.0.8 57 | routepolicy@1.0.11 58 | shell-server@0.2.1 59 | spacebars@1.0.12 60 | spacebars-compiler@1.0.12 61 | standard-minifier-css@1.2.0 62 | standard-minifier-js@1.2.0 63 | templating@1.1.14 64 | templating-tools@1.0.4 65 | tracker@1.1.0 66 | ui@1.0.11 67 | underscore@1.0.9 68 | url@1.0.10 69 | webapp@1.3.11 70 | webapp-hashing@1.0.9 71 | -------------------------------------------------------------------------------- /votingAppReact end of $5/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.9.1 5 | babel-runtime@0.1.11 6 | base64@1.0.9 7 | binary-heap@1.0.9 8 | blaze@2.1.8 9 | blaze-html-templates@1.0.4 10 | blaze-tools@1.0.9 11 | boilerplate-generator@1.0.9 12 | caching-compiler@1.0.6 13 | caching-html-compiler@1.0.6 14 | callback-hook@1.0.9 15 | check@1.2.3 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.6 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.6 22 | ecmascript@0.5.8 23 | ecmascript-runtime@0.3.14 24 | ejson@1.0.12 25 | es5-shim@4.6.14 26 | fastclick@1.0.12 27 | geojson-utils@1.0.9 28 | hot-code-push@1.0.4 29 | html-tools@1.0.10 30 | htmljs@1.0.10 31 | http@1.1.8 32 | id-map@1.0.8 33 | insecure@1.0.7 34 | jquery@1.11.9 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.15 38 | meteor@1.2.17 39 | meteor-base@1.0.4 40 | minifier-css@1.2.14 41 | minifier-js@1.2.14 42 | minimongo@1.0.17 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.12 45 | modules@0.7.6 46 | modules-runtime@0.7.6 47 | mongo@1.1.12 48 | mongo-id@1.0.5 49 | npm-mongo@1.5.48 50 | observe-sequence@1.0.12 51 | ordered-dict@1.0.8 52 | promise@0.8.4 53 | random@1.0.10 54 | reactive-var@1.0.10 55 | reload@1.1.10 56 | retry@1.0.8 57 | routepolicy@1.0.11 58 | shell-server@0.2.1 59 | spacebars@1.0.12 60 | spacebars-compiler@1.0.12 61 | standard-minifier-css@1.2.0 62 | standard-minifier-js@1.2.0 63 | templating@1.1.14 64 | templating-tools@1.0.4 65 | tracker@1.1.0 66 | ui@1.0.11 67 | underscore@1.0.9 68 | url@1.0.10 69 | webapp@1.3.11 70 | webapp-hashing@1.0.9 71 | -------------------------------------------------------------------------------- /votingAppReact end of #11/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import { LoginButtons } from 'meteor/okgrow:accounts-ui-react'; 4 | 5 | 6 | import Item from './Item'; 7 | 8 | import Items from '../api/Items'; 9 | 10 | class App extends Component { 11 | addItems(event) { 12 | event.preventDefault(); 13 | const itemOne = this.refs.itemOne.value.trim(); 14 | const itemTwo = this.refs.itemTwo.value.trim(); 15 | if (itemOne !== '' && itemTwo !== '') { 16 | Items.insert({ 17 | itemOne: { 18 | text: itemOne, 19 | value: 0, 20 | }, 21 | itemTwo: { 22 | text: itemTwo, 23 | value: 0, 24 | } 25 | }); 26 | this.refs.itemOne.value = ''; 27 | this.refs.itemTwo.value = ''; 28 | } 29 | } 30 | render() { 31 | return ( 32 |
33 |
34 |

Level Up Voting

35 | 36 |
37 |
38 |
39 | 40 | 41 | 42 |
43 | {this.props.items.map((item) => { 44 | return 45 | })} 46 |
47 |
48 | ); 49 | } 50 | } 51 | 52 | 53 | export default createContainer(() => { 54 | return { 55 | items: Items.find({}).fetch() 56 | } 57 | }, App); 58 | -------------------------------------------------------------------------------- /votingAppReact end of #13/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import { LoginButtons } from 'meteor/okgrow:accounts-ui-react'; 4 | 5 | 6 | import Item from './Item'; 7 | 8 | import Items from '../api/Items'; 9 | 10 | class App extends Component { 11 | addItems(event) { 12 | event.preventDefault(); 13 | const itemOne = this.refs.itemOne.value.trim(); 14 | const itemTwo = this.refs.itemTwo.value.trim(); 15 | if (itemOne !== '' && itemTwo !== '') { 16 | Meteor.call('insertNewItem', itemOne, itemTwo, (err, res) => { 17 | if(!err) { 18 | this.refs.itemOne.value = ''; 19 | this.refs.itemTwo.value = ''; 20 | } 21 | }); 22 | } 23 | } 24 | render() { 25 | if (!this.props.ready) { 26 | return
Loading
; 27 | } 28 | 29 | return ( 30 |
31 |
32 |

Level Up Voting

33 | 34 |
35 |
36 |
37 | 38 | 39 | 40 |
41 | {this.props.items.map((item) => { 42 | return 43 | })} 44 |
45 |
46 | ); 47 | } 48 | } 49 | 50 | 51 | export default createContainer(() => { 52 | let itemsSub = Meteor.subscribe('allItems'); 53 | return { 54 | ready: itemsSub.ready(), 55 | items: Items.find().fetch() 56 | } 57 | }, App); 58 | -------------------------------------------------------------------------------- /votingAppReact end of #10/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.13.0 5 | babel-runtime@0.1.13 6 | base64@1.0.10 7 | binary-heap@1.0.10 8 | blaze@2.1.9 9 | blaze-html-templates@1.0.5 10 | blaze-tools@1.0.10 11 | boilerplate-generator@1.0.11 12 | caching-compiler@1.1.8 13 | caching-html-compiler@1.0.7 14 | callback-hook@1.0.10 15 | check@1.2.4 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.7 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.7 22 | ecmascript@0.5.9 23 | ecmascript-runtime@0.3.15 24 | ejson@1.0.13 25 | es5-shim@4.6.15 26 | fastclick@1.0.13 27 | geojson-utils@1.0.10 28 | hot-code-push@1.0.4 29 | html-tools@1.0.11 30 | htmljs@1.0.11 31 | http@1.1.8 32 | id-map@1.0.9 33 | insecure@1.0.7 34 | jquery@1.11.10 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.16 38 | meteor@1.6.0 39 | meteor-base@1.0.4 40 | minifier-css@1.2.15 41 | minifier-js@1.2.15 42 | minimongo@1.0.18 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.13 45 | modules@0.7.7 46 | modules-runtime@0.7.7 47 | mongo@1.1.14 48 | mongo-id@1.0.6 49 | npm-mongo@2.2.11_2 50 | observe-sequence@1.0.14 51 | ordered-dict@1.0.9 52 | promise@0.8.8 53 | random@1.0.10 54 | react-meteor-data@0.2.9 55 | reactive-var@1.0.11 56 | reload@1.1.11 57 | retry@1.0.9 58 | routepolicy@1.0.12 59 | shell-server@0.2.1 60 | spacebars@1.0.13 61 | spacebars-compiler@1.0.13 62 | standard-minifier-css@1.3.2 63 | standard-minifier-js@1.2.1 64 | templating@1.2.15 65 | templating-compiler@1.2.15 66 | templating-runtime@1.2.15 67 | templating-tools@1.0.5 68 | tmeasday:check-npm-versions@0.2.0 69 | tracker@1.1.1 70 | ui@1.0.12 71 | underscore@1.0.10 72 | url@1.0.11 73 | webapp@1.3.12 74 | webapp-hashing@1.0.9 75 | -------------------------------------------------------------------------------- /votingAppReact end of #7/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.13.0 5 | babel-runtime@0.1.13 6 | base64@1.0.10 7 | binary-heap@1.0.10 8 | blaze@2.1.9 9 | blaze-html-templates@1.0.5 10 | blaze-tools@1.0.10 11 | boilerplate-generator@1.0.11 12 | caching-compiler@1.1.8 13 | caching-html-compiler@1.0.7 14 | callback-hook@1.0.10 15 | check@1.2.4 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.7 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.7 22 | ecmascript@0.5.9 23 | ecmascript-runtime@0.3.15 24 | ejson@1.0.13 25 | es5-shim@4.6.15 26 | fastclick@1.0.13 27 | geojson-utils@1.0.10 28 | hot-code-push@1.0.4 29 | html-tools@1.0.11 30 | htmljs@1.0.11 31 | http@1.1.8 32 | id-map@1.0.9 33 | insecure@1.0.7 34 | jquery@1.11.10 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.16 38 | meteor@1.6.0 39 | meteor-base@1.0.4 40 | minifier-css@1.2.15 41 | minifier-js@1.2.15 42 | minimongo@1.0.18 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.13 45 | modules@0.7.7 46 | modules-runtime@0.7.7 47 | mongo@1.1.14 48 | mongo-id@1.0.6 49 | npm-mongo@2.2.11_2 50 | observe-sequence@1.0.14 51 | ordered-dict@1.0.9 52 | promise@0.8.8 53 | random@1.0.10 54 | react-meteor-data@0.2.9 55 | reactive-var@1.0.11 56 | reload@1.1.11 57 | retry@1.0.9 58 | routepolicy@1.0.12 59 | shell-server@0.2.1 60 | spacebars@1.0.13 61 | spacebars-compiler@1.0.13 62 | standard-minifier-css@1.3.2 63 | standard-minifier-js@1.2.1 64 | templating@1.2.15 65 | templating-compiler@1.2.15 66 | templating-runtime@1.2.15 67 | templating-tools@1.0.5 68 | tmeasday:check-npm-versions@0.2.0 69 | tracker@1.1.1 70 | ui@1.0.12 71 | underscore@1.0.10 72 | url@1.0.11 73 | webapp@1.3.12 74 | webapp-hashing@1.0.9 75 | -------------------------------------------------------------------------------- /votingAppReact end of #8/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.13.0 5 | babel-runtime@0.1.13 6 | base64@1.0.10 7 | binary-heap@1.0.10 8 | blaze@2.1.9 9 | blaze-html-templates@1.0.5 10 | blaze-tools@1.0.10 11 | boilerplate-generator@1.0.11 12 | caching-compiler@1.1.8 13 | caching-html-compiler@1.0.7 14 | callback-hook@1.0.10 15 | check@1.2.4 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.7 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.7 22 | ecmascript@0.5.9 23 | ecmascript-runtime@0.3.15 24 | ejson@1.0.13 25 | es5-shim@4.6.15 26 | fastclick@1.0.13 27 | geojson-utils@1.0.10 28 | hot-code-push@1.0.4 29 | html-tools@1.0.11 30 | htmljs@1.0.11 31 | http@1.1.8 32 | id-map@1.0.9 33 | insecure@1.0.7 34 | jquery@1.11.10 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.16 38 | meteor@1.6.0 39 | meteor-base@1.0.4 40 | minifier-css@1.2.15 41 | minifier-js@1.2.15 42 | minimongo@1.0.18 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.13 45 | modules@0.7.7 46 | modules-runtime@0.7.7 47 | mongo@1.1.14 48 | mongo-id@1.0.6 49 | npm-mongo@2.2.11_2 50 | observe-sequence@1.0.14 51 | ordered-dict@1.0.9 52 | promise@0.8.8 53 | random@1.0.10 54 | react-meteor-data@0.2.9 55 | reactive-var@1.0.11 56 | reload@1.1.11 57 | retry@1.0.9 58 | routepolicy@1.0.12 59 | shell-server@0.2.1 60 | spacebars@1.0.13 61 | spacebars-compiler@1.0.13 62 | standard-minifier-css@1.3.2 63 | standard-minifier-js@1.2.1 64 | templating@1.2.15 65 | templating-compiler@1.2.15 66 | templating-runtime@1.2.15 67 | templating-tools@1.0.5 68 | tmeasday:check-npm-versions@0.2.0 69 | tracker@1.1.1 70 | ui@1.0.12 71 | underscore@1.0.10 72 | url@1.0.11 73 | webapp@1.3.12 74 | webapp-hashing@1.0.9 75 | -------------------------------------------------------------------------------- /votingAppReact end of #9/.meteor/versions: -------------------------------------------------------------------------------- 1 | allow-deny@1.0.5 2 | autopublish@1.0.7 3 | autoupdate@1.2.11 4 | babel-compiler@6.13.0 5 | babel-runtime@0.1.13 6 | base64@1.0.10 7 | binary-heap@1.0.10 8 | blaze@2.1.9 9 | blaze-html-templates@1.0.5 10 | blaze-tools@1.0.10 11 | boilerplate-generator@1.0.11 12 | caching-compiler@1.1.8 13 | caching-html-compiler@1.0.7 14 | callback-hook@1.0.10 15 | check@1.2.4 16 | ddp@1.2.5 17 | ddp-client@1.2.9 18 | ddp-common@1.2.7 19 | ddp-server@1.2.10 20 | deps@1.0.12 21 | diff-sequence@1.0.7 22 | ecmascript@0.5.9 23 | ecmascript-runtime@0.3.15 24 | ejson@1.0.13 25 | es5-shim@4.6.15 26 | fastclick@1.0.13 27 | geojson-utils@1.0.10 28 | hot-code-push@1.0.4 29 | html-tools@1.0.11 30 | htmljs@1.0.11 31 | http@1.1.8 32 | id-map@1.0.9 33 | insecure@1.0.7 34 | jquery@1.11.10 35 | launch-screen@1.0.12 36 | livedata@1.0.18 37 | logging@1.1.16 38 | meteor@1.6.0 39 | meteor-base@1.0.4 40 | minifier-css@1.2.15 41 | minifier-js@1.2.15 42 | minimongo@1.0.18 43 | mobile-experience@1.0.4 44 | mobile-status-bar@1.0.13 45 | modules@0.7.7 46 | modules-runtime@0.7.7 47 | mongo@1.1.14 48 | mongo-id@1.0.6 49 | npm-mongo@2.2.11_2 50 | observe-sequence@1.0.14 51 | ordered-dict@1.0.9 52 | promise@0.8.8 53 | random@1.0.10 54 | react-meteor-data@0.2.9 55 | reactive-var@1.0.11 56 | reload@1.1.11 57 | retry@1.0.9 58 | routepolicy@1.0.12 59 | shell-server@0.2.1 60 | spacebars@1.0.13 61 | spacebars-compiler@1.0.13 62 | standard-minifier-css@1.3.2 63 | standard-minifier-js@1.2.1 64 | templating@1.2.15 65 | templating-compiler@1.2.15 66 | templating-runtime@1.2.15 67 | templating-tools@1.0.5 68 | tmeasday:check-npm-versions@0.2.0 69 | tracker@1.1.1 70 | ui@1.0.12 71 | underscore@1.0.10 72 | url@1.0.11 73 | webapp@1.3.12 74 | webapp-hashing@1.0.9 75 | -------------------------------------------------------------------------------- /votingAppReact end of #14/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import { LoginButtons } from 'meteor/okgrow:accounts-ui-react'; 4 | 5 | 6 | import Item from './Item'; 7 | 8 | import Items from '../api/Items'; 9 | 10 | class App extends Component { 11 | addItems(event) { 12 | event.preventDefault(); 13 | const itemOne = this.refs.itemOne.value.trim(); 14 | const itemTwo = this.refs.itemTwo.value.trim(); 15 | if (itemOne !== '' && itemTwo !== '') { 16 | Meteor.call('insertNewItem', itemOne, itemTwo, (err, res) => { 17 | if(!err) { 18 | this.refs.itemOne.value = ''; 19 | this.refs.itemTwo.value = ''; 20 | } 21 | }); 22 | } 23 | } 24 | render() { 25 | if (!this.props.ready) { 26 | return
Loading
; 27 | } 28 | 29 | return ( 30 |
31 |
32 |

Level Up Voting

33 | 34 |
35 |
36 |
37 | 38 | 39 | 40 |
41 | {this.props.items.map((item) => { 42 | return 43 | })} 44 |
45 |
46 | ); 47 | } 48 | } 49 | 50 | 51 | export default createContainer(() => { 52 | let itemsSub = Meteor.subscribe('allItems'); 53 | return { 54 | ready: itemsSub.ready(), 55 | items: Items.find({}, { 56 | limit: 1, 57 | sort: { lastUpdated: 1 } 58 | }).fetch() 59 | } 60 | }, App); 61 | -------------------------------------------------------------------------------- /votingAppReact end of #13/.meteor/versions: -------------------------------------------------------------------------------- 1 | accounts-base@1.2.14 2 | accounts-password@1.3.1 3 | accounts-ui@1.1.8 4 | accounts-ui-unstyled@1.1.11 5 | allow-deny@1.0.5 6 | autoupdate@1.2.11 7 | babel-compiler@6.13.0 8 | babel-runtime@0.1.13 9 | base64@1.0.10 10 | binary-heap@1.0.10 11 | blaze@2.1.9 12 | blaze-html-templates@1.0.5 13 | blaze-tools@1.0.10 14 | boilerplate-generator@1.0.11 15 | caching-compiler@1.1.8 16 | caching-html-compiler@1.0.7 17 | callback-hook@1.0.10 18 | check@1.2.4 19 | ddp@1.2.5 20 | ddp-client@1.2.9 21 | ddp-common@1.2.7 22 | ddp-rate-limiter@1.0.6 23 | ddp-server@1.2.10 24 | deps@1.0.12 25 | diff-sequence@1.0.7 26 | ecmascript@0.5.9 27 | ecmascript-runtime@0.3.15 28 | ejson@1.0.13 29 | email@1.1.18 30 | es5-shim@4.6.15 31 | fastclick@1.0.13 32 | geojson-utils@1.0.10 33 | hot-code-push@1.0.4 34 | html-tools@1.0.11 35 | htmljs@1.0.11 36 | http@1.1.8 37 | id-map@1.0.9 38 | jquery@1.11.10 39 | jsx@0.2.4 40 | launch-screen@1.0.12 41 | less@2.5.7 42 | livedata@1.0.18 43 | localstorage@1.0.12 44 | logging@1.1.16 45 | meteor@1.6.0 46 | meteor-base@1.0.4 47 | minifier-css@1.2.15 48 | minifier-js@1.2.15 49 | minimongo@1.0.18 50 | mobile-experience@1.0.4 51 | mobile-status-bar@1.0.13 52 | modules@0.7.7 53 | modules-runtime@0.7.7 54 | mongo@1.1.14 55 | mongo-id@1.0.6 56 | npm-bcrypt@0.9.2 57 | npm-mongo@2.2.11_2 58 | observe-sequence@1.0.14 59 | okgrow:accounts-ui-react@0.7.2 60 | ordered-dict@1.0.9 61 | promise@0.8.8 62 | random@1.0.10 63 | rate-limit@1.0.6 64 | react-meteor-data@0.2.9 65 | reactive-dict@1.1.8 66 | reactive-var@1.0.11 67 | reload@1.1.11 68 | retry@1.0.9 69 | routepolicy@1.0.12 70 | service-configuration@1.0.11 71 | session@1.1.7 72 | sha@1.0.9 73 | shell-server@0.2.1 74 | spacebars@1.0.13 75 | spacebars-compiler@1.0.13 76 | srp@1.0.10 77 | standard-minifier-css@1.3.2 78 | standard-minifier-js@1.2.1 79 | templating@1.2.15 80 | templating-compiler@1.2.15 81 | templating-runtime@1.2.15 82 | templating-tools@1.0.5 83 | thereactivestack:blazetoreact@1.0.2 84 | tmeasday:check-npm-versions@0.2.0 85 | tracker@1.1.1 86 | ui@1.0.12 87 | underscore@1.0.10 88 | url@1.0.11 89 | webapp@1.3.12 90 | webapp-hashing@1.0.9 91 | -------------------------------------------------------------------------------- /votingAppReact end of #14/.meteor/versions: -------------------------------------------------------------------------------- 1 | accounts-base@1.2.14 2 | accounts-password@1.3.1 3 | accounts-ui@1.1.8 4 | accounts-ui-unstyled@1.1.11 5 | allow-deny@1.0.5 6 | autoupdate@1.2.11 7 | babel-compiler@6.13.0 8 | babel-runtime@0.1.13 9 | base64@1.0.10 10 | binary-heap@1.0.10 11 | blaze@2.1.9 12 | blaze-html-templates@1.0.5 13 | blaze-tools@1.0.10 14 | boilerplate-generator@1.0.11 15 | caching-compiler@1.1.8 16 | caching-html-compiler@1.0.7 17 | callback-hook@1.0.10 18 | check@1.2.4 19 | ddp@1.2.5 20 | ddp-client@1.2.9 21 | ddp-common@1.2.7 22 | ddp-rate-limiter@1.0.6 23 | ddp-server@1.2.10 24 | deps@1.0.12 25 | diff-sequence@1.0.7 26 | ecmascript@0.5.9 27 | ecmascript-runtime@0.3.15 28 | ejson@1.0.13 29 | email@1.1.18 30 | es5-shim@4.6.15 31 | fastclick@1.0.13 32 | geojson-utils@1.0.10 33 | hot-code-push@1.0.4 34 | html-tools@1.0.11 35 | htmljs@1.0.11 36 | http@1.1.8 37 | id-map@1.0.9 38 | jquery@1.11.10 39 | jsx@0.2.4 40 | launch-screen@1.0.12 41 | less@2.5.7 42 | livedata@1.0.18 43 | localstorage@1.0.12 44 | logging@1.1.16 45 | meteor@1.6.0 46 | meteor-base@1.0.4 47 | minifier-css@1.2.15 48 | minifier-js@1.2.15 49 | minimongo@1.0.18 50 | mobile-experience@1.0.4 51 | mobile-status-bar@1.0.13 52 | modules@0.7.7 53 | modules-runtime@0.7.7 54 | mongo@1.1.14 55 | mongo-id@1.0.6 56 | npm-bcrypt@0.9.2 57 | npm-mongo@2.2.11_2 58 | observe-sequence@1.0.14 59 | okgrow:accounts-ui-react@0.7.2 60 | ordered-dict@1.0.9 61 | promise@0.8.8 62 | random@1.0.10 63 | rate-limit@1.0.6 64 | react-meteor-data@0.2.9 65 | reactive-dict@1.1.8 66 | reactive-var@1.0.11 67 | reload@1.1.11 68 | retry@1.0.9 69 | routepolicy@1.0.12 70 | service-configuration@1.0.11 71 | session@1.1.7 72 | sha@1.0.9 73 | shell-server@0.2.1 74 | spacebars@1.0.13 75 | spacebars-compiler@1.0.13 76 | srp@1.0.10 77 | standard-minifier-css@1.3.2 78 | standard-minifier-js@1.2.1 79 | templating@1.2.15 80 | templating-compiler@1.2.15 81 | templating-runtime@1.2.15 82 | templating-tools@1.0.5 83 | thereactivestack:blazetoreact@1.0.2 84 | tmeasday:check-npm-versions@0.2.0 85 | tracker@1.1.1 86 | ui@1.0.12 87 | underscore@1.0.10 88 | url@1.0.11 89 | webapp@1.3.12 90 | webapp-hashing@1.0.9 91 | -------------------------------------------------------------------------------- /votingAppReact end of #12/.meteor/versions: -------------------------------------------------------------------------------- 1 | accounts-base@1.2.14 2 | accounts-password@1.3.1 3 | accounts-ui@1.1.8 4 | accounts-ui-unstyled@1.1.11 5 | allow-deny@1.0.5 6 | autopublish@1.0.7 7 | autoupdate@1.2.11 8 | babel-compiler@6.13.0 9 | babel-runtime@0.1.13 10 | base64@1.0.10 11 | binary-heap@1.0.10 12 | blaze@2.1.9 13 | blaze-html-templates@1.0.5 14 | blaze-tools@1.0.10 15 | boilerplate-generator@1.0.11 16 | caching-compiler@1.1.8 17 | caching-html-compiler@1.0.7 18 | callback-hook@1.0.10 19 | check@1.2.4 20 | ddp@1.2.5 21 | ddp-client@1.2.9 22 | ddp-common@1.2.7 23 | ddp-rate-limiter@1.0.6 24 | ddp-server@1.2.10 25 | deps@1.0.12 26 | diff-sequence@1.0.7 27 | ecmascript@0.5.9 28 | ecmascript-runtime@0.3.15 29 | ejson@1.0.13 30 | email@1.1.18 31 | es5-shim@4.6.15 32 | fastclick@1.0.13 33 | geojson-utils@1.0.10 34 | hot-code-push@1.0.4 35 | html-tools@1.0.11 36 | htmljs@1.0.11 37 | http@1.1.8 38 | id-map@1.0.9 39 | jquery@1.11.10 40 | jsx@0.2.4 41 | launch-screen@1.0.12 42 | less@2.5.7 43 | livedata@1.0.18 44 | localstorage@1.0.12 45 | logging@1.1.16 46 | meteor@1.6.0 47 | meteor-base@1.0.4 48 | minifier-css@1.2.15 49 | minifier-js@1.2.15 50 | minimongo@1.0.18 51 | mobile-experience@1.0.4 52 | mobile-status-bar@1.0.13 53 | modules@0.7.7 54 | modules-runtime@0.7.7 55 | mongo@1.1.14 56 | mongo-id@1.0.6 57 | npm-bcrypt@0.9.2 58 | npm-mongo@2.2.11_2 59 | observe-sequence@1.0.14 60 | okgrow:accounts-ui-react@0.7.2 61 | ordered-dict@1.0.9 62 | promise@0.8.8 63 | random@1.0.10 64 | rate-limit@1.0.6 65 | react-meteor-data@0.2.9 66 | reactive-dict@1.1.8 67 | reactive-var@1.0.11 68 | reload@1.1.11 69 | retry@1.0.9 70 | routepolicy@1.0.12 71 | service-configuration@1.0.11 72 | session@1.1.7 73 | sha@1.0.9 74 | shell-server@0.2.1 75 | spacebars@1.0.13 76 | spacebars-compiler@1.0.13 77 | srp@1.0.10 78 | standard-minifier-css@1.3.2 79 | standard-minifier-js@1.2.1 80 | templating@1.2.15 81 | templating-compiler@1.2.15 82 | templating-runtime@1.2.15 83 | templating-tools@1.0.5 84 | thereactivestack:blazetoreact@1.0.2 85 | tmeasday:check-npm-versions@0.2.0 86 | tracker@1.1.1 87 | ui@1.0.12 88 | underscore@1.0.10 89 | url@1.0.11 90 | webapp@1.3.12 91 | webapp-hashing@1.0.9 92 | -------------------------------------------------------------------------------- /votingAppReact end of #11/.meteor/versions: -------------------------------------------------------------------------------- 1 | accounts-base@1.2.14 2 | accounts-password@1.3.1 3 | accounts-ui@1.1.8 4 | accounts-ui-unstyled@1.1.11 5 | allow-deny@1.0.5 6 | autopublish@1.0.7 7 | autoupdate@1.2.11 8 | babel-compiler@6.13.0 9 | babel-runtime@0.1.13 10 | base64@1.0.10 11 | binary-heap@1.0.10 12 | blaze@2.1.9 13 | blaze-html-templates@1.0.5 14 | blaze-tools@1.0.10 15 | boilerplate-generator@1.0.11 16 | caching-compiler@1.1.8 17 | caching-html-compiler@1.0.7 18 | callback-hook@1.0.10 19 | check@1.2.4 20 | ddp@1.2.5 21 | ddp-client@1.2.9 22 | ddp-common@1.2.7 23 | ddp-rate-limiter@1.0.6 24 | ddp-server@1.2.10 25 | deps@1.0.12 26 | diff-sequence@1.0.7 27 | ecmascript@0.5.9 28 | ecmascript-runtime@0.3.15 29 | ejson@1.0.13 30 | email@1.1.18 31 | es5-shim@4.6.15 32 | fastclick@1.0.13 33 | geojson-utils@1.0.10 34 | hot-code-push@1.0.4 35 | html-tools@1.0.11 36 | htmljs@1.0.11 37 | http@1.1.8 38 | id-map@1.0.9 39 | insecure@1.0.7 40 | jquery@1.11.10 41 | jsx@0.2.4 42 | launch-screen@1.0.12 43 | less@2.5.7 44 | livedata@1.0.18 45 | localstorage@1.0.12 46 | logging@1.1.16 47 | meteor@1.6.0 48 | meteor-base@1.0.4 49 | minifier-css@1.2.15 50 | minifier-js@1.2.15 51 | minimongo@1.0.18 52 | mobile-experience@1.0.4 53 | mobile-status-bar@1.0.13 54 | modules@0.7.7 55 | modules-runtime@0.7.7 56 | mongo@1.1.14 57 | mongo-id@1.0.6 58 | npm-bcrypt@0.9.2 59 | npm-mongo@2.2.11_2 60 | observe-sequence@1.0.14 61 | okgrow:accounts-ui-react@0.7.2 62 | ordered-dict@1.0.9 63 | promise@0.8.8 64 | random@1.0.10 65 | rate-limit@1.0.6 66 | react-meteor-data@0.2.9 67 | reactive-dict@1.1.8 68 | reactive-var@1.0.11 69 | reload@1.1.11 70 | retry@1.0.9 71 | routepolicy@1.0.12 72 | service-configuration@1.0.11 73 | session@1.1.7 74 | sha@1.0.9 75 | shell-server@0.2.1 76 | spacebars@1.0.13 77 | spacebars-compiler@1.0.13 78 | srp@1.0.10 79 | standard-minifier-css@1.3.2 80 | standard-minifier-js@1.2.1 81 | templating@1.2.15 82 | templating-compiler@1.2.15 83 | templating-runtime@1.2.15 84 | templating-tools@1.0.5 85 | thereactivestack:blazetoreact@1.0.2 86 | tmeasday:check-npm-versions@0.2.0 87 | tracker@1.1.1 88 | ui@1.0.12 89 | underscore@1.0.10 90 | url@1.0.11 91 | webapp@1.3.12 92 | webapp-hashing@1.0.9 93 | -------------------------------------------------------------------------------- /FINAL CODE/imports/client/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { createContainer } from 'meteor/react-meteor-data'; 3 | import { LoginButtons } from 'meteor/okgrow:accounts-ui-react'; 4 | 5 | 6 | import Item from './Item'; 7 | 8 | import Items from '../api/Items'; 9 | 10 | class App extends Component { 11 | addItems(event) { 12 | event.preventDefault(); 13 | const itemOne = this.refs.itemOne.value.trim(); 14 | const itemTwo = this.refs.itemTwo.value.trim(); 15 | if (itemOne !== '' && itemTwo !== '') { 16 | Meteor.call('insertNewItem', itemOne, itemTwo, (err, res) => { 17 | if(!err) { 18 | this.refs.itemOne.value = ''; 19 | this.refs.itemTwo.value = ''; 20 | } 21 | }); 22 | } 23 | } 24 | 25 | showAll() { 26 | if(this.props.showAll) { 27 | Session.set('showAll', false); 28 | } else { 29 | Session.set('showAll', true); 30 | } 31 | 32 | } 33 | 34 | render() { 35 | if (!this.props.ready) { 36 | return
Loading
; 37 | } 38 | 39 | return ( 40 |
41 |
42 |

Level Up Voting

43 | 44 | 47 |
48 |
49 |
50 | 51 | 52 | 53 |
54 | {this.props.items.map((item) => { 55 | return 56 | })} 57 |
58 |
59 | ); 60 | } 61 | } 62 | 63 | 64 | export default createContainer(() => { 65 | let itemsSub = Meteor.subscribe('allItems'); 66 | let showAll = Session.get('showAll'); 67 | return { 68 | showAll, 69 | ready: itemsSub.ready(), 70 | items: Items.find({}, { 71 | limit: showAll ? 50 : 1, 72 | sort: { lastUpdated: 1 } 73 | }).fetch() 74 | } 75 | }, App); 76 | -------------------------------------------------------------------------------- /FINAL CODE/.meteor/versions: -------------------------------------------------------------------------------- 1 | accounts-base@1.2.14 2 | accounts-facebook@1.0.10 3 | accounts-google@1.0.10 4 | accounts-oauth@1.1.14 5 | accounts-password@1.3.1 6 | accounts-twitter@1.0.10 7 | accounts-ui@1.1.8 8 | accounts-ui-unstyled@1.1.11 9 | allow-deny@1.0.5 10 | autoupdate@1.2.11 11 | babel-compiler@6.13.0 12 | babel-runtime@0.1.13 13 | base64@1.0.10 14 | binary-heap@1.0.10 15 | blaze@2.1.9 16 | blaze-html-templates@1.0.5 17 | blaze-tools@1.0.10 18 | boilerplate-generator@1.0.11 19 | caching-compiler@1.1.8 20 | caching-html-compiler@1.0.7 21 | callback-hook@1.0.10 22 | check@1.2.4 23 | ddp@1.2.5 24 | ddp-client@1.2.9 25 | ddp-common@1.2.7 26 | ddp-rate-limiter@1.0.6 27 | ddp-server@1.2.10 28 | deps@1.0.12 29 | diff-sequence@1.0.7 30 | ecmascript@0.5.9 31 | ecmascript-runtime@0.3.15 32 | ejson@1.0.13 33 | email@1.1.18 34 | es5-shim@4.6.15 35 | facebook@1.2.8 36 | fastclick@1.0.13 37 | geojson-utils@1.0.10 38 | google@1.1.13 39 | hot-code-push@1.0.4 40 | html-tools@1.0.11 41 | htmljs@1.0.11 42 | http@1.1.8 43 | id-map@1.0.9 44 | jquery@1.11.10 45 | jsx@0.2.4 46 | launch-screen@1.0.12 47 | less@2.5.7 48 | livedata@1.0.18 49 | localstorage@1.0.12 50 | logging@1.1.16 51 | meteor@1.6.0 52 | meteor-base@1.0.4 53 | minifier-css@1.2.15 54 | minifier-js@1.2.15 55 | minimongo@1.0.18 56 | mobile-experience@1.0.4 57 | mobile-status-bar@1.0.13 58 | modules@0.7.7 59 | modules-runtime@0.7.7 60 | mongo@1.1.14 61 | mongo-id@1.0.6 62 | npm-bcrypt@0.9.2 63 | npm-mongo@2.2.11_2 64 | oauth@1.1.12 65 | oauth1@1.1.10 66 | oauth2@1.1.11 67 | observe-sequence@1.0.14 68 | okgrow:accounts-ui-react@0.7.2 69 | ordered-dict@1.0.9 70 | promise@0.8.8 71 | random@1.0.10 72 | rate-limit@1.0.6 73 | react-meteor-data@0.2.9 74 | reactive-dict@1.1.8 75 | reactive-var@1.0.11 76 | reload@1.1.11 77 | retry@1.0.9 78 | routepolicy@1.0.12 79 | service-configuration@1.0.11 80 | session@1.1.7 81 | sha@1.0.9 82 | shell-server@0.2.1 83 | spacebars@1.0.13 84 | spacebars-compiler@1.0.13 85 | srp@1.0.10 86 | standard-minifier-css@1.3.2 87 | standard-minifier-js@1.2.1 88 | templating@1.2.15 89 | templating-compiler@1.2.15 90 | templating-runtime@1.2.15 91 | templating-tools@1.0.5 92 | thereactivestack:blazetoreact@1.0.2 93 | tmeasday:check-npm-versions@0.2.0 94 | tracker@1.1.1 95 | twitter@1.1.11 96 | ui@1.0.12 97 | underscore@1.0.10 98 | url@1.0.11 99 | webapp@1.3.12 100 | webapp-hashing@1.0.9 101 | -------------------------------------------------------------------------------- /STYLES TO IMPORT.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | -------------------------------------------------------------------------------- /FINAL CODE/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | -------------------------------------------------------------------------------- /votingAppReact end of #10/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | -------------------------------------------------------------------------------- /votingAppReact end of #11/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | -------------------------------------------------------------------------------- /votingAppReact end of #12/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | -------------------------------------------------------------------------------- /votingAppReact end of #13/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | -------------------------------------------------------------------------------- /votingAppReact end of #14/client/main.css: -------------------------------------------------------------------------------- 1 | /* CSS declarations go here */ 2 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 3 | 4 | /** 5 | * 1. Change the default font family in all browsers (opinionated). 6 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 7 | */ 8 | 9 | html { 10 | font-family: sans-serif; /* 1 */ 11 | -ms-text-size-adjust: 100%; /* 2 */ 12 | -webkit-text-size-adjust: 100%; /* 2 */ 13 | } 14 | 15 | /** 16 | * Remove the margin in all browsers (opinionated). 17 | */ 18 | 19 | body { 20 | margin: 0; 21 | } 22 | 23 | /* HTML5 display definitions 24 | ========================================================================== */ 25 | 26 | /** 27 | * Add the correct display in IE 9-. 28 | * 1. Add the correct display in Edge, IE, and Firefox. 29 | * 2. Add the correct display in IE. 30 | */ 31 | 32 | article, 33 | aside, 34 | details, /* 1 */ 35 | figcaption, 36 | figure, 37 | footer, 38 | header, 39 | main, /* 2 */ 40 | menu, 41 | nav, 42 | section, 43 | summary { /* 1 */ 44 | display: block; 45 | } 46 | 47 | /** 48 | * Add the correct display in IE 9-. 49 | */ 50 | 51 | audio, 52 | canvas, 53 | progress, 54 | video { 55 | display: inline-block; 56 | } 57 | 58 | /** 59 | * Add the correct display in iOS 4-7. 60 | */ 61 | 62 | audio:not([controls]) { 63 | display: none; 64 | height: 0; 65 | } 66 | 67 | /** 68 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 69 | */ 70 | 71 | progress { 72 | vertical-align: baseline; 73 | } 74 | 75 | /** 76 | * Add the correct display in IE 10-. 77 | * 1. Add the correct display in IE. 78 | */ 79 | 80 | template, /* 1 */ 81 | [hidden] { 82 | display: none; 83 | } 84 | 85 | /* Links 86 | ========================================================================== */ 87 | 88 | /** 89 | * 1. Remove the gray background on active links in IE 10. 90 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 91 | */ 92 | 93 | a { 94 | background-color: transparent; /* 1 */ 95 | -webkit-text-decoration-skip: objects; /* 2 */ 96 | } 97 | 98 | /** 99 | * Remove the outline on focused links when they are also active or hovered 100 | * in all browsers (opinionated). 101 | */ 102 | 103 | a:active, 104 | a:hover { 105 | outline-width: 0; 106 | } 107 | 108 | /* Text-level semantics 109 | ========================================================================== */ 110 | 111 | /** 112 | * 1. Remove the bottom border in Firefox 39-. 113 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 114 | */ 115 | 116 | abbr[title] { 117 | border-bottom: none; /* 1 */ 118 | text-decoration: underline; /* 2 */ 119 | text-decoration: underline dotted; /* 2 */ 120 | } 121 | 122 | /** 123 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 124 | */ 125 | 126 | b, 127 | strong { 128 | font-weight: inherit; 129 | } 130 | 131 | /** 132 | * Add the correct font weight in Chrome, Edge, and Safari. 133 | */ 134 | 135 | b, 136 | strong { 137 | font-weight: bolder; 138 | } 139 | 140 | /** 141 | * Add the correct font style in Android 4.3-. 142 | */ 143 | 144 | dfn { 145 | font-style: italic; 146 | } 147 | 148 | /** 149 | * Correct the font size and margin on `h1` elements within `section` and 150 | * `article` contexts in Chrome, Firefox, and Safari. 151 | */ 152 | 153 | h1 { 154 | font-size: 2em; 155 | margin: 0.67em 0; 156 | } 157 | 158 | /** 159 | * Add the correct background and color in IE 9-. 160 | */ 161 | 162 | mark { 163 | background-color: #ff0; 164 | color: #000; 165 | } 166 | 167 | /** 168 | * Add the correct font size in all browsers. 169 | */ 170 | 171 | small { 172 | font-size: 80%; 173 | } 174 | 175 | /** 176 | * Prevent `sub` and `sup` elements from affecting the line height in 177 | * all browsers. 178 | */ 179 | 180 | sub, 181 | sup { 182 | font-size: 75%; 183 | line-height: 0; 184 | position: relative; 185 | vertical-align: baseline; 186 | } 187 | 188 | sub { 189 | bottom: -0.25em; 190 | } 191 | 192 | sup { 193 | top: -0.5em; 194 | } 195 | 196 | /* Embedded content 197 | ========================================================================== */ 198 | 199 | /** 200 | * Remove the border on images inside links in IE 10-. 201 | */ 202 | 203 | img { 204 | border-style: none; 205 | } 206 | 207 | /** 208 | * Hide the overflow in IE. 209 | */ 210 | 211 | svg:not(:root) { 212 | overflow: hidden; 213 | } 214 | 215 | /* Grouping content 216 | ========================================================================== */ 217 | 218 | /** 219 | * 1. Correct the inheritance and scaling of font size in all browsers. 220 | * 2. Correct the odd `em` font sizing in all browsers. 221 | */ 222 | 223 | code, 224 | kbd, 225 | pre, 226 | samp { 227 | font-family: monospace, monospace; /* 1 */ 228 | font-size: 1em; /* 2 */ 229 | } 230 | 231 | /** 232 | * Add the correct margin in IE 8. 233 | */ 234 | 235 | figure { 236 | margin: 1em 40px; 237 | } 238 | 239 | /** 240 | * 1. Add the correct box sizing in Firefox. 241 | * 2. Show the overflow in Edge and IE. 242 | */ 243 | 244 | hr { 245 | box-sizing: content-box; /* 1 */ 246 | height: 0; /* 1 */ 247 | overflow: visible; /* 2 */ 248 | } 249 | 250 | /* Forms 251 | ========================================================================== */ 252 | 253 | /** 254 | * 1. Change font properties to `inherit` in all browsers (opinionated). 255 | * 2. Remove the margin in Firefox and Safari. 256 | */ 257 | 258 | button, 259 | input, 260 | select, 261 | textarea { 262 | font: inherit; /* 1 */ 263 | margin: 0; /* 2 */ 264 | } 265 | 266 | /** 267 | * Restore the font weight unset by the previous rule. 268 | */ 269 | 270 | optgroup { 271 | font-weight: bold; 272 | } 273 | 274 | /** 275 | * Show the overflow in IE. 276 | * 1. Show the overflow in Edge. 277 | */ 278 | 279 | button, 280 | input { /* 1 */ 281 | overflow: visible; 282 | } 283 | 284 | /** 285 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 286 | * 1. Remove the inheritance of text transform in Firefox. 287 | */ 288 | 289 | button, 290 | select { /* 1 */ 291 | text-transform: none; 292 | } 293 | 294 | /** 295 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 296 | * controls in Android 4. 297 | * 2. Correct the inability to style clickable types in iOS and Safari. 298 | */ 299 | 300 | button, 301 | html [type="button"], /* 1 */ 302 | [type="reset"], 303 | [type="submit"] { 304 | -webkit-appearance: button; /* 2 */ 305 | } 306 | 307 | /** 308 | * Remove the inner border and padding in Firefox. 309 | */ 310 | 311 | button::-moz-focus-inner, 312 | [type="button"]::-moz-focus-inner, 313 | [type="reset"]::-moz-focus-inner, 314 | [type="submit"]::-moz-focus-inner { 315 | border-style: none; 316 | padding: 0; 317 | } 318 | 319 | /** 320 | * Restore the focus styles unset by the previous rule. 321 | */ 322 | 323 | button:-moz-focusring, 324 | [type="button"]:-moz-focusring, 325 | [type="reset"]:-moz-focusring, 326 | [type="submit"]:-moz-focusring { 327 | outline: 1px dotted ButtonText; 328 | } 329 | 330 | /** 331 | * Change the border, margin, and padding in all browsers (opinionated). 332 | */ 333 | 334 | fieldset { 335 | border: 1px solid #c0c0c0; 336 | margin: 0 2px; 337 | padding: 0.35em 0.625em 0.75em; 338 | } 339 | 340 | /** 341 | * 1. Correct the text wrapping in Edge and IE. 342 | * 2. Correct the color inheritance from `fieldset` elements in IE. 343 | * 3. Remove the padding so developers are not caught out when they zero out 344 | * `fieldset` elements in all browsers. 345 | */ 346 | 347 | legend { 348 | box-sizing: border-box; /* 1 */ 349 | color: inherit; /* 2 */ 350 | display: table; /* 1 */ 351 | max-width: 100%; /* 1 */ 352 | padding: 0; /* 3 */ 353 | white-space: normal; /* 1 */ 354 | } 355 | 356 | /** 357 | * Remove the default vertical scrollbar in IE. 358 | */ 359 | 360 | textarea { 361 | overflow: auto; 362 | } 363 | 364 | /** 365 | * 1. Add the correct box sizing in IE 10-. 366 | * 2. Remove the padding in IE 10-. 367 | */ 368 | 369 | [type="checkbox"], 370 | [type="radio"] { 371 | box-sizing: border-box; /* 1 */ 372 | padding: 0; /* 2 */ 373 | } 374 | 375 | /** 376 | * Correct the cursor style of increment and decrement buttons in Chrome. 377 | */ 378 | 379 | [type="number"]::-webkit-inner-spin-button, 380 | [type="number"]::-webkit-outer-spin-button { 381 | height: auto; 382 | } 383 | 384 | /** 385 | * 1. Correct the odd appearance in Chrome and Safari. 386 | * 2. Correct the outline style in Safari. 387 | */ 388 | 389 | [type="search"] { 390 | -webkit-appearance: textfield; /* 1 */ 391 | outline-offset: -2px; /* 2 */ 392 | } 393 | 394 | /** 395 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 396 | */ 397 | 398 | [type="search"]::-webkit-search-cancel-button, 399 | [type="search"]::-webkit-search-decoration { 400 | -webkit-appearance: none; 401 | } 402 | 403 | /** 404 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 405 | */ 406 | 407 | ::-webkit-input-placeholder { 408 | color: inherit; 409 | opacity: 0.54; 410 | } 411 | 412 | /** 413 | * 1. Correct the inability to style clickable types in iOS and Safari. 414 | * 2. Change font properties to `inherit` in Safari. 415 | */ 416 | 417 | ::-webkit-file-upload-button { 418 | -webkit-appearance: button; /* 1 */ 419 | font: inherit; /* 2 */ 420 | } 421 | 422 | header { 423 | background: #EEE; 424 | padding: 20px; 425 | text-align: center; 426 | } 427 | 428 | h1 { 429 | margin: 0; 430 | } 431 | 432 | main { 433 | max-width: 1000px; 434 | margin: 0 auto; 435 | padding: 20px; 436 | } 437 | input[type='text'] { 438 | width: 45%; 439 | } 440 | button[type='submit'] { 441 | width: 100%; 442 | border: solid 1px #111; 443 | background: #FFF; 444 | margin-top: 10px; 445 | } 446 | 447 | .item { 448 | margin-top: 20px; 449 | background: #FFF; 450 | box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22); 451 | padding: 20px; 452 | display: flex; 453 | justify-content: space-between; 454 | } 455 | 456 | .item p { 457 | font-size: 18px; 458 | margin: 0; 459 | } 460 | 461 | .item div { 462 | width: 40%; 463 | cursor: pointer; 464 | padding: 5px; 465 | text-align: center; 466 | transition: 0.3s ease all; 467 | border-bottom: solid 10px; 468 | } 469 | .item .vote-one { 470 | border-bottom-color: blue; 471 | } 472 | 473 | .item .vote-two { 474 | border-bottom-color: red; 475 | } 476 | 477 | .item > span { 478 | font-style: italic; 479 | color: #CCC; 480 | } 481 | 482 | .item div:hover { 483 | background: #EEE; 484 | } 485 | --------------------------------------------------------------------------------