mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
UX: Improve icon positioning on mobile
This commit is contained in:
parent
f0552af5f1
commit
e0347b18da
2 changed files with 9 additions and 3 deletions
|
@ -75,7 +75,9 @@ class PluginApi {
|
|||
* ```
|
||||
**/
|
||||
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 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 } },
|
||||
iconBody);
|
||||
}
|
||||
|
|
|
@ -486,9 +486,13 @@ span.highlighted {
|
|||
.names {
|
||||
margin: 5px 0 0 5px;
|
||||
line-height: 17px;
|
||||
span {
|
||||
span.full-name, span.user-title, span.username {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.poster-icon {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
.post-info {
|
||||
float: right;
|
||||
|
|
Loading…
Reference in a new issue