filo_caspar/app/main/index.js

33 lines
733 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 = {}
2017-12-03 11:34:43 +00:00
require('../socket')
require('./store')
2016-04-10 08:37:05 +00:00
const m = require('mithril')
2017-12-03 11:34:43 +00:00
const Header = require('./header')
const Menu = require('./menu')
const Add = require('./add')
const Graphic = require('./graphic')
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
});