Files: b7fa14294c552a418b5403b44385f0761fce9638 / render.js
393 bytesRaw
1 | var h = require('hyperscript') |
2 | |
3 | var human = require('human-time') |
4 | |
5 | var markdown = require('ssb-markdown') |
6 | |
7 | module.exports = function (msg) { |
8 | if (msg.value.content.type == 'post') { |
9 | return h('div.message__content', |
10 | h('span.timestamp', h('a', {href: msg.key}, human(new Date(msg.value.timestamp)))), |
11 | msg.value.author, |
12 | msg.value.content.text |
13 | ) |
14 | } else { return } |
15 | } |
16 |
Built with git-ssb-web