git ssb

7+

dinoworm ๐Ÿ› / patchcore



Tree: 12f9e4861605413f2f160d9b2f15e4810a1c17b0

Files: 12f9e4861605413f2f160d9b2f15e4810a1c17b0 / message / html / layout / mini.js

745 bytesRaw
1const h = require('mutant/h')
2const nest = require('depnest')
3
4exports.needs = nest('message.html', {
5 backlinks: 'first',
6 author: 'first',
7 meta: 'map',
8 timestamp: 'first'
9})
10
11exports.gives = nest('message.html.layout')
12
13exports.create = (api) => {
14 return nest('message.html.layout', message_layout)
15
16 function message_layout (msg, opts) {
17 if (opts.layout !== 'mini') return
18 return h('div', {
19 classList: 'Message -mini'
20 }, [
21 h('header.author', {}, api.message.html.author(msg, { size: 'mini' })),
22 h('section.timestamp', {}, api.message.html.timestamp(msg)),
23 h('section.meta', {}, api.message.html.meta(msg)),
24 h('section.content', {}, opts.content),
25 h('section.raw-content')
26 ])
27 }
28}
29

Built with git-ssb-web