Rearrange things
This commit is contained in:
@@ -20,11 +20,14 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides for the settings in `config/controllers.js`
|
* Overrides for the settings in `config/controllers.js`
|
||||||
* (specific to RunController)
|
* (specific to RunController)
|
||||||
*/
|
*/
|
||||||
_config: {}
|
_config: {},
|
||||||
|
|
||||||
|
create: function(req,res) {
|
||||||
|
res.view();
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,20 +7,12 @@ lunchApp = angular.module 'lunchApp', [
|
|||||||
lunchApp.config ['$routeProvider',
|
lunchApp.config ['$routeProvider',
|
||||||
($routeProvider) ->
|
($routeProvider) ->
|
||||||
$routeProvider
|
$routeProvider
|
||||||
.when '/home',
|
|
||||||
templateUrl: 'templates/home.html',
|
|
||||||
controller: 'HomeCtrl'
|
|
||||||
.when '/run/create',
|
|
||||||
templateUrl: 'templates/create-run.html',
|
|
||||||
controller: 'CreateRunCtrl'
|
|
||||||
.when '/run/:id',
|
.when '/run/:id',
|
||||||
templateUrl: 'templates/run.html',
|
templateUrl: 'templates/run.html',
|
||||||
controller: 'RunCtrl'
|
controller: 'RunCtrl'
|
||||||
.when '/run/:id/order/:inviteeName',
|
.when '/run/:id/order/:inviteeName',
|
||||||
templateUrl: 'templates/create-order.html',
|
templateUrl: 'templates/create-order.html',
|
||||||
controller: 'CreateOrderCtrl'
|
controller: 'CreateOrderCtrl'
|
||||||
.otherwise
|
|
||||||
redirectTo: '/home'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
lunchApp.config ['$locationProvider',
|
lunchApp.config ['$locationProvider',
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
lunchControllers = angular.module 'lunchControllers'
|
|
||||||
|
|
||||||
lunchControllers.controller 'HomeCtrl', ['$scope', '$location',
|
|
||||||
HomeController = ($scope,$location) ->
|
|
||||||
$scope.createRun = () ->
|
|
||||||
$location.path '/run/create'
|
|
||||||
]
|
|
||||||
@@ -10,6 +10,7 @@ body {
|
|||||||
}
|
}
|
||||||
#page {
|
#page {
|
||||||
.interior {
|
.interior {
|
||||||
|
padding: 20px 40px;
|
||||||
background-color: rgba(0,0,0,0.8);
|
background-color: rgba(0,0,0,0.8);
|
||||||
box-shadow: 0px 0px 20px #000;
|
box-shadow: 0px 0px 20px #000;
|
||||||
|
|
||||||
@@ -20,9 +21,5 @@ body {
|
|||||||
font-size: 1.2em;
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.interior-content {
|
|
||||||
padding: 20px 40px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
#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
|
|
||||||
|
|
||||||
@@ -28,15 +28,15 @@
|
|||||||
|
|
||||||
module.exports.routes = {
|
module.exports.routes = {
|
||||||
|
|
||||||
// By default, your root route (aka home page) points to a view
|
// By default, your root route (aka home page) points to a view
|
||||||
// located at `views/home/index.ejs`
|
// located at `views/home/index.ejs`
|
||||||
//
|
//
|
||||||
// (This would also work if you had a file at: `/views/home.ejs`)
|
// (This would also work if you had a file at: `/views/home.ejs`)
|
||||||
'/': {
|
'/': {
|
||||||
view: 'home/index'
|
view: 'home/index'
|
||||||
}
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// But what if you want your home page to display
|
// But what if you want your home page to display
|
||||||
// a signup form located at `views/user/signup.ejs`?
|
// a signup form located at `views/user/signup.ejs`?
|
||||||
'/': {
|
'/': {
|
||||||
@@ -163,4 +163,3 @@ module.exports.routes = {
|
|||||||
* Finally, if nothing else matched, the default 404 handler is triggered.
|
* Finally, if nothing else matched, the default 404 handler is triggered.
|
||||||
* See `config/404.js` to adjust your app's 404 logic.
|
* See `config/404.js` to adjust your app's 404 logic.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
footer.navbar
|
|
||||||
.bg
|
|
||||||
.container
|
|
||||||
nav
|
|
||||||
ul.nav.navbar-nav.pull-left
|
|
||||||
li
|
|
||||||
a(href='/about') about
|
|
||||||
li
|
|
||||||
a(href='/privacy-policy') privacy policy
|
|
||||||
li
|
|
||||||
a(href='/how-we-use-your-info') how we use your info
|
|
||||||
p.photo-credits.pull-right.navbar-text
|
|
||||||
| All background photos are © Elaine Davis
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
header.navbar.navbar-default
|
|
||||||
a.navbar-brand(href='/') lunch run me
|
|
||||||
small.navbar-text ...where lunch runs are fun
|
|
||||||
@@ -1,4 +1,27 @@
|
|||||||
extends ../layout
|
extends ../layout
|
||||||
|
|
||||||
block content
|
block content
|
||||||
div(ng-view)
|
#home-page
|
||||||
|
.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(href='/run/create')
|
||||||
|
| start a run
|
||||||
|
span.glyphicon.glyphicon-chevron-right
|
||||||
|
|
||||||
|
|||||||
15
views/includes/head.jade
Normal file
15
views/includes/head.jade
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
title Lunch Run Me!
|
||||||
|
meta(charset='utf-8')
|
||||||
|
meta(http-equiv="X-UA-Compatible",content="IE-edge")
|
||||||
|
meta(name="viewport",content="width=device-width,initial-scale=1")
|
||||||
|
|
||||||
|
// STYLES
|
||||||
|
link(rel="stylesheet", href="/linker/styles/bootstrap-theme.css")
|
||||||
|
link(rel="stylesheet", href="/linker/styles/bootstrap.css")
|
||||||
|
link(rel="stylesheet", href="/linker/styles/app.css")
|
||||||
|
// STYLES END
|
||||||
|
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||||
|
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
36
views/interior-layout.jade
Normal file
36
views/interior-layout.jade
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
doctype html
|
||||||
|
html(lang="en",ng-app="lunchApp")
|
||||||
|
head
|
||||||
|
include head
|
||||||
|
body
|
||||||
|
.container
|
||||||
|
#page
|
||||||
|
.interior
|
||||||
|
include nav
|
||||||
|
h1
|
||||||
|
block pagetitle
|
||||||
|
|
||||||
|
block content
|
||||||
|
|
||||||
|
// TEMPLATES
|
||||||
|
|
||||||
|
// TEMPLATES END
|
||||||
|
|
||||||
|
// SCRIPTS
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/socket.io.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/sails.io.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/jquery-2.1.0.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/bootstrap.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/angular.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/angular-route.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/underscore.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/app.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/controllers/module.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/analytics.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/controllers/body-controller.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/controllers/create-order-controller.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/controllers/create-run-controller.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/controllers/run-controller.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/services/socket.js")
|
||||||
|
script(type="text/javascript", src="/linker/js/vendor/jquery.backstretch.min.js")
|
||||||
|
// SCRIPTS END
|
||||||
@@ -1,21 +1,7 @@
|
|||||||
doctype html
|
doctype html
|
||||||
html(lang="en",ng-app="lunchApp")
|
html(lang="en",ng-app="lunchApp")
|
||||||
head
|
head
|
||||||
title Lunch Run Me!
|
include head
|
||||||
meta(charset='utf-8')
|
|
||||||
meta(http-equiv="X-UA-Compatible",content="IE-edge")
|
|
||||||
meta(name="viewport",content="width=device-width,initial-scale=1")
|
|
||||||
|
|
||||||
// STYLES
|
|
||||||
link(rel="stylesheet", href="/linker/styles/bootstrap-theme.css")
|
|
||||||
link(rel="stylesheet", href="/linker/styles/bootstrap.css")
|
|
||||||
link(rel="stylesheet", href="/linker/styles/app.css")
|
|
||||||
// STYLES END
|
|
||||||
|
|
||||||
<!--[if lt IE 9]>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
|
||||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
|
|
||||||
<![endif]-->
|
|
||||||
body(ng-controller="BodyCtrl")
|
body(ng-controller="BodyCtrl")
|
||||||
.container
|
.container
|
||||||
#page
|
#page
|
||||||
@@ -38,7 +24,6 @@ html(lang="en",ng-app="lunchApp")
|
|||||||
script(type="text/javascript", src="/linker/js/controllers/body-controller.js")
|
script(type="text/javascript", src="/linker/js/controllers/body-controller.js")
|
||||||
script(type="text/javascript", src="/linker/js/controllers/create-order-controller.js")
|
script(type="text/javascript", src="/linker/js/controllers/create-order-controller.js")
|
||||||
script(type="text/javascript", src="/linker/js/controllers/create-run-controller.js")
|
script(type="text/javascript", src="/linker/js/controllers/create-run-controller.js")
|
||||||
script(type="text/javascript", src="/linker/js/controllers/home-controller.js")
|
|
||||||
script(type="text/javascript", src="/linker/js/controllers/run-controller.js")
|
script(type="text/javascript", src="/linker/js/controllers/run-controller.js")
|
||||||
script(type="text/javascript", src="/linker/js/services/socket.js")
|
script(type="text/javascript", src="/linker/js/services/socket.js")
|
||||||
script(type="text/javascript", src="/linker/js/vendor/jquery.backstretch.min.js")
|
script(type="text/javascript", src="/linker/js/vendor/jquery.backstretch.min.js")
|
||||||
|
|||||||
48
views/run/create.jade
Normal file
48
views/run/create.jade
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
include ../interior-layout
|
||||||
|
|
||||||
|
block pagetitle
|
||||||
|
span.glyphicon.glyphicon-chevron-right
|
||||||
|
| start a new lunch run
|
||||||
|
|
||||||
|
block content
|
||||||
|
.create-run-form(ng-controller='CreateRunCtrl')
|
||||||
|
form(name='form',novalidate,role='form')
|
||||||
|
section.name
|
||||||
|
.row
|
||||||
|
.col-xs-2.step-num
|
||||||
|
span.glyphicon.glyphicon-info-sign
|
||||||
|
.col-xs-10
|
||||||
|
input#name.form-control(type='text',ng-model='run.name',required,placeholder='Name your run')
|
||||||
|
section
|
||||||
|
.row
|
||||||
|
.col-xs-2.step-num
|
||||||
|
span.glyphicon.glyphicon-user
|
||||||
|
.col-xs-10
|
||||||
|
input#creatorName.form-control(type='text',ng-model='run.creatorName',required,placeholder='Your name')
|
||||||
|
input#creatorEmail.form-control(type='email',ng-model='run.creatorEmail',required,placeholder='Your email')
|
||||||
|
section
|
||||||
|
.row
|
||||||
|
.col-xs-2.step-num
|
||||||
|
span.glyphicon.glyphicon-map-marker
|
||||||
|
.col-xs-10
|
||||||
|
input#restaurant.form-control(type='text',ng-model='run.restaurant',placeholder='Restaurant')
|
||||||
|
input#menuUrl.form-control(type='url',ng-model='run.menuUrl',placeholder='Menu URL')
|
||||||
|
|
||||||
|
section.invitees
|
||||||
|
.row
|
||||||
|
.col-xs-2.step-num
|
||||||
|
span.glyphicon.glyphicon-list
|
||||||
|
.col-xs-10
|
||||||
|
.invitee.clearfix(ng-repeat='i in run.invitees')
|
||||||
|
input.form-control(ng-model='i.name',required,placeholder='Name')
|
||||||
|
input.form-control(ng-model='i.email',required,placeholder='Email')
|
||||||
|
button.btn.btn-warning(ng-click='removeInvitee($index)')
|
||||||
|
span.glyphicon.glyphicon-remove
|
||||||
|
|
||||||
|
button.btn.btn-default(ng-click='addInvitee()')
|
||||||
|
span.glyphicon.glyphicon-plus
|
||||||
|
| Invite another!
|
||||||
|
|
||||||
|
section.submit
|
||||||
|
button.btn.btn-lg.btn-primary.btn-block(ng-click="create(run)",ng-disabled="form.$invalid")
|
||||||
|
| Create
|
||||||
Reference in New Issue
Block a user