var utils = require('../utils');
var menu = require('./menu');
var gamesMenu = require('./gamesMenu');
var loginModal = require('./loginModal');

function headerHeight() {
  var d = utils.getViewportDims();
  return (d.vh - d.vw) / 2;
}

module.exports = {

  board: function(header, content, footer, aside, overlay) {
    var view = [
      m('main#page', {
        class: menu.isOpen ? 'out' : ''
      }, [
        m('header.main_header.board', { style: { height: headerHeight() + 'px' }}, header()),
        content(),
        m('footer.main_footer.board', { style: { height: headerHeight() + 'px' }}, footer()),
        m('div.menu-close-overlay', {
          config: utils.ontouchend(menu.close)
        })
      ]),
      m('aside#side_menu', aside()),
      gamesMenu.view(),
      loginModal.view()
    ];
    if (overlay) view.push(overlay());
    return m('div.view-container', view);
  }

};

@@ -308,16 +308,26 @@
  overlay
+, povColor
 ) %7B%0A    
@@ -376,16 +376,28 @@
   class:
+ %5B%0A         
  menu.is
@@ -413,16 +413,67 @@
 ut' : ''
+,%0A          povColor %7C%7C 'white'%0A        %5D.join(' ')
 %0A      %7D

fix OTB reversed pieces