Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
frankrousseau committed Nov 6, 2012
1 parent b891915 commit 8a2d85d
Show file tree
Hide file tree
Showing 96 changed files with 33,339 additions and 10 deletions.
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
dump.rdb
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz

pids
logs
results

node_modules
npm-debug.log
npm-debug.log
.idea
.DS_Store
log/*.log
.c9revisions
coverage.html
.settings
doc

1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
4 changes: 0 additions & 4 deletions README.md

This file was deleted.

3 changes: 3 additions & 0 deletions app/controllers/application_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
before('protect from forgery', function () {
protectFromForgery('7b10b6b10e79c00c1fa0c817465e442e194fe0a6');
});
41 changes: 41 additions & 0 deletions app/views/layouts/application_layout.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title><%= title %></title>
<%- stylesheet_link_tag('bootstrap', 'style', 'bootstrap-responsive') %>
<%- javascript_include_tag('http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', 'bootstrap', 'rails', 'application') %>
<%- csrf_meta_tag() %>
</head>
<body>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<a class="brand" href="#">Project name</a>
</div>
</div>
</div>

<div class="container">
<% var flash = request.flash('info').pop(); if (flash) { %>
<div class="alert alert-info">
<a class="close" data-dismiss="alert">×</a>
<%- flash %>
</div>
<% } %>

<% flash = request.flash('error').pop(); if (flash) { %>
<div class="alert alert-error">
<a class="close" data-dismiss="alert">×</a>
<%- flash %>
</div>
<% }; %>

<%- body %>

<hr />
<footer>
<p>&copy; Company 2012</p>
</footer>
</div>
</body>
</html>
26 changes: 26 additions & 0 deletions client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
*.sass-cache

# OS or Editor folders
.DS_Store
.cache
.project
.settings
.tmproj
nbproject
Thumbs.db

# NPM packages folder.
node_modules/

# Brunch folder for temporary files.
tmp/
30 changes: 30 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Brunch with Eggs and Bacon

![](https://a248.e.akamai.net/camo.github.com/1c7212d12d1b170a4247587d46fa1c8a234538d0/687474703a2f2f662e636c2e6c792f6974656d732f3150343031313356326a336830563375305433532f363837343734373033613266326636643635366336353739363136633265363636633738363432653639373432663638376136363633356633353331333232653661373036372e6a706567)

My favorite brunch, fat and tasty!

[Twitter Bootstrap](http://twitter.github.com/bootstrap/) Javascript skeleton for [Brunch.io](http://brunch.io) with support for [SASS](http://sass-lang.com/), [LESS](http://lesscss.org/) and [Handlebars](http://handlebarsjs.com/). Also includes [Backbone.Mediator](https://github.com/chalbert/Backbone-Mediator) for Pub/Sub patterns.

## Getting started

Make sure to have [Brunch.io](http://brunch.io) installed.

Create your project using Eggs and Bacon with:

brunch new <your-project-name> -s github://nezoomie/brunch-eggs-and-bacon
Or simply copy the repository on your hard drive and rename it.

## Customize Bootstrap Stylesheets

All Bootstrap stylesheet files can be found separated into:

vendor/styles/bootstrap
They're in original [LESS](http://lesscss.org/) format in order to be easily customized, and compiled together with the app build.

## Exclude Bootstrap jQuery plugins

jQuery plugins used by Bootstrap are all listed (in the right order) inside the config.coffee file. Comment the ones you want to exclude from the build with a #. (Pay attention to dependencies!)

15 changes: 15 additions & 0 deletions client/app/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Application bootstrapper.
Application = {
initialize: function() {
var HomeView = require('views/home_view');
var Router = require('lib/router');
// Ideally, initialized classes should be kept in controllers & mediator.
// If you're making big webapp, here's more sophisticated skeleton
// https://github.com/paulmillr/brunch-with-chaplin
this.homeView = new HomeView();
this.router = new Router();
if (typeof Object.freeze === 'function') Object.freeze(this);
}
}

module.exports = Application;
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added client/app/assets/images/glyphicons-halflings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions client/app/assets/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Example brunch application</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="stylesheets/app.css">
<script src="javascripts/vendor.js"></script>
<script src="javascripts/app.js"></script>
<script>require('initialize');</script>
</head>
<body>

</body>
</html>
6 changes: 6 additions & 0 deletions client/app/initialize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
var application = require('application');

$(function() {
application.initialize();
Backbone.history.start();
});
11 changes: 11 additions & 0 deletions client/app/lib/router.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var application = require('application');

module.exports = Backbone.Router.extend({
routes: {
'': 'home'
},

home: function() {
$('body').html(application.homeView.render().el);
}
});
1 change: 1 addition & 0 deletions client/app/lib/view_helper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Put your handlebars.js helpers here.
Empty file added client/app/models/.gitkeep
Empty file.
4 changes: 4 additions & 0 deletions client/app/models/collection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Base class for all collections.
module.exports = Backbone.Collection.extend({

});
4 changes: 4 additions & 0 deletions client/app/models/model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Base class for all models.
module.exports = Backbone.Model.extend({

});
88 changes: 88 additions & 0 deletions client/app/styles/main.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
@import 'nib'

body
background: #91A2C0
font: bold 18px "Helvetica Neue", Arial, Helvetica, sans-serif

ul
list-style-type: none

a, a:visited
color: #F95A5A
text-decoration: none

a:hover
color: #665248

#home-view
width: 600px
height: 200px
margin: 20px auto

#content
background: #FFF
padding: 20px
border-radius: 4px

/* Default font settings */
body
font-size: 15px
color: #666
background: #fff
font-family: "KievitPro", "ff-kievit-web-pro-1","ff-kievit-web-pro-2", "Helvetica Neue", Arial, Helvetica, sans-serif

