Refactored and lots of modification. See README.md.

This commit is contained in:
Lars Jung 2012-04-16 12:53:54 +02:00
parent 859a680e19
commit 71ed41fa69
85 changed files with 3191 additions and 2969 deletions

View file

@ -0,0 +1,35 @@
module.define('view/spacing', [jQuery, 'core/settings', 'core/event'], function ($, allsettings, event) {
var defaults = {
maxWidth: 960,
top: 50,
right: "auto",
bottom: 50,
left: "auto"
},
settings = _.extend({}, defaults, allsettings.spacing),
adjustSpacing = function () {
$('#content').css({
'margin-top': settings.top + $('#topbar').outerHeight(),
'margin-bottom': settings.bottom + $('#bottombar').outerHeight()
});
},
init = function () {
$('#content').css({
'max-width': settings.maxWidth,
'margin-right': settings.right,
'margin-left': settings.left
});
event.sub('ready', adjustSpacing);
$(window).on('resize', adjustSpacing);
};
init();
});