Files: e70c5f5e2cdf140b0f8e1aaa1f8f9adc657b0a50 / app / html / nav.js
904 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.html.nav') |
5 | |
6 | exports.needs = nest({ |
7 | 'history.sync.push': 'first', |
8 | 'history.sync.back': 'first' |
9 | }) |
10 | |
11 | exports.create = (api) => { |
12 | return nest('app.html.nav', nav) |
13 | |
14 | function nav (id) { |
15 | const { push, back } = api.history.sync |
16 | return h('Nav', [ |
17 | h('div.back', { 'ev-click': back }, '←'), |
18 | h('div', { 'ev-click': () => push({page: 'home'}) }, 'Home'), |
19 | // h('div', { 'ev-click': () => push({type: 'group', key: '%sadlkjas;lkdjas'}) }, 'Group'), |
20 | h('div', { 'ev-click': () => push({key: '%fXXZgQrwnj7F+Y19H0IXxNriuvPFoahvusih3UzpkfA=.sha256'}) }, 'Thread A'), |
21 | h('div', { 'ev-click': () => push({key: '%3cWZHeN6k03XpvDBxrxP5bGLsNByFLTvr/rKYFV4f+c=.sha256'}) }, 'Thread B'), |
22 | h('a', { href: '%YRhFXmsAwipgyiwuHSP+EBr9fGjSqrMpWXUxgWcHxkM=.sha256' }, 'href link') |
23 | ]) |
24 | } |
25 | } |
26 |
Built with git-ssb-web