git ssb

0+

ev / minbase



Tree: f1cc08ac986f18880000b780dae6fb2043e76948

Files: f1cc08ac986f18880000b780dae6fb2043e76948 / modules / avatar-profile.js

838 bytesRaw
1var h = require('hyperscript')
2var pull = require('pull-stream')
3var self_id = require('../keys')
4var markdown = require('./helpers').markdown
5var query = require('./scuttlebot').query
6var avatar = require('./avatar')
7
8exports.gives = 'avatar_profile'
9
10exports.needs = {avatar_action: 'first'}
11
12exports.create = function (api) {
13 return function (id) {
14
15 if (id == self_id.id) {
16 var edit = h('p', h('a', {href: '#Edit'}, h('button.btn.btn-primary', 'Edit profile')))
17 } else { var edit = api.avatar_action(id)}
18
19 var layout = h('div.column',
20 h('div.message',
21 h('div.avatar--profile', avatar.image(id, 'profile')),
22 h('a', {href: '#' + id}, avatar.name(id)),
23 avatar.loc(id),
24 avatar.description(id),
25 h('pre', h('code', id)),
26 edit
27 )
28 )
29
30 return layout
31 }
32}
33
34

Built with git-ssb-web