git ssb

16+

Dominic / patchbay



Tree: 41ed6a5aa572f6de601bab35fc108a955657c074

Files: 41ed6a5aa572f6de601bab35fc108a955657c074 / 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