/* Headings */
h1, h2, h3, h4, h5
font-weight: normal
color: #222
clear: left

h1
font-size: 5em
line-height: 1.4
margin-bottom: 0.5em

h2
font-size: 2em
line-height: 1
margin-bottom: 0.5em

/* Text elements */
p
margin: 0 0 1.5em

a:focus, a:hover
color: #F95A5A
text-decoration: underline
a
color: #F95A5A
text-decoration: none

/* Lists */
ul, ol
margin: 0 1.5em 1.5em 0
list-style-type: none

/* Style */
#content
width: 605px
margin: 0 auto
margin-top: 40px
margin-bottom: 60px

h1
background: #91A2C0
background-repeat: no-repeat
background-position: 2px
color: #fff
width: 330px
padding-left: 18px
border-radius: 5px

#props
position: relative
top: 36px
font-size: 18px
padding-left: 373px
color: #eee
font-style: italic
7 changes: 7 additions & 0 deletions client/app/views/home_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var View = require('./view');
var template = require('./templates/home');

module.exports = View.extend({
id: 'home-view',
template: template
});
8 changes: 8 additions & 0 deletions client/app/views/templates/home.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#content
h1 Cozy template
h2 Welcome
ul
li
a(href="https://github.com/mycozycloud/cozy-notes/wiki/Development-environment") Documentation
li
a(href="https://github.com/mycozycloud") Github
19 changes: 19 additions & 0 deletions client/app/views/view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require('lib/view_helper');

// Base class for all views.
module.exports = Backbone.View.extend({
initialize: function() {
this.render = _.bind(this.render, this);
},

template: function() {},
getRenderData: function() {},

render: function() {
this.$el.html(this.template(this.getRenderData()));
this.afterRender();
return this;
},

afterRender: function() {}
});
65 changes: 65 additions & 0 deletions client/config.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
exports.config =
# Edit the next line to change default build path.
paths:
public: 'public'

files:
javascripts:
# Defines what file will be generated with `brunch generate`.
defaultExtension: 'js'
# Describes how files will be compiled & joined together.
# Available formats:
# * 'outputFilePath'
# * map of ('outputFilePath': /regExp that matches input path/)
# * map of ('outputFilePath': function that takes input path)
joinTo:
'javascripts/app.js': /^app/
'javascripts/vendor.js': /^vendor/
# Defines compilation order.
# `vendor` files will be compiled before other ones
# even if they are not present here.
order:
before: [
'vendor/scripts/console-helper.js',
'vendor/scripts/jquery-1.7.2.js',
'vendor/scripts/underscore-1.3.1.js',
'vendor/scripts/backbone-0.9.2.js',
'vendor/scripts/backbone-mediator.js',

# Twitter Bootstrap jquery plugins
'vendor/scripts/bootstrap/bootstrap-transition.js',
'vendor/scripts/bootstrap/bootstrap-alert.js',
'vendor/scripts/bootstrap/bootstrap-button.js',
'vendor/scripts/bootstrap/bootstrap-carousel.js',
'vendor/scripts/bootstrap/bootstrap-collapse.js',
'vendor/scripts/bootstrap/bootstrap-dropdown.js',
'vendor/scripts/bootstrap/bootstrap-modal.js',
'vendor/scripts/bootstrap/bootstrap-tooltip.js',
'vendor/scripts/bootstrap/bootstrap-popover.js',
'vendor/scripts/bootstrap/bootstrap-scrollspy.js',
'vendor/scripts/bootstrap/bootstrap-tab.js',
'vendor/scripts/bootstrap/bootstrap-typeahed.js'
]

stylesheets:
defaultExtension: 'styl'
joinTo: 'stylesheets/app.css'
order:
before: ['vendor/styles/normalize.css']
after: ['vendor/styles/helpers.css']
templates:
defaultExtension: 'jade'
joinTo: 'javascripts/app.js'

# Change this if you're using something other than backbone (e.g. 'ember').
# Content of files, generated with `brunch generate` depends on the setting.
# framework: 'backbone'

# Settings of web server that will run with `brunch watch [--server]`.
# server:
# # Path to your server node.js module.
# # If it's commented-out, brunch will use built-in express.js server.
# path: 'server.coffee'
# port: 3333
# # Run even without `--server` option?
# run: yes
Loading

0 comments on commit 8a2d85d

Please sign in to comment.