git ssb

16+

Dominic / patchbay



Tree: 52a6d8a8df089abd1131e52adf418fdf6595f98a

Files: 52a6d8a8df089abd1131e52adf418fdf6595f98a / modules_basic / avatar / avatar.js

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

Built with git-ssb-web