Files: 62404afd51be20fc4b7925c7ad3b91a4a4b34915 / modules_extra / music-release.js
1290 bytesRaw
1 | var markdown = require('ssb-markdown'); |
2 | var h = require('hyperscript'); |
3 | var u = require('../util'); |
4 | var 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 | // |
13 | exports.gives = 'message_content' |
14 | |
15 | exports.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