Files: 64e7cbf9b4b61071a582b3d0463dd1fc77fd46ad / index.js
618 bytesRaw
1 | var h = require('hyperscript') |
2 | var route = require('./views') |
3 | |
4 | document.head.appendChild(h('style', require('./style.css.json'))) |
5 | |
6 | var content = h('div.content') |
7 | |
8 | var screen = h('div#screen', {style: {position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px'}}) |
9 | |
10 | document.body.appendChild(screen) |
11 | route() |
12 | |
13 | window.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