Commit c13763588dbe47d36ce983061746b4c0bd3d51ea
add "Like" button to top level blog
mix irving committed on 12/6/2017, 7:15:32 AMParent: 27f9a05441c7fa00944475fef6f7972d00bc44cb
Files changed
app/html/comments.mcss | changed |
app/page/blogShow.js | changed |
app/page/blogShow.mcss | changed |
message/html/likes.mcss | changed |
app/html/comments.mcss | ||
---|---|---|
@@ -56,17 +56,9 @@ | ||
56 | 56 | margin-right: 1.5rem |
57 | 57 | i.fa {} |
58 | 58 | } |
59 | 59 | |
60 | - div.Likes { | |
61 | - min-width: 2.5rem | |
62 | - | |
63 | - display: flex | |
64 | - align-items: center | |
65 | - | |
66 | - i.fa { margin-right: .3rem } | |
67 | - div.count {} | |
68 | - } | |
60 | + div.Likes { } | |
69 | 61 | } |
70 | 62 | |
71 | 63 | div.Compose { |
72 | 64 | margin: 1rem 0 |
app/page/blogShow.js | ||
---|---|---|
@@ -13,8 +13,9 @@ | ||
13 | 13 | 'app.html.comments': 'first', |
14 | 14 | 'app.html.context': 'first', |
15 | 15 | 'contact.html.follow': 'first', |
16 | 16 | 'message.html.channel': 'first', |
17 | + 'message.html.likes': 'first', | |
17 | 18 | 'message.html.markdown': 'first', |
18 | 19 | 'message.html.timeago': 'first', |
19 | 20 | 'feed.obs.thread': 'first' |
20 | 21 | }) |
@@ -46,9 +47,10 @@ | ||
46 | 47 | h('header', [ |
47 | 48 | h('div.blog', [ |
48 | 49 | h('h1', title), |
49 | 50 | timeago(blogMsg), |
50 | - channel(blogMsg) | |
51 | + channel(blogMsg), | |
52 | + api.message.html.likes(blogMsg) | |
51 | 53 | ]), |
52 | 54 | h('div.author', [ |
53 | 55 | h('div.leftCol', api.about.html.avatar(author, 'medium')), |
54 | 56 | h('div.rightCol', [ |
app/page/blogShow.mcss | ||
---|---|---|
@@ -28,8 +28,9 @@ | ||
28 | 28 | div.blog { |
29 | 29 | display: flex |
30 | 30 | flex-wrap: wrap |
31 | 31 | flex-grow: 1 |
32 | + align-items: center | |
32 | 33 | |
33 | 34 | h1 { |
34 | 35 | flex-basis: 100% |
35 | 36 | |
@@ -43,9 +44,13 @@ | ||
43 | 44 | flex-basis: 100% |
44 | 45 | margin-bottom: .6rem |
45 | 46 | } |
46 | 47 | |
47 | - div.Button.-channel {} | |
48 | + div.Button.-channel { | |
49 | + margin-right: 1rem | |
50 | + } | |
51 | + div.Likes { | |
52 | + } | |
48 | 53 | } |
49 | 54 | |
50 | 55 | div.author { |
51 | 56 | display: flex |
Built with git-ssb-web