summaryrefslogtreecommitdiffstats
path: root/src/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/app.js')
-rw-r--r--src/js/app.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/js/app.js b/src/js/app.js
new file mode 100644
index 0000000..9269de5
--- /dev/null
+++ b/src/js/app.js
@@ -0,0 +1,21 @@
+import { load as load_template } from './templates';
+import Mustache from 'mustache';
+
+var template;
+var page = {
+
+};
+
+export function show() {
+ document.body.innerHTML = Mustache.render(template, page);
+}
+
+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