Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 20 files changed
  • 0 comments
  • 1 contributor
2  application.coffee
@@ -2,6 +2,8 @@ bootstrapper = require('./bootstrapper')
2 2 express = require('express')
3 3 require('./extensions')
4 4
  5 +# TODO: Test
  6 +bootstrapper.bootstrapAuthentication()
5 7 application = express.createServer()
6 8
7 9 application.configure ->
40 bootstrapper.coffee
... ... @@ -1,12 +1,12 @@
1 1 express = require('express')
2 2 cradle = require('cradle')
  3 +everyauth = require('everyauth')
3 4 _ = require('underscore')
4 5 configuration = require('./configuration')
5 6 viewHelpers = require('./views/viewhelpers')
6 7 errors = require('./errors')
7 8 errorHandler = require('./errorhandler')
8 9
9   -
10 10 routes = require('./routes')
11 11 routes.runs = _.extend(require('./routes/runs'),
12 12 require('./routes/runs/new'),
@@ -23,21 +23,49 @@ validators.options = require('./validators/options')
23 23
24 24
25 25 exports.bootstrap = (application) ->
  26 + # bootstrapAuthentication()
26 27 bootstrapExpress(application)
27 28 bootstrapRoutes(application)
28   - bootstrapErrorHandler(application)
  29 + # TODO: Test
  30 + # bootstrapErrorHandler(application)
29 31 bootstrapCouchDB()
30 32
  33 +exports.bootstrapAuthentication = () ->
  34 + configuration.authenticationSettings((error, authentication) ->
  35 + if error
  36 + throw new errors.ConfigurationError('An error occured while reading the configuration settings for authenticating users.', error)
  37 +
  38 + everyauth.twitter
  39 + .consumerKey(authentication.twitter.consumerKey)
  40 + .consumerSecret(authentication.twitter.consumerSecret)
  41 + .findOrCreateUser(
  42 + (session, accessToken, accessTokenSecret, twitterUser) ->
  43 + console.log twitterUserData
  44 + console.log accessToken
  45 + console.log accessTokenSecret
  46 +
  47 + return twitterUser
  48 + # TODO: find user and if cannot be found, do not authenticate
  49 + )
  50 + .redirectPath('/')
  51 + )
  52 +
31 53 bootstrapExpress = (application) ->
32   - application.set('view engine', 'jade')
33 54 application.use(express.bodyParser())
34 55 application.use(express.methodOverride())
35   - application.use(express.static(__dirname + '/public'))
36 56 application.use(express.cookieParser())
37   - application.use(express.session({ secret: 'fluppe' }))
  57 + application.use(express.session( secret: '498f99f3bbee4ae3a075eada02499464' ))
  58 + application.use(everyauth.middleware())
  59 + application.use(application.router)
  60 + application.use(express.static(__dirname + '/public'))
  61 + application.use(express.errorHandler())
  62 +
  63 + everyauth.helpExpress(application)
38 64 application.helpers(viewHelpers)
39   - application.set('showStackTrace', application.settings.env == 'development')
40 65
  66 + application.set('view engine', 'jade')
  67 + application.set('showStackTrace', application.settings.env == 'development')
  68 +
41 69 bootstrapRoutes = (application) ->
42 70 application.get('/', routes.index)
43 71
36 configuration.coffee
@@ -3,15 +3,35 @@ fileSystem = require('fs')
3 3 module.exports = class Configuration
4 4 @settings = null;
5 5
  6 + @getSettings = (callback) ->
  7 + if @settings
  8 + return process.nextTick(=> callback(null, @settings))
  9 +
  10 + fileSystem.readFile('./config.json', 'utf8', (error, data) ->
  11 + if error
  12 + return process.nextTick(-> callback(error))
  13 +
  14 + @settings = JSON.parse(data)
  15 + process.nextTick(=> callback(error, @settings))
  16 + )
  17 +
6 18 @couchDBSettings: (callback) ->
7   - if !@settings
8   - fileSystem.readFile('./config.json', 'utf8', (error, data) ->
  19 + @getSettings((error, settings)->
9 20 if error
10   - process.nextTick(-> callback(error))
  21 + return callback(error)
11 22
12   - @settings = JSON.parse(data)
13   -
14   - process.nextTick(=> callback(error, @settings.couchDB))
  23 + callback(error, settings.couchDB)
15 24 )
16   - else
17   - process.nextTick(=> callback(error, @settings.couchDB))
  25 +
  26 + @authenticationSettings: (callback) ->
  27 + @getSettings((error, settings)->
  28 + if error
  29 + return callback(error)
  30 +
  31 + callback(error, settings.authentication)
  32 + )
  33 +
  34 +
  35 +
  36 +
  37 +
10 data/options.coffee
@@ -11,13 +11,13 @@ module.exports = class Options
11 11 _database.view('options/all', { limit: 1 },
12 12 (error, response) ->
13 13 if error
14   - return process.nextTick(-> callback(error))
  14 + return callback(error)
15 15
16 16 if(0 == response.length)
17 17 return callback(error, null)
18 18
19 19 options = mapFrom(response[0].value)
20   - process.nextTick(-> callback(error, options))
  20 + callback(error, options)
21 21 )
22 22
23 23 save: (options, callback) ->
@@ -29,12 +29,12 @@ module.exports = class Options
29 29 _database.save(id, revision, options,
30 30 (error, response) ->
31 31 if error
32   - process.nextTick(-> callback(error))
  32 + return callback(error)
33 33
34   - process.nextTick(-> callback(error,
  34 + callback(error,
35 35 id: response.id
36 36 revision: response.revision
37   - ))
  37 + )
38 38 )
39 39
40 40 mapFrom = (document) ->
18 data/runs.coffee
@@ -12,24 +12,24 @@ module.exports = class Runs
12 12 getById: (id, callback) ->
13 13 _database.get(id, (error, response) ->
14 14 if error
15   - return process.nextTick(-> callback(error))
  15 + return callback(error)
16 16
17 17 run = mapFrom(response)
18   - process.nextTick(-> callback(error, run))
  18 + callback(error, run)
19 19 )
20 20
21 21 getNumberOfRunsPerYear: (callback) ->
22 22 _database.view('runs/runCountPerYear', { group: true, descending: true },
23 23 (error, response) ->
24 24 if error
25   - return process.nextTick(-> callback(error))
  25 + return callback(error)
26 26
27 27 runsPerYear = _(response).map((document) ->
28 28 year: document.key
29 29 numberOfRuns: document.value
30 30 )
31 31
32   - process.nextTick(-> callback(error, runsPerYear))
  32 + callback(error, runsPerYear)
33 33 )
34 34
35 35 getRunsByYear: (year, callback) ->
@@ -39,12 +39,12 @@ module.exports = class Runs
39 39 _database.view('runs/runsByYear', { startkey: startDate, endkey: endDate, descending: true }
40 40 (error, response) ->
41 41 if error
42   - return process.nextTick(-> callback(error))
  42 + return callback(error)
43 43
44 44 runs = _(response).map((document) ->
45 45 mapFrom(document.value))
46 46
47   - process.nextTick(-> callback(error, runs))
  47 + callback(error, runs)
48 48 )
49 49
50 50 save: (run, callback) ->
@@ -56,12 +56,12 @@ module.exports = class Runs
56 56 _database.save(id, revision, run,
57 57 (error, response) ->
58 58 if error
59   - process.nextTick(-> callback(error))
  59 + return callback(error)
60 60
61   - process.nextTick(-> callback(error,
  61 + callback(error,
62 62 id: response.id
63 63 revision: response.revision
64   - ))
  64 + )
65 65 )
66 66
67 67 mapFrom = (document) ->
18 data/shoes.coffee
@@ -11,29 +11,29 @@ module.exports = class Shoes
11 11 getById: (id, callback) ->
12 12 _database.get(id, (error, response) ->
13 13 if error
14   - return process.nextTick(-> callback(error))
  14 + return callback(error)
15 15
16 16 shoes = mapFrom(response)
17   - process.nextTick(-> callback(error, shoes))
  17 + callback(error, shoes)
18 18 )
19 19
20 20 getAll: (callback) ->
21 21 _database.view('shoes/all', { descending: true },
22 22 (error, response) ->
23 23 if error
24   - return process.nextTick(-> callback(error))
  24 + return callback(error)
25 25
26 26 shoesInUse = _(response).map((document) -> mapFrom(document.value))
27   - process.nextTick(-> callback(error, shoesInUse))
  27 + callback(error, shoesInUse)
28 28 )
29 29
30 30 getShoesInUse: (callback) ->
31 31 _database.view('shoes/inUse', { descending: true }, (error, response) ->
32 32 if error
33   - return process.nextTick(-> callback(error))
  33 + return callback(error)
34 34
35 35 shoesInUse = _(response).map((document) -> mapFrom(document.value))
36   - process.nextTick(-> callback(error, shoesInUse))
  36 + callback(error, shoesInUse)
37 37 )
38 38
39 39 save: (shoes, callback) ->
@@ -45,12 +45,12 @@ module.exports = class Shoes
45 45 _database.save(id, revision, shoes,
46 46 (error, response) ->
47 47 if error
48   - process.nextTick(-> callback(error))
  48 + return callback(error)
49 49
50   - process.nextTick(-> callback(error,
  50 + callback(error,
51 51 id: response.id
52 52 revision: response.revision
53   - ))
  53 + )
54 54 )
55 55
56 56 mapFrom = (document) ->
11 data/users.coffee
... ... @@ -0,0 +1,11 @@
  1 +connectionManager = require('./connectionmanager')
  2 +_ = require('underscore')
  3 +
  4 +module.exports = class Shoes
  5 + _database = null
  6 +
  7 + constructor: ->
  8 + connection = connectionManager.getConnection()
  9 + _database = connection.database('trackmyrun')
  10 +
  11 +
3  package.json
@@ -15,6 +15,7 @@
15 15 "jade": "0.19.0",
16 16 "step": "0.0.5",
17 17 "underscore": "1.2.x",
18   - "cradle": "0.5.x"
  18 + "cradle": "0.5.x",
  19 + "everyauth": "0.2.x"
19 20 }
20 21 }
71 prototype/index.html
... ... @@ -1,71 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset="utf-8">
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="./style/bootstrap.css">
7   - <link rel="stylesheet" href="./style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container-fluid">
32   - <div class="sidebar">
33   - <div class="well">
34   - <h4>My Runs</h4>
35   - <ul>
36   - <li><a href="#">2011</a></li>
37   - <li><a href="#">2010</a></li>
38   - </ul>
39   - <h4>My Shoes</h4>
40   - <ul>
41   - <li><a href="#">Brooks Addiction 9 AP - C</a></li>
42   - <li><a href="#">Brooks Addiction 9 AP - B</a></li>
43   - </ul>
44   - </div>
45   - </div>
46   - <div class="content">
47   - <div class="hero-unit">
48   - <h1>Track My Run</h1>
49   - <p>Measure and improve your workouts</p>
50   - </div>
51   - <div class="row">
52   - <div class="span6">
53   - <h2>Runs</h2>
54   - <p>
55   - Create your very own activity log and follow up on your personal goals and milestones. Your activity allows you to track your pace, distance and heart rate after a run. Simple and effective activity tracking with no hassle.
56   - </p>
57   - </div>
58   - <div class="span6">
59   - <h2>Shoes</h2> <h2><h2>
60   - <p>
61   - Running shoes are the most important pieces of equipment needed by any runner. Besides choosing the most suitable pair, keeping track of the wear of your running shoes is essential to prevent stress and overuse injuries.
62   - </p>
63   - </div>
64   - </div>
65   - <footer>
66   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
67   - </footer>
68   - </div>
69   - </div>
70   - </body>
71   -</html>
64 prototype/options/index.html
... ... @@ -1,64 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container-fluid">
32   - <div class="sidebar">
33   - <div class="well">
34   - <h4>Options</h4>
35   - <ul>
36   - <li><a href="#">Shoes</a></li>
37   - </ul>
38   - </div>
39   - </div>
40   - <div class="content">
41   - <div class="page-header">
42   - <h1>Shoes</h1>
43   - </div>
44   - <form>
45   - <fieldset>
46   - <div class="clearfix">
47   - <label>Wear threshold</label>
48   - <div class="input">
49   - <input class="span2" type="text"/>
50   - <span class="unit">km</span>
51   - </div>
52   - </div>
53   - <div class="actions">
54   - <button type="submit" class="btn primary">Save</button>
55   - </div>
56   - </fieldset>
57   - </form>
58   - <footer>
59   - <p>Copyright © 2011 Jan Van Ryswyck</p>
60   - </footer>
61   - </div>
62   - </div>
63   - </body>
64   -</html>
91 prototype/runs/edit.html
... ... @@ -1,91 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container">
32   - <div class="content">
33   - <div class="page-header">
34   - <h1 class="inline-title">Edit Run</h1>
35   - </div>
36   - <form>
37   - <fieldset>
38   - <div class="clearfix">
39   - <label>Date</label>
40   - <div class="input">
41   - <input class="span3" type="text"/>
42   - </div>
43   - </div>
44   - <div class="clearfix">
45   - <label>Distance</label>
46   - <div class="input">
47   - <input class="span2" type="text"/>
48   - <span class="unit">km</span>
49   - </div>
50   - </div>
51   - <div class="clearfix">
52   - <label>Duration</label>
53   - <div class="input">
54   - <input class="span3" type="text"/>
55   - </div>
56   - </div>
57   - <div class="clearfix">
58   - <label>Avg. Heart Rate</label>
59   - <div class="input">
60   - <input class="span2" type="text"/>
61   - <span class="unit">bpm</span>
62   - </div>
63   - </div>
64   - <div class="clearfix">
65   - <label>Shoes</label>
66   - <div class="input">
67   - <select class="span4" name="normalSelect">
68   - <option>Shoes A</option>
69   - <option>Shoes B</option>
70   - </select>
71   - </div>
72   - </div>
73   - <div class="clearfix">
74   - <label>Comments</label>
75   - <div class="input">
76   - <textarea class="span8" name="textarea" id="textarea" rows="4"></textarea>
77   - </div>
78   - </div>
79   - </fieldset>
80   - <div class="actions">
81   - <button type="submit" class="btn primary">Save</button>
82   - <button type="reset" class="btn">Cancel</button>
83   - </div>
84   - </form>
85   - <footer>
86   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
87   - </footer>
88   - </div>
89   - </div>
90   - </body>
91   -</html>
96 prototype/runs/index.html
... ... @@ -1,96 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container-fluid">
32   - <div class="sidebar">
33   - <div class="well">
34   - <h4>Year</h4>
35   - <ul>
36   - <li><a href="#">2011</a></li>
37   - <li><a href="#">2010</a></li>
38   - </ul>
39   - </div>
40   - </div>
41   - <div class="content">
42   - <div class="page-header">
43   - <h1 class="inline-title">My Runs in 2011</h1>
44   - <span class="top-command-buttons">
45   - <button class="btn primary">Add New Run</button>
46   - </span>
47   - </div>
48   - <table class="zebra-striped">
49   - <thead>
50   - <tr>
51   - <th>Date</th>
52   - <th>Distance</th>
53   - <th>Duration</th>
54   - <th>Avg. Heart Rate</th>
55   - <th>Shoes</th>
56   - <th></th>
57   - <th></th>
58   - </tr>
59   - </thead>
60   - <tbody>
61   - <tr>
62   - <td>We 14/09/2011</td>
63   - <td>14.74 km</td>
64   - <td>01u 30m 54s</td>
65   - <td>147 bpm</td>
66   - <td>Schoenen B</td>
67   - <td><a href="#">Edit</a></td>
68   - <td><a href="#">Delete</a></td>
69   - </tr>
70   - <tr>
71   - <td>Fr 16/09/2011</td>
72   - <td>14.54 km</td>
73   - <td>01u 24m 38s</td>
74   - <td>154 bpm</td>
75   - <td>Schoenen A</td>
76   - <td><a href="#">Edit</a></td>
77   - <td><a href="#">Delete</a></td>
78   - </tr>
79   - <tr>
80   - <td>Mo 19/09/2011</td>
81   - <td>7.6 km</td>
82   - <td>00u 37m 24s</td>
83   - <td>n/a</td>
84   - <td>Schoenen B</td>
85   - <td><a href="#">Edit</a></td>
86   - <td><a href="#">Delete</a></td>
87   - </tr>
88   - </tbody>
89   - </table>
90   - <footer>
91   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
92   - </footer>
93   - </div>
94   - </div>
95   - </body>
96   -</html>
91 prototype/runs/new.html
... ... @@ -1,91 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container">
32   - <div class="content">
33   - <div class="page-header">
34   - <h1 class="inline-title">New Run</h1>
35   - </div>
36   - <form>
37   - <fieldset>
38   - <div class="clearfix">
39   - <label>Date</label>
40   - <div class="input">
41   - <input class="span3" type="text"/>
42   - </div>
43   - </div>
44   - <div class="clearfix">
45   - <label>Distance</label>
46   - <div class="input">
47   - <input class="span2" type="text"/>
48   - <span class="unit">km</span>
49   - </div>
50   - </div>
51   - <div class="clearfix">
52   - <label>Duration</label>
53   - <div class="input">
54   - <input class="span3" type="text"/>
55   - </div>
56   - </div>
57   - <div class="clearfix">
58   - <label>Avg. Heart Rate</label>
59   - <div class="input">
60   - <input class="span2" type="text"/>
61   - <span class="unit">bpm</span>
62   - </div>
63   - </div>
64   - <div class="clearfix">
65   - <label>Shoes</label>
66   - <div class="input">
67   - <select class="span4" name="normalSelect">
68   - <option>Shoes A</option>
69   - <option>Shoes B</option>
70   - </select>
71   - </div>
72   - </div>
73   - <div class="clearfix">
74   - <label>Comments</label>
75   - <div class="input">
76   - <textarea class="span8" name="textarea" id="textarea" rows="4"></textarea>
77   - </div>
78   - </div>
79   - </fieldset>
80   - <div class="actions">
81   - <button type="submit" class="btn primary">Submit</button>
82   - <button type="reset" class="btn">Cancel</button>
83   - </div>
84   - </form>
85   - <footer>
86   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
87   - </footer>
88   - </div>
89   - </div>
90   - </body>
91   -</html>
74 prototype/shoes/edit.html
... ... @@ -1,74 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container">
32   - <div class="content">
33   - <div class="page-header">
34   - <h1 class="inline-title">Edit Pair of Shoes</h1>
35   - </div>
36   - <form>
37   - <fieldset>
38   - <div class="clearfix">
39   - <label>Name</label>
40   - <div class="input">
41   - <input class="span5" type="text"/>
42   - </div>
43   - </div>
44   - <div class="clearfix">
45   - <label>Size</label>
46   - <div class="input">
47   - <input class="span2" type="text"/>
48   - </div>
49   - </div>
50   - <div class="clearfix">
51   - <label>Color</label>
52   - <div class="input">
53   - <input class="span3" type="text"/>
54   - </div>
55   - </div>
56   - <div class="clearfix">
57   - <label>Purchase Date</label>
58   - <div class="input">
59   - <input class="span3" type="text"/>
60   - </div>
61   - </div>
62   - </fieldset>
63   - <div class="actions">
64   - <button type="submit" class="btn primary">Save</button>
65   - <button type="reset" class="btn">Cancel</button>
66   - </div>
67   - </form>
68   - <footer>
69   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
70   - </footer>
71   - </div>
72   - </div>
73   - </body>
74   -</html>
104 prototype/shoes/index.html
... ... @@ -1,104 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container-fluid">
32   - <div class="sidebar">
33   - <div class="well">
34   - <h4>Active Pair of Shoes</h4>
35   - <ul>
36   - <li>Brooks Addiction 9 AP - C</li>
37   - <li>Brooks Addiction 9 AP - B</li>
38   - </ul>
39   - </div>
40   - </div>
41   - <div class="content">
42   - <div class="page-header">
43   - <h1 class="inline-title">My Shoes</h1>
44   - <span class="top-command-buttons">
45   - <button class="btn primary">Add New Pair of Shoes</button>
46   - </span>
47   - </div>
48   - <table class="zebra-striped">
49   - <thead>
50   - <tr>
51   - <th>Name</th>
52   - <th>Size</th>
53   - <th>Color</th>
54   - <th>Purchase Date</th>
55   - <th>Distance</th>
56   - <th>In use</th>
57   - <th>Status</th>
58   - <th></th>
59   - <th></th>
60   - </tr>
61   - </thead>
62   - <tbody>
63   - <tr>
64   - <td>Brooks Addiction 9 AP - C</td>
65   - <td>47.5</td>
66   - <td>White/Silver</td>
67   - <td>24/12/2010</td>
68   - <td>678</td>
69   - <td><input type="checkbox" checked="checked"/></td>
70   - <td>OK</td>
71   - <td><a href="#">Edit</a></td>
72   - <td><a href="#">Delete</a></td>
73   - </tr>
74   - <tr>
75   - <td>Brooks Addiction 9 AP - B</td>
76   - <td>47.5</td>
77   - <td>White/Blue</td>
78   - <td>15/12/2010</td>
79   - <td>625</td>
80   - <td><input type="checkbox" checked="checked"/></td>
81   - <td>OK</td>
82   - <td><a href="#">Edit</a></td>
83   - <td><a href="#">Delete</a></td>
84   - </tr>
85   - <tr>
86   - <td>Brooks Addiction 9 AP - A</td>
87   - <td>47.5</td>
88   - <td>White/Blue</td>
89   - <td>07/03/2010</td>
90   - <td>1450</td>
91   - <td><input type="checkbox"/></td>
92   - <td>Worn</td>
93   - <td><a href="#">Edit</a></td>
94   - <td><a href="#">Delete</a></td>
95   - </tr>
96   - </tbody>
97   - </table>
98   - <footer>
99   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
100   - </footer>
101   - </div>
102   - </div>
103   - </body>
104   -</html>
74 prototype/shoes/new.html
... ... @@ -1,74 +0,0 @@
1   -<!DOCTYPE html>
2   -<html lang="en">
3   - <head>
4   - <meta charset=utf-8>
5   - <title>Track My Run</title>
6   - <link rel="stylesheet" href="../style/bootstrap.css">
7   - <link rel="stylesheet" href="../style/trackmyrun.css">
8   - </head>
9   - <body>
10   - <div class="topbar">
11   - <div class="topbar-inner">
12   - <div class="container-fluid">
13   - <a class="brand" href="#">Track My Run</a>
14   - <ul class="nav">
15   - <li class="active">
16   - <a href="#">Home</a>
17   - </li>
18   - <li class="active">
19   - <a href="#">My Runs</a>
20   - </li>
21   - <li class="active">
22   - <a href="#">My Shoes</a>
23   - </li>
24   - <li class="active">
25   - <a href="#">Options</a>
26   - </li>
27   - </ul>
28   - </div>
29   - </div>
30   - </div>
31   - <div class="container">
32   - <div class="content">
33   - <div class="page-header">
34   - <h1 class="inline-title">New Pair of Shoes</h1>
35   - </div>
36   - <form>
37   - <fieldset>
38   - <div class="clearfix">
39   - <label>Name</label>
40   - <div class="input">
41   - <input class="span5" type="text"/>
42   - </div>
43   - </div>
44   - <div class="clearfix">
45   - <label>Size</label>
46   - <div class="input">
47   - <input class="span2" type="text"/>
48   - </div>
49   - </div>
50   - <div class="clearfix">
51   - <label>Color</label>
52   - <div class="input">
53   - <input class="span3" type="text"/>
54   - </div>
55   - </div>
56   - <div class="clearfix">
57   - <label>Purchase Date</label>
58   - <div class="input">
59   - <input class="span3" type="text"/>
60   - </div>
61   - </div>
62   - </fieldset>
63   - <div class="actions">
64   - <button type="submit" class="btn primary">Submit</button>
65   - <button type="reset" class="btn">Cancel</button>
66   - </div>
67   - </form>
68   - <footer>
69   - <p>Copyright © 2011 Jan Van Ryswyck.</p>
70   - </footer>
71   - </div>
72   - </div>
73   - </body>
74   -</html>
2,363 prototype/style/bootstrap.css
... ... @@ -1,2363 +0,0 @@
1   -/*!
2   - * Bootstrap v1.3.0
3   - *
4   - * Copyright 2011 Twitter, Inc
5   - * Licensed under the Apache License v2.0
6   - * http://www.apache.org/licenses/LICENSE-2.0
7   - *
8   - * Designed and built with all the love in the world @twitter by @mdo and @fat.
9   - * Date: Mon Oct 10 14:31:07 CDT 2011
10   - */
11   -/* Reset.less
12   - * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc).
13   - * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */
14   -html, body {
15   - margin: 0;
16   - padding: 0;
17   -}
18   -h1,
19   -h2,
20   -h3,
21   -h4,
22   -h5,
23   -h6,
24   -p,
25   -blockquote,
26   -pre,
27   -a,
28   -abbr,
29   -acronym,
30   -address,
31   -cite,
32   -code,
33   -del,
34   -dfn,
35   -em,
36   -img,
37   -q,
38   -s,
39   -samp,
40   -small,
41   -strike,
42   -strong,
43   -sub,
44   -sup,
45   -tt,
46   -var,
47   -dd,
48   -dl,
49   -dt,
50   -li,
51   -ol,
52   -ul,
53   -fieldset,
54   -form,
55   -label,
56   -legend,
57   -button,
58   -table,
59   -caption,
60   -tbody,
61   -tfoot,
62   -thead,
63   -tr,
64   -th,
65   -td {
66   - margin: 0;
67   - padding: 0;
68   - border: 0;
69   - font-weight: normal;
70   - font-style: normal;
71   - font-size: 100%;
72   - line-height: 1;
73   - font-family: inherit;
74   -}
75   -table {
76   - border-collapse: collapse;
77   - border-spacing: 0;
78   -}
79   -ol, ul {
80   - list-style: none;
81   -}
82   -q:before,
83   -q:after,
84   -blockquote:before,
85   -blockquote:after {
86   - content: "";
87   -}
88   -html {
89   - overflow-y: scroll;
90   - font-size: 100%;
91   - -webkit-text-size-adjust: 100%;
92   - -ms-text-size-adjust: 100%;
93   -}
94   -a:focus {
95   - outline: thin dotted;
96   -}
97   -a:hover, a:active {
98   - outline: 0;
99   -}
100   -article,
101   -aside,
102   -details,
103   -figcaption,
104   -figure,
105   -footer,
106   -header,
107   -hgroup,
108   -nav,
109   -section {
110   - display: block;
111   -}
112   -audio, canvas, video {
113   - display: inline-block;
114   - *display: inline;
115   - *zoom: 1;
116   -}
117   -audio:not([controls]) {
118   - display: none;
119   -}
120   -sub, sup {
121   - font-size: 75%;
122   - line-height: 0;
123   - position: relative;
124   - vertical-align: baseline;
125   -}
126   -sup {
127   - top: -0.5em;
128   -}
129   -sub {
130   - bottom: -0.25em;
131   -}
132   -img {
133   - border: 0;
134   - -ms-interpolation-mode: bicubic;
135   -}
136   -button,
137   -input,
138   -select,
139   -textarea {
140   - font-size: 100%;
141   - margin: 0;
142   - vertical-align: baseline;
143   - *vertical-align: middle;
144   -}
145   -button, input {
146   - line-height: normal;
147   - *overflow: visible;
148   -}
149   -button::-moz-focus-inner, input::-moz-focus-inner {
150   - border: 0;
151   - padding: 0;
152   -}
153   -button,
154   -input[type="button"],
155   -input[type="reset"],
156   -input[type="submit"] {
157   - cursor: pointer;
158   - -webkit-appearance: button;
159   -}
160   -input[type="search"] {
161   - -webkit-appearance: textfield;
162   - -webkit-box-sizing: content-box;
163   - -moz-box-sizing: content-box;
164   - box-sizing: content-box;
165   -}
166   -input[type="search"]::-webkit-search-decoration {
167   - -webkit-appearance: none;
168   -}
169   -textarea {
170   - overflow: auto;
171   - vertical-align: top;
172   -}
173   -/* Variables.less
174   - * Variables to customize the look and feel of Bootstrap
175   - * ----------------------------------------------------- */
176   -/* Mixins.less
177   - * Snippets of reusable CSS to develop faster and keep code readable
178   - * ----------------------------------------------------------------- */
179   -/*
180   - * Scaffolding
181   - * Basic and global styles for generating a grid system, structural layout, and page templates
182   - * ------------------------------------------------------------------------------------------- */
183   -html, body {
184   - background-color: #ffffff;
185   -}
186   -body {
187   - margin: 0;
188   - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
189   - font-size: 13px;
190   - font-weight: normal;
191   - line-height: 18px;
192   - color: #404040;
193   -}
194   -.container {
195   - width: 940px;
196   - margin-left: auto;
197   - margin-right: auto;
198   - zoom: 1;
199   -}
200   -.container:before, .container:after {
201   - display: table;
202   - content: "";
203   - zoom: 1;
204   - *display: inline;
205   -}
206   -.container:after {
207   - clear: both;
208   -}
209   -.container-fluid {
210   - position: relative;
211   - min-width: 940px;
212   - padding-left: 20px;
213   - padding-right: 20px;
214   - zoom: 1;
215   -}
216   -.container-fluid:before, .container-fluid:after {
217   - display: table;
218   - content: "";
219   - zoom: 1;
220   - *display: inline;
221   -}
222   -.container-fluid:after {
223   - clear: both;
224   -}
225   -.container-fluid > .sidebar {
226   - float: left;
227   - width: 220px;
228   -}
229   -.container-fluid > .content {
230   - margin-left: 240px;
231   -}
232   -a {
233   - color: #0069d6;
234   - text-decoration: none;
235   - line-height: inherit;
236   - font-weight: inherit;
237   -}
238   -a:hover {
239   - color: #00438a;
240   - text-decoration: underline;
241   -}
242   -.pull-right {
243   - float: right;
244   -}
245   -.pull-left {
246   - float: left;
247   -}
248   -.hide {
249   - display: none;
250   -}
251   -.show {
252   - display: block;
253   -}
254   -.row {
255   - zoom: 1;
256   - margin-left: -20px;
257   -}
258   -.row:before, .row:after {
259   - display: table;
260   - content: "";
261   - zoom: 1;
262   - *display: inline;
263   -}
264   -.row:after {
265   - clear: both;
266   -}
267   -[class*="span"] {
268   - display: inline;
269   - float: left;
270   - margin-left: 20px;
271   -}
272   -.span1 {
273   - width: 40px;
274   -}
275   -.span2 {
276   - width: 100px;
277   -}
278   -.span3 {
279   - width: 160px;
280   -}
281   -.span4 {
282   - width: 220px;
283   -}
284   -.span5 {
285   - width: 280px;
286   -}
287   -.span6 {
288   - width: 340px;
289   -}
290   -.span7 {
291   - width: 400px;
292   -}
293   -.span8 {
294   - width: 460px;
295   -}
296   -.span9 {
297   - width: 520px;
298   -}
299   -.span10 {
300   - width: 580px;
301   -}
302   -.span11 {
303   - width: 640px;
304   -}
305   -.span12 {
306   - width: 700px;
307   -}
308   -.span13 {
309   - width: 760px;
310   -}
311   -.span14 {
312   - width: 820px;
313   -}
314   -.span15 {
315   - width: 880px;
316   -}
317   -.span16 {
318   - width: 940px;
319   -}
320   -.span17 {
321   - width: 1000px;
322   -}
323   -.span18 {
324   - width: 1060px;
325   -}
326   -.span19 {
327   - width: 1120px;
328   -}
329   -.span20 {
330   - width: 1180px;
331   -}
332   -.span21 {
333   - width: 1240px;
334   -}
335   -.span22 {
336   - width: 1300px;
337   -}
338   -.span23 {
339   - width: 1360px;
340   -}
341   -.span24 {
342   - width: 1420px;
343   -}
344   -.offset1 {
345   - margin-left: 80px;
346   -}
347   -.offset2 {
348   - margin-left: 140px;
349   -}
350   -.offset3 {
351   - margin-left: 200px;
352   -}
353   -.offset4 {
354   - margin-left: 260px;
355   -}
356   -.offset5 {
357   - margin-left: 320px;
358   -}
359   -.offset6 {
360   - margin-left: 380px;
361   -}
362   -.offset7 {
363   - margin-left: 440px;
364   -}
365   -.offset8 {
366   - margin-left: 500px;
367   -}
368   -.offset9 {
369   - margin-left: 560px;
370   -}
371   -.offset10 {
372   - margin-left: 620px;
373   -}
374   -.offset11 {
375   - margin-left: 680px;
376   -}
377   -.offset12 {
378   - margin-left: 740px;
379   -}
380   -.span-one-third {
381   - width: 300px;
382   -}
383   -.span-two-thirds {
384   - width: 620px;
385   -}
386   -.offset-one-third {
387   - margin-left: 340px;
388   -}
389   -.offset-two-thirds {
390   - margin-left: 660px;
391   -}
392   -/* Typography.less
393   - * Headings, body text, lists, code, and more for a versatile and durable typography system
394   - * ---------------------------------------------------------------------------------------- */
395   -p {
396   - font-size: 13px;
397   - font-weight: normal;
398   - line-height: 18px;
399   - margin-bottom: 9px;
400   -}
401   -p small {
402   - font-size: 11px;
403   - color: #bfbfbf;
404   -}
405   -h1,
406   -h2,
407   -h3,
408   -h4,
409   -h5,
410   -h6 {
411   - font-weight: bold;
412   - color: #404040;
413   -}
414   -h1 small,
415   -h2 small,
416   -h3 small,
417   -h4 small,
418   -h5 small,
419   -h6 small {
420   - color: #bfbfbf;
421   -}
422   -h1 {
423   - margin-bottom: 18px;
424   - font-size: 30px;
425   - line-height: 36px;
426   -}
427   -h1 small {
428   - font-size: 18px;
429   -}
430   -h2 {
431   - font-size: 24px;
432   - line-height: 36px;
433   -}
434   -h2 small {
435   - font-size: 14px;
436   -}
437   -h3,
438   -h4,
439   -h5,
440   -h6 {
441   - line-height: 36px;
442   -}
443   -h3 {
444   - font-size: 18px;
445   -}
446   -h3 small {
447   - font-size: 14px;
448   -}
449   -h4 {
450   - font-size: 16px;
451   -}
452   -h4 small {
453   - font-size: 12px;
454   -}
455   -h5 {
456   - font-size: 14px;
457   -}
458   -h6 {
459   - font-size: 13px;
460   - color: #bfbfbf;
461   - text-transform: uppercase;
462   -}
463   -ul, ol {
464   - margin: 0 0 18px 25px;
465   -}
466   -ul ul,
467   -ul ol,
468   -ol ol,
469   -ol ul {
470   - margin-bottom: 0;
471   -}
472   -ul {
473   - list-style: disc;
474   -}
475   -ol {
476   - list-style: decimal;
477   -}
478   -li {
479   - line-height: 18px;
480   - color: #808080;
481   -}
482   -ul.unstyled {
483   - list-style: none;
484   - margin-left: 0;
485   -}
486   -dl {
487   - margin-bottom: 18px;
488   -}
489   -dl dt, dl dd {
490   - line-height: 18px;
491   -}
492   -dl dt {
493   - font-weight: bold;
494   -}
495   -dl dd {
496   - margin-left: 9px;
497   -}
498   -hr {
499   - margin: 20px 0 19px;
500   - border: 0;
501   - border-bottom: 1px solid #eee;
502   -}
503   -strong {
504   - font-style: inherit;
505   - font-weight: bold;
506   -}
507   -em {
508   - font-style: italic;
509   - font-weight: inherit;
510   - line-height: inherit;
511   -}
512   -.muted {
513   - color: #bfbfbf;
514   -}
515   -blockquote {
516   - margin-bottom: 18px;
517   - border-left: 5px solid #eee;
518   - padding-left: 15px;
519   -}
520   -blockquote p {
521   - font-size: 14px;
522   - font-weight: 300;
523   - line-height: 18px;
524   - margin-bottom: 0;
525   -}
526   -blockquote small {
527   - display: block;
528   - font-size: 12px;
529   - font-weight: 300;
530   - line-height: 18px;
531   - color: #bfbfbf;
532   -}
533   -blockquote small:before {
534   - content: '\2014 \00A0';
535   -}
536   -address {
537   - display: block;
538   - line-height: 18px;
539   - margin-bottom: 18px;
540   -}
541   -code, pre {
542   - padding: 0 3px 2px;
543   - font-family: Monaco, Andale Mono, Courier New, monospace;
544   - font-size: 12px;
545   - -webkit-border-radius: 3px;
546   - -moz-border-radius: 3px;
547   - border-radius: 3px;
548   -}
549   -code {
550   - background-color: #fee9cc;
551   - color: rgba(0, 0, 0, 0.75);
552   - padding: 1px 3px;
553   -}
554   -pre {
555   - background-color: #f5f5f5;
556   - display: block;
557   - padding: 8.5px;
558   - margin: 0 0 18px;
559   - line-height: 18px;
560   - font-size: 12px;
561   - border: 1px solid #ccc;
562   - border: 1px solid rgba(0, 0, 0, 0.15);
563   - -webkit-border-radius: 3px;
564   - -moz-border-radius: 3px;
565   - border-radius: 3px;
566   - white-space: pre;
567   - white-space: pre-wrap;
568   - word-wrap: break-word;
569   -}
570   -/* Forms.less
571   - * Base styles for various input types, form layouts, and states
572   - * ------------------------------------------------------------- */
573   -form {
574   - margin-bottom: 18px;
575   -}
576   -fieldset {
577   - margin-bottom: 18px;
578   - padding-top: 18px;
579   -}
580   -fieldset legend {
581   - display: block;
582   - padding-left: 150px;
583   - font-size: 19.5px;
584   - line-height: 1;
585   - color: #404040;
586   - *padding: 0 0 5px 145px;
587   - /* IE6-7 */
588   -
589   - *line-height: 1.5;
590   - /* IE6-7 */
591   -
592   -}
593   -form .clearfix {
594   - margin-bottom: 18px;
595   - zoom: 1;
596   -}
597   -form .clearfix:before, form .clearfix:after {
598   - display: table;
599   - content: "";
600   - zoom: 1;
601   - *display: inline;
602   -}
603   -form .clearfix:after {
604   - clear: both;
605   -}
606   -label,
607   -input,
608   -select,
609   -textarea {
610   - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
611   - font-size: 13px;
612   - font-weight: normal;
613   - line-height: normal;
614   -}
615   -label {
616   - padding-top: 6px;
617   - font-size: 13px;
618   - line-height: 18px;
619   - float: left;
620   - width: 130px;
621   - text-align: right;
622   - color: #404040;
623   -}
624   -form .input {
625   - margin-left: 150px;
626   -}
627   -input[type=checkbox], input[type=radio] {
628   - cursor: pointer;
629   -}
630   -input,
631   -textarea,
632   -select,
633   -.uneditable-input {
634   - display: inline-block;
635   - width: 210px;
636   - height: 18px;
637   - padding: 4px;
638   - font-size: 13px;
639   - line-height: 18px;
640   - color: #808080;
641   - border: 1px solid #ccc;
642   - -webkit-border-radius: 3px;