Commit 2812e21b2be7dcab1cc07911be4a52548041bd9a
add avatar names to everything
Ev Bogue committed on 9/15/2016, 11:18:00 PMParent: 673f1c3e0d3f41220ad06d849135a029dd6aa8cc
Files changed
index.js | changed |
index.js | |||
---|---|---|---|
@@ -12,8 +12,28 @@ | |||
12 | 12 … | var me = '@8Qee0I/DwI5DHSCi3p5fsl6FyLGArrnDz3ox9qZr5Qc=.ed25519' | |
13 | 13 … | var desc = 'This is <a href="https://gitmx.com/%25qrU04j9vfUJKfq1rGZrQ5ihtSfA4ilfY3wLy7xFv0xk%3D.sha256">sdash</a>, a work-in-progress personal gateway to the <a href="http://ssbc.github.io">scuttlebot</a> distributed social network' | |
14 | 14 … | var bloburl = 'http://localhost:8989/blobs/get/' | |
15 | 15 … | ||
16 … | +client(function (err, sbot) { | ||
17 … | + pull( | ||
18 … | + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'email'}}}}], limit: 1, reverse: true}), | ||
19 … | + pull.drain(function (data) { | ||
20 … | + email = data.value.content.email; | ||
21 … | + }) | ||
22 … | + ) | ||
23 … | + pull( | ||
24 … | + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'location'}}}}], limit: 1, reverse: true}), | ||
25 … | + pull.drain(function (data) { | ||
26 … | + loc = data.value.content.location; | ||
27 … | + }) | ||
28 … | + ) | ||
29 … | + pull( | ||
30 … | + sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'website'}}}}], limit: 1, reverse: true}), | ||
31 … | + pull.drain(function (data) { | ||
32 … | + website = data.value.content.website; | ||
33 … | + }) | ||
34 … | + ) | ||
35 … | +}) | ||
16 | 36 … | ||
17 | 37 … | http.createServer(function (req, res){ | |
18 | 38 … | if (req.url === '/') { | |
19 | 39 … | client(function (err, sbot) { | |
@@ -88,31 +108,38 @@ | |||
88 | 108 … | h('img.profile', {src: bloburl + image}), | |
89 | 109 … | h('h1', | |
90 | 110 … | h('a', {href: me }, '@' + name) | |
91 | 111 … | ), | |
112 … | + h('p', loc + ' ', | ||
113 … | + h('a', {href: 'mailto:' + email}, email) | ||
114 … | + ), | ||
92 | 115 … | h('p', {innerHTML: desc}), | |
93 | 116 … | h('hr'), | |
94 | 117 … | h('div.msg', | |
95 | 118 … | h('p.small.ri', 'pinned'), | |
96 | 119 … | h('img.avatar', {src: bloburl + image}), | |
120 … | + h('a', {href: me }, '@' + name), | ||
97 | 121 … | h('div', {innerHTML: md.block(pinned.value.content.text)}, | |
98 | 122 … | h('span.date', mo(pinned.value.timestamp).fromNow()) | |
99 | 123 … | ) | |
100 | 124 … | ), | |
101 | 125 … | h('div.msg', | |
102 | 126 … | h('p.small.ri', 'post'), | |
103 | 127 … | h('img.avatar', {src: bloburl + image}), | |
128 … | + h('a', {href: me }, '@' + name), | ||
104 | 129 … | h('div', {innerHTML: md.block(post.value.content.text)}, | |
105 | 130 … | h('span.date', mo(post.value.timestamp).fromNow()) | |
106 | 131 … | ) | |
107 | 132 … | ), | |
108 | 133 … | h('div.msg', | |
109 | 134 … | h('p.small.ri', 'dig'), | |
110 | 135 … | h('img.avatar', {src: bloburl + image}), | |
136 … | + h('a', {href: me }, '@' + name), ' dug ', | ||
111 | 137 … | h('div', vote.value.content.vote.link, | |
112 | 138 … | h('p.date', mo(vote.value.timestamp).fromNow()), | |
113 | 139 … | h('div.msg', | |
114 | 140 … | h('img.avatar', {src: bloburl + reauthor.image}), | |
141 … | + h('a', {href: reauthor.name }, '@' + name), | ||
115 | 142 … | h('div', {innerHTML: md.block(redo.value.content.text)}, | |
116 | 143 … | h('span.date', mo(redo.value.timestamp).fromNow()) | |
117 | 144 … | ) | |
118 | 145 … | ) | |
@@ -120,8 +147,9 @@ | |||
120 | 147 … | ), | |
121 | 148 … | h('div.msg', | |
122 | 149 … | h('p.small.ri', 'last mention'), | |
123 | 150 … | h('img.avatar', {src: bloburl + mentionauthor.image}), | |
151 … | + h('a', {href: me }, '@' + mentionauthor.name), | ||
124 | 152 … | h('div', {innerHTML: md.block(mention.value.content.text)}, | |
125 | 153 … | h('span.date', mo(mention.value.timestamp).fromNow()) | |
126 | 154 … | ) | |
127 | 155 … | ) |
Built with git-ssb-web