Commit f546afe3e8248a854754c7e586c96f544f1ee78d
add ssb-ebt, remove sdash for now
Ev Bogue committed on 8/29/2017, 6:02:48 PMParent: cea5cc818ba38c52a03085f9f668e0031418a1e8
Files changed
decent.js | changed |
package.json | changed |
plugins/sdash/.gitignore | deleted |
plugins/sdash/bin.js | deleted |
plugins/sdash/index.js | deleted |
plugins/sdash/static/sdash.css | deleted |
plugins/sdash/style.css | deleted |
yarn.lock | changed |
decent.js | ||
---|---|---|
@@ -43,9 +43,9 @@ | ||
43 | 43 … | .use(require('./plugins/private')) |
44 | 44 … | .use(require('./plugins/ssb-ws')) |
45 | 45 … | .use(require('ssb-links')) |
46 | 46 … | .use(require('ssb-query')) |
47 | - .use(require('./plugins/sdash')) | |
47 … | + .use(require('ssb-ebt')) | |
48 | 48 … | |
49 | 49 … | // add third-party plugins |
50 | 50 … | require('./plugins/plugins').loadUserPlugins(createSbot, config) |
51 | 51 … |
package.json | ||
---|---|---|
@@ -80,8 +80,9 @@ | ||
80 | 80 … | "simple-mime": "^0.1.0", |
81 | 81 … | "split-buffer": "^1.0.0", |
82 | 82 … | "ssb-avatar": "^0.2.0", |
83 | 83 … | "ssb-blobs": "^1.1.3", |
84 … | + "ssb-ebt": "^1.3.2", | |
84 | 85 … | "ssb-feed": "^2.2.1", |
85 | 86 … | "ssb-git": "^0.4.1", |
86 | 87 … | "ssb-keys": "^7.0.0", |
87 | 88 … | "ssb-links": "^2.0.0", |
plugins/sdash/bin.js | ||
---|---|---|
@@ -1,6 +1,0 @@ | ||
1 | -#!/usr/bin/env node | |
2 | - | |
3 | -require('ssb-client')(function (err, sbot, config) { | |
4 | - if (err) throw err | |
5 | - require('.').init(sbot, config) | |
6 | -}) |
plugins/sdash/index.js | ||
---|---|---|
@@ -1,77 +1,0 @@ | ||
1 | -var http = require('http') | |
2 | -var fs = require('fs') | |
3 | -var h = require('hyperscript') | |
4 | -var pull = require('pull-stream') | |
5 | -var client = require('../ssb-client') | |
6 | -var md = require('ssb-markdown') | |
7 | - | |
8 | -var title = 'sdash' | |
9 | -var me = '@EVoxY2Hu75dWZxnTMaqxJS8cjeNVpTKjgSlh3lDVjvw=.ed25519' | |
10 | -var viewerUrl = 'http://evbogue.com:3535/' | |
11 | - | |
12 | -var liteURL = 'http://decent.evbogue.com/' | |
13 | -var opts = {"modern":true,} | |
14 | -var lite; | |
15 | - | |
16 | -var style = fs.readFileSync(__dirname + '/style.css', 'utf8') | |
17 | - | |
18 | -exports.name = 'sdash' | |
19 | -exports.manifest = {} | |
20 | -// exports.version = require('./package').version | |
21 | - | |
22 | -exports.init = function (sbot, config) { | |
23 | - | |
24 | - http.createServer(function (req, res){ | |
25 | - if (req.url === '/') { | |
26 | - client(function (err, sbot) { | |
27 | - pull( | |
28 | - sbot.query.read({query: [{$filter: { value: { author: me, content: {type: 'post'}}}}], limit: 1, reverse: true}), | |
29 | - pull.drain(function (data) { | |
30 | - post = data | |
31 | - gotPost() | |
32 | - sbot.close() | |
33 | - }) | |
34 | - ) | |
35 | - }) | |
36 | - function gotPost() { | |
37 | - res.end( | |
38 | - h('html', | |
39 | - h('head', | |
40 | - h('title', title), | |
41 | - h('style', style) | |
42 | - ), | |
43 | - h('body', | |
44 | - h('div.msg', | |
45 | - h('script', {src: viewerUrl + encodeURI(post.key) + '.js'}) | |
46 | - ) | |
47 | - ) | |
48 | - ).outerHTML) | |
49 | - } | |
50 | - } | |
51 | - if (req.url === '/invite/') { | |
52 | - client(function (err, sbot) { | |
53 | - sbot.invite.create(opts, function (err, invite) { | |
54 | - if(err) throw err | |
55 | - lite = invite | |
56 | - gotInvite() | |
57 | - sbot.close() | |
58 | - }) | |
59 | - }) | |
60 | - function gotInvite() { | |
61 | - res.end( | |
62 | - h('html', | |
63 | - h('head', | |
64 | - h('title', title), | |
65 | - h('style', style) | |
66 | - ), | |
67 | - h('body', | |
68 | - h('div.msg', | |
69 | - h('p', {innerHTML: '<a href="' + liteURL + '#' + lite + '" rel="nofollow" target="_blank">'+ liteURL + '#' + lite + '</a>'}) | |
70 | - ) | |
71 | - ) | |
72 | - ).outerHTML) | |
73 | - } | |
74 | - } | |
75 | - }).listen(1337) | |
76 | - | |
77 | -} |
plugins/sdash/static/sdash.css | ||
---|---|---|
@@ -1,31 +1,0 @@ | ||
1 | -p { | |
2 | - font-family: 'Source Sans Pro', sans-serif; | |
3 | -} | |
4 | - | |
5 | -.avatar { | |
6 | - width: 2em; | |
7 | - float: left; | |
8 | - margin-right: 1em; | |
9 | -} | |
10 | - | |
11 | -.message { | |
12 | - border: 1px solid #ccc; | |
13 | - padding: 1em; | |
14 | -} | |
15 | - | |
16 | -.pre { | |
17 | - margin-bottom: 0; | |
18 | -} | |
19 | - | |
20 | -.date { | |
21 | - font-size: .8em; | |
22 | - color: #666; | |
23 | -} | |
24 | - | |
25 | -.small { | |
26 | - font-size: .8em; | |
27 | -} | |
28 | - | |
29 | -.ri { | |
30 | - float: right; | |
31 | -} |
plugins/sdash/style.css | ||
---|---|---|
@@ -1,79 +1,0 @@ | ||
1 | -body { | |
2 | - font-family: 'Source Sans Pro', sans-serif; | |
3 | - color: #333; | |
4 | - width: 100%; | |
5 | - margin-right: auto; | |
6 | - margin-left: auto; | |
7 | -} | |
8 | - | |
9 | -p, pre, code { | |
10 | - margin-top: .35ex; | |
11 | - word-wrap: break-word; | |
12 | - white-space: pre-wrap; | |
13 | -} | |
14 | - | |
15 | -.msg { | |
16 | - border-bottom: 1px solid #eee; | |
17 | - padding: .5em; | |
18 | - margin-bottom: .5em; | |
19 | -} | |
20 | - | |
21 | -.ad { | |
22 | - float: right; | |
23 | - width: 35%; | |
24 | - margin-left: 1em; | |
25 | - border: 1px solid #eee; | |
26 | - margin-bottom: 1em; | |
27 | - padding: .5em; | |
28 | - font-size: .8em; | |
29 | -} | |
30 | - | |
31 | -.avatar { | |
32 | - width: 2em; | |
33 | - float: left; | |
34 | - margin-right: .5em; | |
35 | - padding: 2px; | |
36 | - border: 1px solid #eee; | |
37 | -} | |
38 | - | |
39 | -.profile { | |
40 | - width: 6em; | |
41 | - float: left; | |
42 | - padding: 4px; | |
43 | - border: 1px solid #eee; | |
44 | - margin-right: 1em; | |
45 | - margin-bottom: 1em; | |
46 | -} | |
47 | - | |
48 | -hr { | |
49 | - border: solid #eee; | |
50 | - clear: both; | |
51 | - border-width: 1px 0 0; | |
52 | - height: 0; | |
53 | - margin-bottom: .9em; | |
54 | -} | |
55 | - | |
56 | -.small { | |
57 | - font-size: .8em; | |
58 | - font-weight: bold; | |
59 | -} | |
60 | - | |
61 | -.ri { | |
62 | - float: right; | |
63 | -} | |
64 | - | |
65 | -.date { | |
66 | - font-size: .8em; | |
67 | - color: #666; | |
68 | -} | |
69 | - | |
70 | -a:link, a:visited, a:active { | |
71 | - color: #0088cc; | |
72 | - text-decoration: underline; | |
73 | -} | |
74 | - | |
75 | -a:hover, | |
76 | -a:focus { | |
77 | - color: #005580; | |
78 | -} | |
79 | - |
yarn.lock | ||
---|---|---|
The diff is too large to show. Use a local git client to view these changes. Old file size: 107443 bytes New file size: 112869 bytes |
Built with git-ssb-web