git ssb

16+

Dominic / patchbay



Tree: cd6e506aae3237ded96821ca6f44a51db495f302

Files: cd6e506aae3237ded96821ca6f44a51db495f302 / 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