Files: 6b5fd322755eecdeebda31ed6090e626cebdc243 / modules_extra / music / release.js
932 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 | exports.gives = 'message_content' |
9 | |
10 | exports.create = function () { |
11 | |
12 | return function(msg, sbot) { |
13 | if (msg.value.content.type !== 'music-release') |
14 | return; |
15 | |
16 | var v = msg.value.content; |
17 | return h('div', [ |
18 | // h('img', { "src" : "http://localhost:7777/" + encodeURIComponent(v.cover) }), |
19 | h('h1', v.Title), |
20 | h("p", v.Description), |
21 | h("dl", [ |
22 | h("dt", "Creator"), |
23 | h("dd", v.Creator), |
24 | |
25 | h("dt", "Identifier"), |
26 | h("dd", v.Identifier), |
27 | |
28 | h("dt", "Published"), |
29 | h("dd", v.Publicdate), |
30 | |
31 | h("dt", "Runtime"), |
32 | h("dd", v.Runtime), |
33 | |
34 | h("dt", "Source"), |
35 | h("dd", v.Source), |
36 | |
37 | h("dt", "License"), |
38 | h("dd", h('a', { href : v.Licenseurl }, "Link")) |
39 | ]) |
40 | ]) |
41 | } |
42 | } |
43 | |
44 |
Built with git-ssb-web