aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/render-msg.js28
-rw-r--r--static/styles.css5
2 files changed, 33 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 96f3b86..6b0513d 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -176,6 +176,7 @@ RenderMsg.prototype.message = function (raw, cb) {
case 'git-update': return this.gitUpdate(cb)
case 'pull-request': return this.gitPullRequest(cb)
case 'issue': return this.issue(cb)
+ case 'music-release-cc': return this.musicRelease(cb)
case 'ferment/audio':
case 'robeson/audio':
return this.audio(cb)
@@ -495,3 +496,30 @@ RenderMsg.prototype.audio = function (cb) {
: ''
))), cb)
}
+
+RenderMsg.prototype.musicRelease = function (cb) {
+ var self = this
+ this.wrap([
+ h('table', h('tr',
+ h('td',
+ this.c.cover
+ ? h('a', {href: this.render.imageUrl(this.c.cover)}, h('img', {
+ src: this.render.imageUrl(this.c.cover),
+ alt: ' ',
+ width: 72,
+ height: 72,
+ }))
+ : ''),
+ h('td',
+ h('h4.msg-title', this.c.title),
+ this.c.text
+ ? h('div', {innerHTML: this.render.markdown(this.c.text)})
+ : ''
+ )
+ )),
+ h('ul', u.toArray(this.c.tracks).filter(Boolean).map(function (track) {
+ return h('li',
+ h('a', {href: self.render.toUrl(track.link)}, track.fname))
+ }))
+ ], cb)
+}
diff --git a/static/styles.css b/static/styles.css
index 2210522..a0ec39f 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -116,3 +116,8 @@ td {
margin-left: .25em;
background-color: #efd;
}
+
+.msg-title {
+ margin: 0;
+ padding: 0;
+}