UX: Improve icon positioning on mobile

This commit is contained in:
Robin Ward 2016-03-23 14:44:16 -04:00
parent f0552af5f1
commit e0347b18da
2 changed files with 9 additions and 3 deletions

View File

@ -75,7 +75,9 @@ class PluginApi {
* ``` * ```
**/ **/
addPosterIcon(cb) { addPosterIcon(cb) {
decorateWidget('poster-name:after', dec => { const mobileView = this.container.lookup('site:main').mobileView;
const loc = mobileView ? 'before' : 'after';
decorateWidget(`poster-name:${loc}`, dec => {
const attrs = dec.attrs; const attrs = dec.attrs;
const result = cb(attrs.userCustomFields || {}, attrs); const result = cb(attrs.userCustomFields || {}, attrs);
@ -102,7 +104,7 @@ class PluginApi {
} }
return dec.h('span', return dec.h('span.poster-icon',
{ className: result.className, attributes: { title: result.title } }, { className: result.className, attributes: { title: result.title } },
iconBody); iconBody);
} }

View File

@ -486,9 +486,13 @@ span.highlighted {
.names { .names {
margin: 5px 0 0 5px; margin: 5px 0 0 5px;
line-height: 17px; line-height: 17px;
span { span.full-name, span.user-title, span.username {
display: block; display: block;
} }
.poster-icon {
float: right;
}
} }
.post-info { .post-info {
float: right; float: right;