git ssb

7+

dinoworm 🐛 / patchcore



Commit 5adda321ba346df2f7f08c633b873a70704fc195

add some styling to example

Matt McKegg committed on 2/12/2017, 1:52:32 PM
Parent: e4a8f57839970dc79c72407cc435f71d8fa8d401

Files changed

components/message/author.jschanged
components/message/layout.jschanged
example.jschanged
package.jsonchanged
components/message/author.jsView
@@ -9,7 +9,7 @@
99 message_author
1010 }
1111
1212 function message_author (msg) {
13- return h('div', {}, [msg.value.author])
13 + return h('div', {}, [msg.value.author.slice(0, 10)])
1414 }
1515 }
components/message/layout.jsView
@@ -26,9 +26,10 @@
2626
2727 // scoped
2828
2929 function full (msg, opts) {
30- var msgEl = h('Message', {
30 + var msgEl = h('div', {
31 + classList: 'Message',
3132 'ev-keydown': navigateToMessageOnEnter,
3233 attributes: {
3334 tabindex: '0',
3435 'data-key': msg.key,
@@ -65,9 +66,10 @@
6566 }
6667 }
6768
6869 function mini(msg, opts) {
69- return h('Message -mini', {
70 + return h('div', {
71 + classList: 'Message -mini',
7072 attributes: {
7173 tabindex: '0',
7274 'data-key': msg.key
7375 }
example.jsView
@@ -5,11 +5,21 @@
55 const modules = require('./')
66 var api = entry(combine(modules))
77
88 // TODO depject.entry(sockets, {
9-// app: 'first'
9 +// render_feed: 'first',
10 +// feeds: {
11 +// public: 'first'
12 +// }
1013 // })()
1114
15 +require('insert-css')(`
16 + .Message {
17 + padding: 20px;
18 + border-bottom: 1px solid #EEE
19 + }
20 +`)
21 +
1222 var app = h('div.App', [
1323 api.render_feed(api.feeds.public)
1424 ])
1525
package.jsonView
@@ -27,9 +27,9 @@
2727 "bulk-require": "^1.0.0",
2828 "bulkify": "^1.4.2",
2929 "emoji-named-characters": "^1.0.2",
3030 "es2040": "^1.2.4",
31- "mutant": "^3.13.0",
31 + "mutant": "^3.13.1",
3232 "pull-reconnect": "0.0.3",
3333 "pull-stream": "^3.5.0",
3434 "ssb-client": "^4.4.0",
3535 "ssb-config": "^2.2.0",
@@ -45,7 +45,8 @@
4545 ]
4646 },
4747 "devDependencies": {
4848 "depject": "^3.1.5",
49- "electro": "^2.0.3"
49 + "electro": "^2.0.3",
50 + "insert-css": "^2.0.0"
5051 }
5152 }

Built with git-ssb-web