Commit ebf65e8c8947bcad79b243e4d8cd5674ae1b6777
clearer follow/unfollow button
Joran committed on 12/18/2016, 5:31:45 AMParent: de3e4fa5b4bd7be375a1abc89bfa0730f7999bfd
Files changed
modules_basic/avatar-profile.js | changed |
modules_basic/follow.js | changed |
modules_basic/avatar-profile.js | ||
---|---|---|
@@ -69,9 +69,9 @@ | ||
69 | 69 … | add(_b, followers_el) |
70 | 70 … | } |
71 | 71 … | |
72 | 72 … | |
73 | - return h('div.column.profile', | |
73 … | + return h('div.well', | |
74 | 74 … | api.avatar_edit(id), |
75 | 75 … | api.avatar_action(id), |
76 | 76 … | h('div.profile__relationships.column', |
77 | 77 … | h('strong', 'follows'), |
modules_basic/follow.js | |||
---|---|---|---|
@@ -67,9 +67,9 @@ | |||
67 | 67 … | update() | |
68 | 68 … | }) | |
69 | 69 … | ||
70 | 70 … | var state = h('label') | |
71 | - var label = h('span') | ||
71 … | + var label = h('button.btn') | ||
72 | 72 … | ||
73 | 73 … | function update () { | |
74 | 74 … | state.textContent = ( | |
75 | 75 … | follows_you && you_follow ? 'friend' | |
@@ -78,8 +78,11 @@ | |||
78 | 78 … | : '' | |
79 | 79 … | ) | |
80 | 80 … | ||
81 | 81 … | label.textContent = you_follow ? 'unfollow' : 'follow' | |
82 … | + | ||
83 … | + var className = you_follow ? 'btn-warning' : 'btn-success' | ||
84 … | + label.classList.add(className) | ||
82 | 85 … | } | |
83 | 86 … | ||
84 | 87 … | return h('div', state, | |
85 | 88 … | h('a', {href:'#', onclick: function () { |
Built with git-ssb-web