Commit 7cf45e7c039b145503518e3560ac8943fa1e3708
fix mistakes @mixmix saw
Dominic Tarr committed on 12/6/2017, 11:40:04 PMParent: 42429c62406fd68f3e1e166a77c05433cf34801e
Files changed
blogs/blog.js | changed |
blogs/post.js | changed |
blogs/blog.js | ||
---|---|---|
@@ -28,13 +28,13 @@ | ||
28 | 28 | return data.value.content.title |
29 | 29 | }, |
30 | 30 | summary: function (data) { |
31 | 31 | if('blog' == typeof data.value.content.type) return |
32 | - return data.value.content.title | |
32 | + return data.value.content.summary | |
33 | 33 | }, |
34 | 34 | thumbnail: function (data) { |
35 | 35 | if('blog' == typeof data.value.content.type) return |
36 | - return data.value.content.title | |
36 | + return data.value.content.thumbnail | |
37 | 37 | }, |
38 | 38 | content: function (data) { |
39 | 39 | if('blog' == typeof data.value.content.type) return |
40 | 40 | var div = h('Markdown') |
@@ -54,9 +54,4 @@ | ||
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
57 | 57 | |
58 | - | |
59 | - | |
60 | - | |
61 | - | |
62 | - |
blogs/post.js | ||
---|---|---|
@@ -1,9 +1,6 @@ | ||
1 | 1 | var marksum = require('markdown-summary') |
2 | 2 | |
3 | -//var markdown = require('ssb-markdown') | |
4 | - | |
5 | - | |
6 | 3 | exports.gives = { |
7 | 4 | message: { |
8 | 5 | html: { |
9 | 6 | title: true, |
@@ -20,20 +17,8 @@ | ||
20 | 17 | |
21 | 18 | |
22 | 19 | exports.create = function (api) { |
23 | 20 | |
24 | - function render (source) { | |
25 | - return markdown.block(source, { | |
26 | - emoji: (emoji) => { | |
27 | - return renderEmoji(emoji, api.emoji.sync.url(emoji)) | |
28 | - }, | |
29 | - toUrl: (id) => { | |
30 | - if (ref.isBlob(id)) return api.blob.sync.url(id) | |
31 | - return id | |
32 | - }, | |
33 | - imageLink: (id) => id | |
34 | - }) | |
35 | - } | |
36 | 21 | function fromPost(fn) { |
37 | 22 | return function (data) { |
38 | 23 | if('post' !== data.value.content.type) return |
39 | 24 | return api.message.html.markdown ({text: fn(data.value.content)}) |
@@ -66,4 +51,6 @@ | ||
66 | 51 | } |
67 | 52 | |
68 | 53 | |
69 | 54 | |
55 | + | |
56 | + |
Built with git-ssb-web