Files: df697b6ed4d32422df439d0d48d65a64d1d9b04a / modules / profile / html / person.js
397 bytesRaw
1 | var nest = require('depnest') |
2 | var h = require('mutant/h') |
3 | |
4 | exports.needs = nest({ |
5 | 'about.obs.name': 'first' |
6 | }) |
7 | |
8 | exports.gives = nest({ |
9 | 'profile.html': ['person'] |
10 | }) |
11 | |
12 | exports.create = function (api) { |
13 | return nest({ |
14 | 'profile.html': {person} |
15 | }) |
16 | |
17 | function person (id, altName) { |
18 | return h('a ProfileLink', {href: id, title: id}, [ |
19 | altName || api.about.obs.name(id) |
20 | ]) |
21 | } |
22 | } |
23 |
Built with git-ssb-web