Commit b9268a67c8b095ed9b76e5d1192a6a88bddb1573
pairing mcss
mix irving committed on 8/9/2017, 11:30:35 PMParent: 40eefe3bbbd719d70bc2639977f71a4c5c6b1a63
Files changed
app/page/home.js | changed |
app/page/home.mcss | changed |
app/page/home.js | ||
---|---|---|
@@ -33,9 +33,9 @@ | ||
33 | 33 | |
34 | 34 | function home (location) { |
35 | 35 | // location here can expected to be: { page: 'home' } |
36 | 36 | |
37 | - var div = h('Home', []) | |
37 | + var container = h('div.container', []) | |
38 | 38 | |
39 | 39 | function subject (msg) { |
40 | 40 | return firstLine(msg.content.subject || msg.content.text) |
41 | 41 | } |
@@ -49,18 +49,18 @@ | ||
49 | 49 | if(!thread.value) { |
50 | 50 | |
51 | 51 | } |
52 | 52 | if(!thread.value) return |
53 | - return h('ThreadLink', link(thread), [ | |
53 | + return h('div.threadLink', link(thread), [ | |
54 | 54 | name, |
55 | - h('Subject', [subject(thread.value)]), | |
56 | - reply ? h('Reply', [subject(reply.value)]) : null | |
55 | + h('div.subject', [subject(thread.value)]), | |
56 | + reply ? h('div.reply', [subject(reply.value)]) : null | |
57 | 57 | ] |
58 | 58 | ) |
59 | 59 | } |
60 | 60 | |
61 | 61 | function threadGroup (threads, obj, toName) { |
62 | - var div = h('Group') | |
62 | + var div = h('div.group') | |
63 | 63 | for(var k in obj) { |
64 | 64 | var id = obj[k] |
65 | 65 | var thread = threads.roots[id] |
66 | 66 | if(threads.roots[id] && threads.roots[id].value) { |
@@ -81,34 +81,34 @@ | ||
81 | 81 | if(isObject(data.value.content)) return data |
82 | 82 | return api.message.sync.unbox(data) |
83 | 83 | }).filter(Boolean).reduce(threadReduce, null) |
84 | 84 | |
85 | - div.appendChild(threadGroup( | |
85 | + container.appendChild(threadGroup( | |
86 | 86 | threads, |
87 | 87 | threads.private, |
88 | 88 | function (_, msg) { |
89 | 89 | console.log(msg) |
90 | 90 | if(!msg.value) debugger |
91 | - return h('Recps', | |
91 | + return h('div.recps', | |
92 | 92 | msg.value.content.recps.map(function (link) { |
93 | 93 | return api.about.html.image(isString(link) ? link : link.link) |
94 | 94 | }) |
95 | 95 | ) |
96 | 96 | } |
97 | 97 | )) |
98 | 98 | |
99 | - div.appendChild(threadGroup( | |
99 | + container.appendChild(threadGroup( | |
100 | 100 | threads, |
101 | 101 | threads.channels, |
102 | - ch => h('h2.Title', '#'+ch) | |
102 | + ch => h('h2.title', '#'+ch) | |
103 | 103 | )) |
104 | 104 | }) |
105 | 105 | ) |
106 | 106 | |
107 | 107 | return h('Page -home', [ |
108 | 108 | h('h1', 'Home'), |
109 | 109 | api.app.html.nav(), |
110 | - div | |
110 | + container | |
111 | 111 | ]) |
112 | 112 | } |
113 | 113 | } |
114 | 114 |
Built with git-ssb-web