diff --git a/web/.meteor/.finished-upgraders b/.meteor/.finished-upgraders similarity index 100% rename from web/.meteor/.finished-upgraders rename to .meteor/.finished-upgraders diff --git a/web/.meteor/.gitignore b/.meteor/.gitignore similarity index 100% rename from web/.meteor/.gitignore rename to .meteor/.gitignore diff --git a/web/.meteor/.id b/.meteor/.id similarity index 100% rename from web/.meteor/.id rename to .meteor/.id diff --git a/web/.meteor/cordova-plugins b/.meteor/cordova-plugins similarity index 100% rename from web/.meteor/cordova-plugins rename to .meteor/cordova-plugins diff --git a/web/.meteor/packages b/.meteor/packages similarity index 100% rename from web/.meteor/packages rename to .meteor/packages diff --git a/web/.meteor/platforms b/.meteor/platforms similarity index 100% rename from web/.meteor/platforms rename to .meteor/platforms diff --git a/web/.meteor/release b/.meteor/release similarity index 100% rename from web/.meteor/release rename to .meteor/release diff --git a/web/.meteor/versions b/.meteor/versions similarity index 100% rename from web/.meteor/versions rename to .meteor/versions diff --git a/README.md b/README.md index 8a5cc68..1f056d9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ hckrs.io ![hckrs icon](https://s3.amazonaws.com/hckrs.io/static/logo/logo-icon-vector-mini.png) ========= -[**hckrs.io**](http://hckrs.io) is an invite only platform for hackers; for basicly anyone who has to make stuff, somehow related to technology. ***#web #design #growth #hardware #life...*** +[**hckrs.io**](http://hckrs.io) is an invite only platform for hackers; for basicly anyone who has to make stuff, somehow related to technology. ***#web #design #growth #hardware #life...*** [**Join your local city**](http://hckrs.io) to see it in action. *(Europe only for now)* Screenshot hckrs.io @@ -18,8 +18,8 @@ Get you hacking ######1. [Download](https://github.com/Jarnoleconte/hckrs.io/archive/development.zip) / clone this repo. ######2. Go to the ***hckrs*** folder in your terminal. ######3. Install dependencies: `source ./tools/install.sh` -######4. Move to the project `cd web` and startup a local server `hckrs run` -######5. Open [http://localhost:3000](http://localhost:3000) in your browser and login with ***Twitter*** ([why?](https://github.com/Jarnoleconte/hckrs.io/wiki/Run-Project#login-at-the-site)) +######4. Start up a local server `hckrs run` +######5. Open [http://localhost:3000](http://localhost:3000) in your browser and login with ***Twitter*** ([why?](https://github.com/Jarnoleconte/hckrs.io/wiki/Run-Project#login-at-the-site)) *Support for* ***OS X*** *and* ***Linux*** *right now.* *Meteor has no solid support for windows yet.* @@ -27,7 +27,7 @@ Get you hacking -Roadmap +Roadmap -------- * Subcultures with meetups @@ -49,10 +49,10 @@ Roadmap Documentation -------------- -Read the [wiki](https://github.com/Jarnoleconte/hckrs.io/wiki) to get understanding of the project structure. +Read the [wiki](https://github.com/Jarnoleconte/hckrs.io/wiki) to get understanding of the project structure. -Techniqual documentation is available during development. -Start up a local server and navigate in your browser to: +Techniqual documentation is available during development. +Start up a local server and navigate in your browser to: [http://localhost:3000/docs](http://localhost:3000/docs) @@ -67,7 +67,7 @@ Partners in crime The [hckrs.io](http://hckrs.io) core team is open. Toon | Jarno | Daan | Daniël | Steven -:---:|:-----:|:----:|:------:|:------: +:---:|:-----:|:----:|:------:|:------: Toon van Ramshorst | Jarno Le Conté | Daan van Ramshorst | Daniël Heres | Steven den Hartog co-founder | lead-dev | growth | core-dev | core-dev @@ -75,11 +75,11 @@ co-founder | lead-dev | growth | core-dev | core-dev Getting involved? ------------------ -No need to be a developer to contribute. We have ambitous plans that require all kinds of skills, you may be good in ***video, story telling, copywriting, blogging, interviewing/podcasting, mobile apps, events, curation, hackatons, recruitment***. +No need to be a developer to contribute. We have ambitous plans that require all kinds of skills, you may be good in ***video, story telling, copywriting, blogging, interviewing/podcasting, mobile apps, events, curation, hackatons, recruitment***. We are looking for people that make things happen. (**BAM!**) -It's also okay to just start developing (making changes to this repo). Feel free to work on issues or add your own. Do a pull request when you are done. +It's also okay to just start developing (making changes to this repo). Feel free to work on issues or add your own. Do a pull request when you are done. **GO!** diff --git a/web/Routes.js b/Routes.js similarity index 84% rename from web/Routes.js rename to Routes.js index 06baebc..ccd0b04 100644 --- a/web/Routes.js +++ b/Routes.js @@ -116,7 +116,6 @@ FrontpageController = DefaultController.extend({ template: 'frontpage', waitOn: function() { return [ - Meteor.subscribe('currentUser'), Meteor.subscribe('staff'), Meteor.subscribe('ambassadors') ]; @@ -131,20 +130,14 @@ FrontpageController = DefaultController.extend({ AgendaController = DefaultController.extend({ template: 'agenda', waitOn: function () { - return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise - ]; + return []; } }); BooksController = DefaultController.extend({ template: 'books', waitOn: function () { - return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise - ]; + return []; } }); @@ -152,13 +145,11 @@ DealsController = DefaultController.extend({ template: 'deals', waitOn: function () { var city = Url.city(); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise - ].concat(!city ? [] : [ Meteor.subscribe('deals', city), Meteor.subscribe('dealsSort', city) - ]); + ]; } }); @@ -166,16 +157,15 @@ HackerController = DefaultController.extend({ template: 'hacker', waitOn: function () { return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('userByBitHash', this.params.bitHash) ]; }, onBeforeAction: function() { - if (this.ready() && !this.initialized) { + if (this.ready()) { var userId = (Users.userForBitHash(this.params.bitHash) || {})._id; Session.set('hackerId', userId); - Session.set('hackerEditMode', Users.myProp('isAccessDenied')); - this.initialized = true; + if (Users.myProp('isAccessDenied')) + Session.set('hackerEditMode', true); } this.next(); } @@ -184,10 +174,12 @@ HackerController = DefaultController.extend({ HackersController = DefaultController.extend({ template: 'hackers', waitOn: function () { + var city = Url.city(); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), Meteor.subscribe('invitations'), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('usersOfCity', city), + Meteor.subscribe('usersInvitedByUser', Meteor.userId()) ]; } }); @@ -197,13 +189,12 @@ HighlightsController = DefaultController.extend({ template: 'highlights', waitOn: function() { var city = Url.city(); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise - ].concat(!city ? [] : [ + Meteor.subscribe('usersOfHighlightsOfCity', city), Meteor.subscribe('highlights', city), Meteor.subscribe('highlightsSort', city) - ]); + ]; }, onBeforeAction: function() { var city = Session.get('currentCity'); @@ -224,10 +215,11 @@ HighlightsController = DefaultController.extend({ InvitationsController = DefaultController.extend({ template: 'invitations', waitOn: function () { + var city = Url.city(); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), Meteor.subscribe('invitations'), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('usersInvitedByUser', Meteor.userId()) ]; } }); @@ -236,13 +228,12 @@ MapController = DefaultController.extend({ template: 'map', waitOn: function () { var city = Url.city(); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise - ].concat(!city ? [] : [ + Meteor.subscribe('usersOfCity', city), Meteor.subscribe('places', city), Meteor.subscribe('mapHackersLocations', {excludeCity: city}) // load anonym location data of all users world wide (XXX TODO: async) - ]); + ]; }, onAfterAction: function() { Interface.setHeaderStyle('fixed'); @@ -308,7 +299,7 @@ AdminController = DefaultAdminController.extend({ return []; }, onBeforeAction: function() { - this.redirect('admin_hackers'); + this.redirect('admin_highlights'); } }); @@ -322,12 +313,11 @@ AdminDashboardController = DefaultAdminController.extend({ AdminDealsController = DefaultAdminController.extend({ template: 'admin_deals', waitOn: function () { - var city = Session.get('currentCity'); var isAdmin = Users.hasAdminPermission(); + var city = Session.get('currentCity'); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('deals', isAdmin ? 'all' : city), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('deals', isAdmin ? 'all' : city) ]; } }); @@ -336,9 +326,7 @@ AdminEmailTemplatesController = DefaultAdminController.extend({ template: 'admin_emailTemplates', waitOn: function () { return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('emailTemplates'), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('emailTemplates') ]; } }); @@ -350,11 +338,9 @@ AdminGrowthController = DefaultAdminController.extend({ }, waitOn: function () { return [ - Meteor.subscribe('currentUser'), // load all github users from the selected city Meteor.subscribe('growthGithub', AdminGrowth.getCity()), - Meteor.subscribe('emailTemplates'), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('emailTemplates') ]; } }); @@ -362,9 +348,11 @@ AdminGrowthController = DefaultAdminController.extend({ AdminHackersController = DefaultAdminController.extend({ template: 'admin_hackers', waitOn: function () { + var isAdmin = Users.hasAdminPermission(); + var city = Session.get('currentCity'); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('users') // XXX be more precise + isAdmin ? Meteor.subscribe('usersAll') : Meteor.subscribe('usersOfCity', city) ]; } }); @@ -372,12 +360,11 @@ AdminHackersController = DefaultAdminController.extend({ AdminHighlightsController = DefaultAdminController.extend({ template: 'admin_highlights', waitOn: function () { - var city = Session.get('currentCity'); var isAdmin = Users.hasAdminPermission(); + var city = Session.get('currentCity'); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('highlights', isAdmin ? 'all' : city), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('highlights', isAdmin ? 'all' : city) ]; } }); @@ -386,12 +373,11 @@ AdminHighlightsController = DefaultAdminController.extend({ AdminPlacesController = DefaultAdminController.extend({ template: 'admin_places', waitOn: function () { - var city = Session.get('currentCity'); var isAdmin = Users.hasAdminPermission(); + var city = Session.get('currentCity'); + if (!city) return []; return [ - Meteor.subscribe('currentUser'), - Meteor.subscribe('places', isAdmin ? 'all' : city), - Meteor.subscribe('users') // XXX be more precise + Meteor.subscribe('places', isAdmin ? 'all' : city) ]; } }); diff --git a/web/client/admin/admin.html b/client/admin/admin.html similarity index 100% rename from web/client/admin/admin.html rename to client/admin/admin.html diff --git a/web/client/admin/admin.js b/client/admin/admin.js similarity index 93% rename from web/client/admin/admin.js rename to client/admin/admin.js index d374a02..bcf50ef 100644 --- a/web/client/admin/admin.js +++ b/client/admin/admin.js @@ -42,12 +42,14 @@ Field.fn.avatar = function(val) { /* DATA FIELD templates */ Field.edit = { + fieldId: 'id', key: 'id', label: 'edit', tmpl: Template.reactiveTable_editButton } Field.date = { + fieldId: 'createdAt', key: 'createdAt', label: 'date', sortByValue: true, @@ -56,6 +58,7 @@ Field.date = { } Field.city = { + fieldId: 'city', key: 'city', label: 'city', fn: function(val, obj) { @@ -65,6 +68,7 @@ Field.city = { } Field.private = { + fieldId: 'private', key: 'private', label: 'private', fn: function(val, obj) { @@ -74,6 +78,7 @@ Field.private = { } Field.url = { + fieldId: 'url', key: 'url', label: 'url', fn: function(val, obj) { diff --git a/web/client/admin/admin.styl b/client/admin/admin.styl similarity index 100% rename from web/client/admin/admin.styl rename to client/admin/admin.styl diff --git a/web/client/admin/dashboard/admin_dashboard.html b/client/admin/dashboard/admin_dashboard.html similarity index 100% rename from web/client/admin/dashboard/admin_dashboard.html rename to client/admin/dashboard/admin_dashboard.html diff --git a/web/client/admin/deals/admin_deals.html b/client/admin/deals/admin_deals.html similarity index 100% rename from web/client/admin/deals/admin_deals.html rename to client/admin/deals/admin_deals.html diff --git a/web/client/admin/deals/admin_deals.js b/client/admin/deals/admin_deals.js similarity index 61% rename from web/client/admin/deals/admin_deals.js rename to client/admin/deals/admin_deals.js index 71e3db0..92d9d6f 100644 --- a/web/client/admin/deals/admin_deals.js +++ b/client/admin/deals/admin_deals.js @@ -13,10 +13,10 @@ Template.admin_deals.helpers({ Field.date, Field.city, Field.private, - 'title', - 'description', + { fieldId: 'title', key: 'title', label: 'title'}, + { fieldId: 'description', key: 'description', label: 'description'}, Field.url, - 'code' + { fieldId: 'code', key: 'code', label: 'code'}, ], } } diff --git a/web/client/admin/emailTemplates/admin_emailTemplates.html b/client/admin/emailTemplates/admin_emailTemplates.html similarity index 90% rename from web/client/admin/emailTemplates/admin_emailTemplates.html rename to client/admin/emailTemplates/admin_emailTemplates.html index 89feeba..b191b47 100644 --- a/web/client/admin/emailTemplates/admin_emailTemplates.html +++ b/client/admin/emailTemplates/admin_emailTemplates.html @@ -1,22 +1,22 @@