From 0189dec725533175bbdca83f76c431966ea2a06d Mon Sep 17 00:00:00 2001 From: fazo96 Date: Sat, 4 Oct 2014 10:11:08 +0200 Subject: [PATCH] many improvements --- .meteor/packages | 2 ++ .meteor/versions | 1 + client/client.coffee | 9 ++++++++- client/style.less | 7 +++++++ client/templates.html | 16 ++++++++++++---- server/server.coffee | 1 + 6 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index 4f6673e..a225f84 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -9,3 +9,5 @@ mizzao:bootstrap-3 coffeescript less perak:markdown +natestrauser:font-awesome + diff --git a/.meteor/versions b/.meteor/versions index 5589375..906ce07 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -36,6 +36,7 @@ minimongo@1.0.3 mizzao:bootstrap-3@3.2.0_1 mobile-status-bar@1.0.0 mongo@1.0.6 +natestrauser:font-awesome@4.2.0 observe-sequence@1.0.2 ordered-dict@1.0.0 perak:markdown@1.0.4 diff --git a/client/client.coffee b/client/client.coffee index e7cd19e..89902aa 100644 --- a/client/client.coffee +++ b/client/client.coffee @@ -4,14 +4,21 @@ Router.configure layoutTemplate: 'layout' Router.map -> - @route 'home', path: '/' + @route 'home', + path: '/' + waitOn: -> Meteor.subscribe 'docs' @route 'doc', path: '/d/:_id' layoutTemplate: 'docLayout' waitOn: -> @docHandle = Meteor.subscribe 'doc', @params._id data: -> docs.findOne @params._id + action: -> + if @ready() + @render() + else @render 'loading' @route 'new' +Template.home.ndocs = -> docs.find().count() Template.new.events 'click #new-btn': (e,t) -> id = docs.insert diff --git a/client/style.less b/client/style.less index e69de29..4eb7cac 100644 --- a/client/style.less +++ b/client/style.less @@ -0,0 +1,7 @@ +.container { + max-width: 40em; +} + +#new-btn { + margin-top: 1em; +} diff --git a/client/templates.html b/client/templates.html index 83f1b6f..db33416 100644 --- a/client/templates.html +++ b/client/templates.html @@ -9,13 +9,15 @@