Permalink
Browse files

initial

  • Loading branch information...
albertkai committed Aug 2, 2017
0 parents commit 0f258aef9a2b9a0a2f22403ae5692b1c4bfcb93d
Showing with 2,308 additions and 0 deletions.
  1. +8 −0 .gitignore
  2. +17 −0 .meteor/.finished-upgraders
  3. +1 −0 .meteor/.gitignore
  4. +7 −0 .meteor/.id
  5. +21 −0 .meteor/packages
  6. +2 −0 .meteor/platforms
  7. +1 −0 .meteor/release
  8. +77 −0 .meteor/versions
  9. +3 −0 client/main.html
  10. +1 −0 client/main.js
  11. +27 −0 imports/core/api/models/proposals/proposals.js
  12. +18 −0 imports/core/api/models/proposals/proposals_fixture.js
  13. +20 −0 imports/core/api/models/proposals/proposals_methods.js
  14. +5 −0 imports/core/api/models/proposals/proposals_pubs.js
  15. +1 −0 imports/core/index.js
  16. +22 −0 imports/core/startup/client/index.js
  17. +5 −0 imports/core/startup/client/routes.js
  18. +3 −0 imports/core/startup/server/index.js
  19. +64 −0 imports/core/ui/components/AppHeader.vue
  20. +109 −0 imports/core/ui/layouts/MainLayout.vue
  21. 0 imports/core/ui/pages/NotFound.vue
  22. +75 −0 imports/core/ui/styles/_base.scss
  23. +29 −0 imports/core/ui/styles/_fonts.scss
  24. +1,003 −0 imports/core/ui/styles/_mixins.scss
  25. +424 −0 imports/core/ui/styles/_normalize.scss
  26. +57 −0 imports/core/ui/styles/_variables.scss
  27. +1 −0 imports/voting/index.js
  28. +32 −0 imports/voting/ui/components/HistoryList.vue
  29. +51 −0 imports/voting/ui/components/ProposalFilter.vue
  30. +59 −0 imports/voting/ui/components/ProposalList.vue
  31. +41 −0 imports/voting/ui/pages/VotingPage.vue
  32. 0 imports/voting/ui/particles/HistoryItem.vue
  33. +59 −0 imports/voting/ui/particles/ProposalItem.vue
  34. +45 −0 npm-debug.log
  35. +19 −0 package.json
  36. BIN public/fonts/Roboto-Light.ttf
  37. BIN public/fonts/Roboto-Medium.ttf
  38. BIN public/fonts/RobotoCondensed-Bold.ttf
  39. BIN public/fonts/RobotoCondensed-Italic.ttf
  40. BIN public/images/logo_white.png
  41. +1 −0 server/main.js
@@ -0,0 +1,8 @@
node_modules/

# WebStorm
.idea
.idea?

.DS_Store
.DS_Store?
@@ -0,0 +1,17 @@
# This file contains information which helps Meteor properly upgrade your
# app when you run 'meteor update'. You should check it into version control
# with your project.

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

veua51vg9yk81ekf4pr
@@ -0,0 +1,21 @@
# Meteor packages used by this project, one per line.
# Check this file (and the other files in this directory) into your repository.
#
# 'meteor add' and 'meteor remove' will edit this file for you,
# but you can also edit it by hand.

meteor-base@1.1.0 # Packages every Meteor app needs to have
mobile-experience@1.0.4 # Packages for a great mobile UX
mongo@1.1.19 # The database Meteor supports right now
static-html # Define static page content in .html files
reactive-var@1.0.11 # Reactive variable for tracker
tracker@1.1.3 # Meteor's client-side reactive programming library

standard-minifier-css@1.3.4 # CSS minifier run for production mode
standard-minifier-js@2.1.1 # JS minifier run for production mode
es5-shim@4.6.15 # ECMAScript 5 compatibility for older browsers
ecmascript@0.8.1 # Enable ECMAScript2015+ syntax in app code
shell-server@0.2.4 # Server-side component of the `meteor shell` command
akryum:vue-component
aldeed:collection2-core
akryum:vue-sass
@@ -0,0 +1,2 @@
server
browser
@@ -0,0 +1 @@
METEOR@1.5.1
@@ -0,0 +1,77 @@
akryum:vue-component@0.10.3
akryum:vue-component-dev-client@0.2.12
akryum:vue-component-dev-server@0.0.10
akryum:vue-sass@0.0.8
aldeed:collection2-core@2.0.1
allow-deny@1.0.6
autoupdate@1.3.12
babel-compiler@6.19.4
babel-runtime@1.0.1
base64@1.0.10
binary-heap@1.0.10
blaze@2.3.2
blaze-tools@1.0.10
boilerplate-generator@1.1.1
caching-compiler@1.1.9
caching-html-compiler@1.1.2
callback-hook@1.0.10
check@1.2.5
ddp@1.3.0
ddp-client@2.0.0
ddp-common@1.2.9
ddp-server@2.0.0
deps@1.0.12
diff-sequence@1.0.7
dynamic-import@0.1.1
ecmascript@0.8.2
ecmascript-runtime@0.4.1
ecmascript-runtime-client@0.4.3
ecmascript-runtime-server@0.4.1
ejson@1.0.13
es5-shim@4.6.15
fastclick@1.0.13
geojson-utils@1.0.10
hot-code-push@1.0.4
html-tools@1.0.11
htmljs@1.0.11
http@1.2.12
id-map@1.0.9
jquery@1.11.10
launch-screen@1.1.1
livedata@1.0.18
logging@1.1.17
meteor@1.7.0
meteor-base@1.1.0
minifier-css@1.2.16
minifier-js@2.1.1
minimongo@1.2.1
mobile-experience@1.0.4
mobile-status-bar@1.0.14
modules@0.9.2
modules-runtime@0.8.0
mongo@1.1.22
mongo-id@1.0.6
npm-mongo@2.2.30
observe-sequence@1.0.16
ordered-dict@1.0.9
promise@0.8.9
raix:eventemitter@0.1.3
random@1.0.10
reactive-var@1.0.11
reload@1.1.11
retry@1.0.9
routepolicy@1.0.12
shell-server@0.2.4
spacebars@1.0.15
spacebars-compiler@1.1.2
standard-minifier-css@1.3.4
standard-minifier-js@2.1.1
static-html@1.2.2
templating-tools@1.1.2
tmeasday:check-npm-versions@0.3.1
tracker@1.1.3
ui@1.0.13
underscore@1.0.10
url@1.1.0
webapp@1.3.17
webapp-hashing@1.0.9
@@ -0,0 +1,3 @@
<body>
<app></app>
</body>
@@ -0,0 +1 @@
import '/imports/core/startup/client';
@@ -0,0 +1,27 @@
import SimpleSchema from 'simpl-schema'
import { Mongo } from 'meteor/mongo'

