Files: 531b55a224c7f5a8f794c64f2d60803fdfba8df9 / about / html / image.js
437 bytesRaw
1 | var h = require('mutant/h') |
2 | var nest = require('depnest') |
3 | |
4 | exports.needs = nest({ |
5 | 'about.obs.imageUrl': 'first', |
6 | 'about.obs.color': 'first' |
7 | }) |
8 | |
9 | exports.gives = nest('about.html.image') |
10 | |
11 | exports.create = function (api) { |
12 | return nest('about.html.image', function (id) { |
13 | return h('img', { |
14 | className: 'Avatar', |
15 | style: { 'background-color': api.about.obs.color(id) }, |
16 | src: api.about.obs.imageUrl(id) |
17 | }) |
18 | }) |
19 | } |
20 |
Built with git-ssb-web