git ssb

16+

Dominic / patchbay



Tree: 25a8b716544bd1f58eeba52a1feb6bb5a6eb78ae

Files: 25a8b716544bd1f58eeba52a1feb6bb5a6eb78ae / modules_basic / avatar.js

752 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}
15
16exports.create = function (api) {
17
18 var exports = {}
19 exports.avatar = function (author, classes) {
20 return exports.avatar_image_name_link(author, classes)
21 }
22
23 exports.avatar_image_name_link = function (author, classes) {
24 return api.avatar_link(author, [
25 api.avatar_image(author, classes),
26 api.avatar_name(author)
27 ])
28 }
29
30 exports.avatar_image_link = function (author, classes) {
31 return api.avatar_link(author, api.avatar_image(author, classes))
32 }
33
34 return exports
35}
36
37
38

Built with git-ssb-web