Files: 3f235720442de3817c747a571687d2b98a9809cb / example.js
698 bytesRaw
1 | const combine = require('depject') |
2 | const apply = require('depject/apply') |
3 | const h = require('mutant/h') |
4 | |
5 | const modules = require('./') |
6 | var api = entry(combine(modules)) |
7 | |
8 | // TODO depject.entry(sockets, { |
9 | // render_feed: 'first', |
10 | // feeds: { |
11 | // public: 'first' |
12 | // } |
13 | // })() |
14 | |
15 | require('insert-css')(` |
16 | .Message { |
17 | padding: 20px; |
18 | border-bottom: 1px solid #EEE; |
19 | } |
20 | |
21 | .Message > header.author { |
22 | font-weight: bold; |
23 | } |
24 | `) |
25 | |
26 | var app = h('div.App', [ |
27 | api.render_feed(api.feeds.public) |
28 | ]) |
29 | |
30 | document.body.appendChild(app) |
31 | |
32 | function entry (sockets) { |
33 | return { |
34 | render_feed: apply.first(sockets.render_feed), |
35 | feeds: { |
36 | public: apply.first(sockets.feeds.public) |
37 | } |
38 | } |
39 | } |
40 |
Built with git-ssb-web