diff options
author | Humberto Alfonso Díaz <humberto.alfonso@asvito.es> | 2019-12-11 08:39:27 +0100 |
---|---|---|
committer | Lorenzo Tilve <ltilve@igalia.com> | 2020-02-04 19:12:47 +0100 |
commit | 6d8916c58d823b13b89477f59bf05373e87f3a98 (patch) | |
tree | 97142e38adc872fe58999b7d01f806d66153be3e /src/js/app.js | |
parent | fb39b8f31f9323f5e56670de2f382f7b19daed08 (diff) |
RESTRUCT Upadate homescreen layout
Diffstat (limited to 'src/js/app.js')
-rw-r--r-- | src/js/app.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 0000000..f308032 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1,27 @@ +import { load as load_template } from './templates'; +import * as network from './network'; +import * as apps from './apps'; +import * as time from './time'; +import Mustache from 'mustache'; + +var template; +var page = { + +}; + +export function show() { + document.body.innerHTML = Mustache.render(template, page); + network.init(document.getElementById('NetworkContainer')); + apps.init(document.getElementById('AppsContainer')); + time.init(document.getElementById('TimeContainer')); +} + +export function init() { + load_template('main.template.html').then(function(result) { + template = result; + Mustache.parse(template); + show(); + }, function(error) { + console.error('ERRROR loading main template', error); + }); +}
\ No newline at end of file |