Pretty good looking homepage

This commit is contained in:
Ben Ramey
2014-04-07 21:40:35 -05:00
parent 4da312566e
commit 29206122aa
6 changed files with 42 additions and 22 deletions

View File

@@ -7,12 +7,20 @@ lunchApp = angular.module 'lunchApp', [
lunchApp.config ['$routeProvider',
($routeProvider) ->
$routeProvider
.when '/home',
templateUrl: 'templates/home.html',
controller: 'HomeCtrl'
.when '/run/create',
templateUrl: 'templates/create-run.html',
controller: 'CreateRunCtrl'
.when '/run/:id',
templateUrl: 'templates/run.html',
controller: 'RunCtrl'
.when '/run/:id/order/:inviteeName',
templateUrl: 'templates/create-order.html',
controller: 'CreateOrderCtrl'
.otherwise
redirectTo: '/home'
]
lunchApp.config ['$locationProvider',

View File

@@ -1,5 +1,7 @@
lunchControllers = angular.module 'lunchControllers'
lunchControllers.controller 'HomeCtrl', ['$scope',
HomeController = ($scope) ->
lunchControllers.controller 'HomeCtrl', ['$scope', '$location',
HomeController = ($scope,$location) ->
$scope.createRun = () ->
$location.path '/run/create'
]

View File

@@ -1,8 +1,11 @@
#home-page .pod {
margin-top: 5px;
padding: 20px;
background-color: rgba(0,0,0,0.6);
color: #eee;
background-color: rgba(0,0,0,0.8);
color: #ddd;
strong {
color: #fff;
}
h1 {
margin: 0;
}

View File

@@ -0,0 +1,24 @@
#home-page(ng-controller='HomeCtrl')
.row
.col-xs-12.col-sm-6.offset-md-2
#logo.pod
h1
| lunch run
span.text-muted  me
.row
.col-xs-12.col-sm-6.offset-md-2
#welcome.pod
p
| Organize a lunch run in less than a minute. All you need to know is
strong  who 
| you want to invite and
strong  where 
| you want to go.
p Get started below. No login required.
.row
.col-xs-12.col-sm-6.offset-md-2
#cta.pod
a.btn.btn-block(ng-click='createRun()')
| start a run  
span.glyphicon.glyphicon-chevron-right

View File

@@ -1,19 +1,4 @@
extends ../layout
block content
#home-page
.row
.col-xs-12.col-sm-6.offset-md-2
#logo.pod
h1 lunch run me
.row
.col-xs-12.col-sm-6.offset-md-2
#welcome.pod
| hello there
.row
.col-xs-12.col-sm-6.offset-md-2
#cta.pod
a.btn.btn-block
| start a run  
span.glyphicon.glyphicon-chevron-right
div(ng-view)

View File

@@ -20,8 +20,6 @@ html(lang="en",ng-app="lunchApp")
.container
#page
block content
div(ng-view)
// TEMPLATES
// TEMPLATES END