modules_core/app.jsView |
---|
29 | 29 … | |
30 | 30 … | console.log(hash() || 'tabs') |
31 | 31 … | var view = api.screen_view(hash() || 'tabs') |
32 | 32 … | |
33 | | - var sidebar = h("div#sidebar.column.col-sm-2.col-xs-1.sidebar-offcanvas", |
34 | | - [ h("ul.nav", [ |
35 | | - h("li", [ h("a.visible-xs.text-center", {"attributes":{"href":"#"},"dataset":{"toggle":"offcanvas"}}, [ h("i.glyphicon.glyphicon-chevron-right") ]) ]) ]), |
36 | | - h("ul#lg-menu.nav.hidden-xs", [ |
37 | | - h("li.active", [ h("a", {"attributes":{"href":"#featured"}}, [ h("i.glyphicon.glyphicon-list-alt"), " Featured" ]) ]), |
38 | | - h("li", [ h("a", {"attributes":{"href":"#stories"}}, [ h("i.glyphicon.glyphicon-list"), " Stories" ]) ]), |
39 | | - h("li", [ h("a", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-paperclip"), " Saved" ]) ]), |
40 | | - h("li", [ h("a", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-refresh"), " Refresh" ]) ]) ]), |
41 | | - h("ul#sidebar-footer.list-unstyled.hidden-xs", |
42 | | - [ h("li", [ h("a", {"attributes":{"href":"http://ssbc.github.io"}}, [ h("h3", [ "SSBC Patchbay" ]), " "]) ]) ]), |
43 | 33 … | |
44 | | - h("ul#xs-menu.nav.visible-xs", [ "\t", |
45 | | - h("li", [ h("a.text-center", {"attributes":{"href":"#featured"}}, [ h("i.glyphicon.glyphicon-list-alt") ]) ]), |
46 | | - h("li", [ h("a.text-center", {"attributes":{"href":"#stories"}}, [ h("i.glyphicon.glyphicon-list") ]) ]), "\t", |
47 | | - h("li", [ h("a.text-center", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-paperclip") ]) ]), |
48 | | - h("li", [ h("a.text-center", {"attributes":{"href":"#"}}, [ h("i.glyphicon.glyphicon-refresh") ]) ]) ]) ]) |
| 34 … | + var screen = view |
49 | 35 … | |
50 | | - var screen = h('div.screen.column.col-sm-10.col-xs-11', view) |
51 | | - |
52 | 36 … | window.onhashchange = function (ev) { |
53 | 37 … | var _view = view |
54 | 38 … | view = api.screen_view(hash() || 'tabs') |
55 | 39 … | |
56 | 40 … | if(_view) screen.replaceChild(view, _view) |
57 | 41 … | else document.body.appendChild(view) |
58 | 42 … | } |
59 | 43 … | |
60 | | - document.body.appendChild(sidebar) |
| 44 … | + |
61 | 45 … | document.body.appendChild(screen) |
62 | 46 … | |
63 | 47 … | return screen |
64 | 48 … | } |