Files: 60992568ce06b2ff2d69fca74183e88c6bdf1e1b / 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