From da964a2a102d184e7b2d6b20323bc221d0e170f8 Mon Sep 17 00:00:00 2001 From: fazo96 Date: Sun, 1 Jun 2014 15:42:02 +0200 Subject: [PATCH] new homepage and mobile optimizations. (Fixed #11) --- README.md | 12 ++++++-- client/client.coffee | 3 +- client/view/head.html | 3 ++ client/view/templates.html | 62 ++++++++++++++++++++++++++++++++------ 4 files changed, 67 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index a36b40c..417fafa 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,20 @@ # Homework -Schoolwork management application for students. +Schoolwork management application for students. Built using +[Meteor](http://gihub.com/meteor/meteor), a Web App framework on top of Node.js +and MongoDB. + +I built this because I felt like the other apps didn't do it very well. +Also, I learnt a lot and had fun! ### Try it [the app is hosted online!](http://homework.meteor.com) ### Development Clone the repo, [install meteor](http://meteor.com) and **meteorite**. -Install dependent packages and then run `meteor`. That's it. +Install dependent packages with `mrt install` and then run `meteor`. That's it. +If you want to send emails (necessary to confirm users) you need to set the +`MAIL_URL` environment variable, or else the emails will be printed on stdout. + ### License The MIT License (MIT) diff --git a/client/client.coffee b/client/client.coffee index 4ed47ea..48c530b 100644 --- a/client/client.coffee +++ b/client/client.coffee @@ -33,11 +33,11 @@ Router.configure Router.map -> @route 'home', path: '/' + action: -> @render 'homepage', to: 'outside' onBeforeAction: -> # Dispatch user to the right landing page based on his account status if getUser() if amIValid() is yes then Router.go 'notes' else Router.go 'verifyEmail' - else Router.go 'login' @route 'login', onBeforeAction: -> Router.go 'home' if getUser() @route 'register', @@ -61,6 +61,7 @@ Router.map -> if err errCallback err; Router.go 'verifyEmail' else Router.go 'home' + @route 'homepage', action: -> @render '404' @route '404', path: '*' # You can't set a callback for when the user logs in using a cookie so... diff --git a/client/view/head.html b/client/view/head.html index d7c213e..9ab7299 100644 --- a/client/view/head.html +++ b/client/view/head.html @@ -2,4 +2,7 @@ Homework + + + diff --git a/client/view/templates.html b/client/view/templates.html index 0d9ebf8..ea2f659 100644 --- a/client/view/templates.html +++ b/client/view/templates.html @@ -7,6 +7,7 @@ management for students + {{> yield region='outside'}}
{{> yield}}
@@ -83,7 +84,7 @@ @@ -109,8 +114,10 @@ - - Home + + + Home {{/if}} @@ -121,7 +128,7 @@ {{> menu}}
-
+
@@ -180,7 +187,7 @@