Files: 010c28ba45ecc8a029b813a3cd9e7edc8e098059 / modules_extra / music-release.js
1067 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 | |
23 | h("dt", "Creator"), |
24 | h("dd", v.Creator), |
25 | |
26 | h("dt", "Identifier"), |
27 | h("dd", v.Identifier), |
28 | |
29 | h("dt", "Published"), |
30 | h("dd", v.Publicdate), |
31 | |
32 | h("dt", "Runtime"), |
33 | h("dd", v.Runtime), |
34 | |
35 | h("dt", "Source"), |
36 | h("dd", v.Source), |
37 | |
38 | h("dt", "License"), |
39 | h("dd", h('a', { href : v.Licenseurl }, "Link")))) |
40 | } |
41 | } |
42 |
Built with git-ssb-web