export const Proposals = new Mongo.Collection('proposals');

const proposalsType = new SimpleSchema({
title: {
type: 'String',
},
createdAt: {
type: Date,
},
updatedAt: {
type: Date,
},
total: {
type: Number,
},
agreed: {
type: Number,
},
doubt: {
type: Number,
},
});

Proposals.attachSchema(proposalsType);
@@ -0,0 +1,18 @@
import _ from 'underscore';

import { Proposals } from './proposals';

Proposals.remove({});
_.range(0, 10).forEach(i => {
const total = _.random(1000, 10000000);
const doubt = _.random(1, 100000);
const agreed = total - doubt;
Proposals.insert({
title: `Proposal ${i}. Some long proposal text to be agreed or doubted`,
createdAt: new Date(),
updatedAt: new Date(),
total,
agreed,
doubt,
});
});
@@ -0,0 +1,20 @@
import { Meteor } from 'meteor/meteor';
import { Proposals } from './proposals';
import moment from 'moment';
import _ from 'underscore';

Meteor.methods({
'proposals.add'(title) {
const total = _.random(1000, 10000000);
const doubt = _.random(1, 100000);
const agreed = total - doubt;
Proposals.insert({
title,
createdAt: new Date(),
updatedAt: new Date(),
total,
agreed,
doubt,
});
},
});
@@ -0,0 +1,5 @@
import { Proposals } from './proposals';

Meteor.publish('proposals.list', function proposals() {
return Proposals.find();
});
@@ -0,0 +1 @@
export { Proposals } from './api/models/proposals/proposals';
@@ -0,0 +1,22 @@
import Vue from 'vue';
import VueRouter from 'vue-router';

import VueMeteorTracker from 'vue-meteor-tracker';

import MainLayout from '../../ui/layouts/MainLayout.vue';
import routes from './routes';

Vue.use(VueMeteorTracker);
Vue.use(VueRouter);

const router = new VueRouter({
mode: 'history',
routes,
});

Meteor.startup(() => {
const app = new Vue({
router,
render: h => h(MainLayout),
}).$mount('app');
});
@@ -0,0 +1,5 @@
import VotingPage from '../../../voting/ui/pages/VotingPage.vue';

export default [
{ path: '/', name: 'voting', component: VotingPage },
];
@@ -0,0 +1,3 @@
import '../../api/models/proposals/proposals_methods';
import '../../api/models/proposals/proposals_pubs';
import '../../api/models/proposals/proposals_fixture';
@@ -0,0 +1,64 @@
<template>
<header>
<div class="container">
<img class="logo" src="/images/logo_white.png" alt="logo" />
<div class="stripe"></div>
<h3>Voting</h3>
<button>SUBMIT PROPOSAL</button>
</div>
</header>
</template>

<script>
export default {
data() {
return {
editedTodo: null,
};
},
methods: {
removeTodo(todo) {
console.log('yo');
},
},
}
</script>

<style lang="scss" scoped>
@import "/imports/core/ui/styles/mixins";
@import "/imports/core/ui/styles/variables";
header {
position: relative;
@include flex-grow(0);
@include flex-shrink(0);
background: $brand-color;
.logo {
height: 40px;
}
.container {
@include flexbox;
@include align-items(center);
}
}
.stripe {
width: 1px;
height: 40px;
background: white;
margin: $gutter;
}
button {
color: white;
border-color: white;
&:hover {
background: white;
color: $brand-color;
}
}
h3 {
color: white;
font-family: 'Roboto Light';
letter-spacing: .1em;
@include flex-grow(1);
}
</style>
Oops, something went wrong.

0 comments on commit 0f258ae

Please sign in to comment.