Files: 21b4a8c3bae6a534cb6aeb6a8bb1bdfa750d2601 / app / html / header.js
979 bytesRaw
1 | const nest = require('depnest') |
2 | const { h, computed } = require('mutant') |
3 | |
4 | exports.gives = nest('app.html.header') |
5 | |
6 | exports.needs = nest('keys.sync.id', 'first') |
7 | |
8 | exports.create = (api) => { |
9 | return nest('app.html.header', (nav) => { |
10 | return h('Header', [ |
11 | h('nav', [ |
12 | h('div.back', { 'ev-click': nav.back }, [ |
13 | h('i.fa.fa-angle-left') |
14 | ]), |
15 | h('i.fa.fa-home', { 'ev-click': () => nav.push({page:'home'}) }), |
16 | // breadcrumb here potentially |
17 | // h('h1', computed(nav.location, e => e.element.title)), |
18 | |
19 | h('div.tools', [ |
20 | h('i.fa.fa-user', { 'ev-click': () => nav.push({page:'userEdit', feed: api.keys.sync.id()}) }), // TEMP |
21 | h('i.fa.fa-address-book', { 'ev-click': () => nav.push({page:'userFind'}) }), |
22 | h('i.fa.fa-hashtag', { 'ev-click': () => nav.push({page:'groupFind'}) }), |
23 | h('i.fa.fa-gear', { 'ev-click': () => nav.push({page:'settings'}) }) |
24 | ]) |
25 | ]), |
26 | ]) |
27 | }) |
28 | } |
29 | |
30 |
Built with git-ssb-web