git ssb

2+

ev / mvd



Tree: d783575b5b38608603e2a301844fb73d9d370541

Files: d783575b5b38608603e2a301844fb73d9d370541 / index.js

618 bytesRaw
1var h = require('hyperscript')
2var route = require('./views')
3
4document.head.appendChild(h('style', require('./style.css.json')))
5
6var content = h('div.content')
7
8var screen = h('div#screen', {style: {position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px'}})
9
10document.body.appendChild(screen)
11route()
12
13window.onhashchange = function () {
14 var screen = document.getElementById('screen')
15
16 var newscreen = h('div#screen', {style: {position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px'}})
17
18 console.log(screen)
19 screen.parentNode.replaceChild(newscreen, screen)
20 route()
21}
22
23

Built with git-ssb-web