git ssb

16+

Dominic / patchbay



Tree: 93d26ea7530a862ffda0f98070f6a1ce09d1d616

Files: 93d26ea7530a862ffda0f98070f6a1ce09d1d616 / modules_extra / music-release.js

1290 bytesRaw
1var markdown = require('ssb-markdown');
2var h = require('hyperscript');
3var u = require('../util');
4var ref = require('ssb-ref');
5
6//render a message
7
8//var plugs = require('../plugs');
9//var message_link = plugs.first(exports.message_link = []);
10//var message_confirm = plugs.first(exports.message_confirm = []);
11//var sbot_links = plugs.first(exports.sbot_links = []);
12//
13exports.gives = 'message_content'
14
15exports.create = function () {
16
17 return function(msg, sbot) {
18 if (msg.value.content.type !== 'music-release')
19 return;
20
21 var v = msg.value.content;
22 return h('div',
23 // h('img', { "src" : "http://localhost:7777/" + encodeURIComponent(v.cover) }),
24 h('h1', v.Title),
25 h("p", v.Description),
26 h("dl",
27
28 h("dt", "Creator"),
29 h("dd", v.Creator),
30
31 h("dt", "Identifier"),
32 h("dd", v.Identifier),
33
34 h("dt", "Published"),
35 h("dd", v.Publicdate),
36
37 h("dt", "Runtime"),
38 h("dd", v.Runtime),
39
40 h("dt", "Source"),
41 h("dd", v.Source),
42
43 h("dt", "License"),
44 h("dd", h('a', { href : v.Licenseurl }, "Link"))))
45 }
46}
47

Built with git-ssb-web