filo_caspar/app/main.js

32 lines
797 B
JavaScript
Raw Normal View History

2016-04-10 08:37:05 +00:00
/**
* @license
* caspar-sup <https://filadelfia.is>
* Copyright 2015 Jonatan Nilsson <http://jonatan.nilsson.is/>
*
* Available under WTFPL License (http://www.wtfpl.net/txt/copying/)
*/
'use strict'
//Add debug components to window. Allows us to play with controls
//in the console.
window.components = {}
require('./socket')
require('./controller/store')
const m = require('mithril')
2016-04-14 04:01:51 +00:00
const Header = require('./controller/header')
2016-04-10 08:37:05 +00:00
const Menu = require('./controller/menu')
2016-04-14 04:01:51 +00:00
const Add = require('./controller/add')
const Graphic = require('./controller/graphic/controller')
2016-04-10 08:37:05 +00:00
2016-04-14 04:01:51 +00:00
m.mount(document.getElementById('header'), Header)
2016-04-10 08:37:05 +00:00
m.mount(document.getElementById('menu'), Menu)
m.route(document.getElementById('content'), '/', {
'/': {},
2016-04-14 04:01:51 +00:00
'/add': Add,
'/graphic/:id': Graphic,
2016-04-10 08:37:05 +00:00
});