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