2018-07-16 05:31:21 +00:00
|
|
|
/**
|
|
|
|
* @license
|
|
|
|
* NFP ehf. <https://nfp.is>
|
|
|
|
* Copyright 2018 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 = {}
|
|
|
|
|
2019-12-23 02:38:56 +00:00
|
|
|
var m = require('mithril')
|
2019-12-21 23:34:48 +00:00
|
|
|
|
|
|
|
m.route.setOrig = m.route.set
|
|
|
|
m.route.set = function(path, data, options){
|
|
|
|
m.route.setOrig(path, data, options)
|
|
|
|
window.scrollTo(0, 0)
|
|
|
|
}
|
|
|
|
|
|
|
|
m.route.linkOrig = m.route.link
|
|
|
|
m.route.link = function(vnode){
|
|
|
|
m.route.linkOrig(vnode)
|
|
|
|
window.scrollTo(0, 0)
|
|
|
|
}
|
|
|
|
|
2019-12-23 02:38:56 +00:00
|
|
|
var Front = require('./front')
|
|
|
|
var Hosting = require('./hosting')
|
|
|
|
var Programming = require('./programming')
|
|
|
|
var Streaming = require('./streaming')
|
|
|
|
var Footer = require('./footer')
|
2018-07-16 05:31:21 +00:00
|
|
|
|
2019-12-21 23:34:48 +00:00
|
|
|
m.route.prefix = ''
|
|
|
|
m.route(document.getElementById('container'), '/', {
|
|
|
|
'/': Front,
|
|
|
|
'/hosting-solutions': Hosting,
|
|
|
|
'/programming-solutions': Programming,
|
|
|
|
'/video-solutions': Streaming,
|
|
|
|
})
|
|
|
|
m.mount(document.getElementById('footer'), Footer)
|