Skip to content

Instantly share code, notes, and snippets.

@talves
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talves/34c804982fba5afc7f37 to your computer and use it in GitHub Desktop.
Save talves/34c804982fba5afc7f37 to your computer and use it in GitHub Desktop.
/* globals define */
define(function(require, exports, module) {
'use strict';
// import dependencies
var Engine = require('famous/core/Engine');
var Surface = require('famous/core/Surface');
var HeaderFooterLayout = require('famous/views/HeaderFooterLayout');
var mainContext = Engine.createContext();
var layout = new HeaderFooterLayout({
headerSize: 100,
footerSize: 50
});
layout.header.add(new Surface({
content: 'Header',
classes: ['bg-ugly'],
properties: {
lineHeight: '100px',
textAlign: 'center'
}
}));
layout.content.add(new Surface({
content: 'Content',
//classes: ['grey-bg'],
properties: {
lineHeight: '400px',
textAlign: 'center'
}
}));
layout.footer.add(new Surface({
content: 'Footer',
//classes: ['red-bg'],
properties: {
lineHeight: '50px',
textAlign: 'center',
backgroundColor: 'blue'
}
}));
mainContext.add(layout);
});
html {
background: #fff;
}
.bg-ugly {
background: #ff0;
}
.backfaceVisibility {
-webkit-backface-visibility: visible;
backface-visibility: visible;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment