├── Procfile ├── .gitignore ├── public ├── img │ ├── blog.png │ ├── wine.png │ ├── discuss.png │ ├── github.png │ ├── twitter.png │ ├── download.png │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png ├── pics │ ├── momo.jpg │ ├── calera.jpg │ ├── hugel.jpg │ ├── ponzi.jpg │ ├── shafer.jpg │ ├── argiano.jpg │ ├── bouscat.jpg │ ├── capineto.png │ ├── caronne.jpg │ ├── dinastia.jpg │ ├── ex_umbris.jpg │ ├── fourvines.jpg │ ├── generic.jpg │ ├── lan_rioja.jpg │ ├── margerum.jpg │ ├── petalos.jpg │ ├── quivira.jpg │ ├── rex_hill.jpg │ ├── viticcio.jpg │ ├── block_nine.jpg │ ├── le_doyenne.jpg │ ├── morizottes.jpg │ ├── saint_cosme.jpg │ ├── waterbrook.jpg │ ├── bodega_lurton.jpg │ └── domaine_serene.jpg ├── css │ ├── img │ │ └── bg.jpg │ ├── styles.css │ ├── bootstrap-responsive.min.css │ └── bootstrap-responsive.css ├── js │ ├── views │ │ ├── about.js │ │ ├── home.js │ │ ├── header.js │ │ ├── paginator.js │ │ ├── winelist.js │ │ └── winedetails.js │ ├── utils.js │ ├── models │ │ └── models.js │ └── main.js ├── tpl │ ├── WineListItemView.html │ ├── AboutView.html │ ├── HomeView.html │ ├── HeaderView.html │ └── WineView.html ├── index.html ├── dashboard.html └── lib │ ├── underscore-min.js │ ├── backbone-min.js │ └── bootstrap.min.js ├── package.json ├── server.js ├── readme.md ├── serverwithanalytics.js └── routes └── wines.js /Procfile: -------------------------------------------------------------------------------- 1 | web: node serverwithanalytics.js 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /.idea 3 | Procfile 4 | .gitignore 5 | -------------------------------------------------------------------------------- /public/img/blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/blog.png -------------------------------------------------------------------------------- /public/img/wine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/wine.png -------------------------------------------------------------------------------- /public/pics/momo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/momo.jpg -------------------------------------------------------------------------------- /public/css/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/css/img/bg.jpg -------------------------------------------------------------------------------- /public/img/discuss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/discuss.png -------------------------------------------------------------------------------- /public/img/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/github.png -------------------------------------------------------------------------------- /public/img/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/twitter.png -------------------------------------------------------------------------------- /public/pics/calera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/calera.jpg -------------------------------------------------------------------------------- /public/pics/hugel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/hugel.jpg -------------------------------------------------------------------------------- /public/pics/ponzi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/ponzi.jpg -------------------------------------------------------------------------------- /public/pics/shafer.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/shafer.jpg -------------------------------------------------------------------------------- /public/img/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/download.png -------------------------------------------------------------------------------- /public/pics/argiano.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/argiano.jpg -------------------------------------------------------------------------------- /public/pics/bouscat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/bouscat.jpg -------------------------------------------------------------------------------- /public/pics/capineto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/capineto.png -------------------------------------------------------------------------------- /public/pics/caronne.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/caronne.jpg -------------------------------------------------------------------------------- /public/pics/dinastia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/dinastia.jpg -------------------------------------------------------------------------------- /public/pics/ex_umbris.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/ex_umbris.jpg -------------------------------------------------------------------------------- /public/pics/fourvines.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/fourvines.jpg -------------------------------------------------------------------------------- /public/pics/generic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/generic.jpg -------------------------------------------------------------------------------- /public/pics/lan_rioja.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/lan_rioja.jpg -------------------------------------------------------------------------------- /public/pics/margerum.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/margerum.jpg -------------------------------------------------------------------------------- /public/pics/petalos.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/petalos.jpg -------------------------------------------------------------------------------- /public/pics/quivira.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/quivira.jpg -------------------------------------------------------------------------------- /public/pics/rex_hill.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/rex_hill.jpg -------------------------------------------------------------------------------- /public/pics/viticcio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/viticcio.jpg -------------------------------------------------------------------------------- /public/pics/block_nine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/block_nine.jpg -------------------------------------------------------------------------------- /public/pics/le_doyenne.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/le_doyenne.jpg -------------------------------------------------------------------------------- /public/pics/morizottes.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/morizottes.jpg -------------------------------------------------------------------------------- /public/pics/saint_cosme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/saint_cosme.jpg -------------------------------------------------------------------------------- /public/pics/waterbrook.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/waterbrook.jpg -------------------------------------------------------------------------------- /public/pics/bodega_lurton.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/bodega_lurton.jpg -------------------------------------------------------------------------------- /public/pics/domaine_serene.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/pics/domaine_serene.jpg -------------------------------------------------------------------------------- /public/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /public/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/butchland/nodecellar/master/public/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /public/js/views/about.js: -------------------------------------------------------------------------------- 1 | window.AboutView = Backbone.View.extend({ 2 | 3 | initialize:function () { 4 | this.render(); 5 | }, 6 | 7 | render:function () { 8 | $(this.el).html(this.template()); 9 | return this; 10 | } 11 | 12 | }); -------------------------------------------------------------------------------- /public/js/views/home.js: -------------------------------------------------------------------------------- 1 | window.HomeView = Backbone.View.extend({ 2 | 3 | initialize:function () { 4 | this.render(); 5 | }, 6 | 7 | render:function () { 8 | $(this.el).html(this.template()); 9 | return this; 10 | } 11 | 12 | }); -------------------------------------------------------------------------------- /public/tpl/WineListItemView.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
<%= name %>
4 | <%= year %> <%= grapes %>
5 | <%= region %>, <%= country %> 6 |
7 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wine-cellar", 3 | "description": "Wine Cellar Application", 4 | "version": "0.0.1", 5 | "private": true, 6 | "dependencies": { 7 | "express": "3.x", 8 | "mongodb": "1.1.8", 9 | "socket.io": "0.9.10" 10 | }, 11 | "engines": { 12 | "node": "0.8.4", 13 | "npm": "1.1.49" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /public/js/views/header.js: -------------------------------------------------------------------------------- 1 | window.HeaderView = Backbone.View.extend({ 2 | 3 | initialize: function () { 4 | this.render(); 5 | }, 6 | 7 | render: function () { 8 | $(this.el).html(this.template()); 9 | return this; 10 | }, 11 | 12 | selectMenuItem: function (menuItem) { 13 | $('.nav li').removeClass('active'); 14 | if (menuItem) { 15 | $('.' + menuItem).addClass('active'); 16 | } 17 | } 18 | 19 | }); -------------------------------------------------------------------------------- /public/js/views/paginator.js: -------------------------------------------------------------------------------- 1 | window.Paginator = Backbone.View.extend({ 2 | 3 | className: "pagination pagination-centered", 4 | 5 | initialize:function () { 6 | this.model.bind("reset", this.render, this); 7 | this.render(); 8 | }, 9 | 10 | render:function () { 11 | 12 | var items = this.model.models; 13 | var len = items.length; 14 | var pageCount = Math.ceil(len / 8); 15 | 16 | $(this.el).html('