git ssb

16+

Dominic / patchbay



Tree: bd181a1782c01567bc952dfc20d005a712ff2fb0

Files: bd181a1782c01567bc952dfc20d005a712ff2fb0 / modules_basic / avatar.js

923 bytesRaw
1var h = require('hyperscript')
2var u = require('../util')
3
4exports.needs = {
5 avatar_name: 'first',
6 avatar_image: 'first',
7 avatar_link: 'first'
8}
9
10exports.gives = {
11 avatar: true,
12 avatar_image_name_link: true,
13 avatar_image_link: true,
14 avatar_name_link: true
15}
16
17exports.create = function (api) {
18 return {
19 avatar,
20 avatar_image_name_link,
21 avatar_image_link,
22 avatar_name_link
23 }
24
25 function avatar (author, classes) {
26 return exports.avatar_image_name_link(author, classes)
27 }
28
29 function avatar_image_name_link (author, classes) {
30 return api.avatar_link(author, [
31 api.avatar_image(author, classes),
32 api.avatar_name(author)
33 ])
34 }
35
36 function avatar_image_link (author, classes) {
37 return api.avatar_link(author, api.avatar_image(author, classes))
38 }
39
40 function avatar_name_link (author, classes) {
41 return api.avatar_link(author, api.avatar_name(author))
42 }
43}
44
45
46

Built with git-ssb-web