Skip to content

Instantly share code, notes, and snippets.

@enricostano
Last active Aug 29, 2015
Embed
What would you like to do?
'use strict';
require("../../lib/bootstrap-3.1.1-dist/css/bootstrap.css");
require("../styles/main.css");
require("imports?jQuery=jquery!../../lib/bootstrap-3.1.1-dist/js/bootstrap.js");
var Backbone = require("backbone")
, Marionette = require("backbone.marionette")
, headerLayoutTemplate = require("../templates/header.handlebars")
, Katuma = new Marionette.Application({});
Katuma.rootRoute = "/";
Katuma.addRegions({
navRegion: "#js-nav-region"
, contentRegion: "#js-content-region"
});
Katuma.headerLayout = Backbone.Marionette.Layout.extend({
template: headerLayoutTemplate()
, regions: {
login: "#js-nav-login"
}
});
Katuma.addInitializer(function(options) {
var headerLayout = new Katuma.headerLayout();
Katuma.navRegion.show(headerLayout);
});
Katuma.on("initialize:after", function(){
Backbone.history.start();
});
Katuma.start();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment