nfp_sites/nfp_is/app/index.js
Jonatan Nilsson 972dde2c74
All checks were successful
/ nfp_moe (push) Successful in -83h47m27s
continuous-integration/appveyor/branch AppVeyor build succeeded
/ saproxy (push) Successful in -83h47m29s
/ discord_embed (push) Successful in -83h47m28s
/ nfp_is (push) Successful in -83h46m7s
nfp_is: moved nfpis over here
2023-11-05 05:38:10 +00:00

42 lines
1,018 B
JavaScript

/**
* @license
* NFP <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 = {}
var m = require('mithril')
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)
}
var Front = require('./front')
var Hosting = require('./hosting')
var Programming = require('./programming')
var Streaming = require('./streaming')
var Footer = require('./footer')
m.route.prefix = ''
m.route(document.getElementById('container'), '/', {
'/': Front,
'/hosting-solutions': Hosting,
'/programming-solutions': Programming,
'/video-solutions': Streaming,
})
m.mount(document.getElementById('footer'), Footer)