1

Archive Project

This commit is contained in:
Kim Wittenburg
2017-10-31 14:39:33 +01:00
commit a83ef869d5
29 changed files with 10211 additions and 0 deletions

32
src/controllers/home.js Normal file
View File

@@ -0,0 +1,32 @@
const homeController = new TKController({
id: 'home',
actions: [
{selector: '.play', action: bookletController.playFeature}
],
navigatesTo: [
{selector: '.features', controller: 'features'}
],
highlightedElement: '.play'
});
homeController.viewDidLoad = function () {
let mainMenuItems = [];
mainMenuItems.push({
type: 'div',
className: 'play button',
content: _('Play')
});
if (typeof appData.features !== 'undefined' && appData.features.length > 0) {
mainMenuItems.push({
type: 'div',
className: 'features button',
content: _('Features')
})
}
this.view.appendChild(TKUtils.buildElement({
type: 'container',
className: 'main-menu',
children: mainMenuItems
}));
};