Fix user page display on mobile

This commit is contained in:
Toby Zerner 2015-07-23 20:24:05 +09:30
parent c8e6fbc338
commit b01b4b04d3
4 changed files with 8 additions and 6 deletions

View File

@ -27,6 +27,7 @@ export default class UserCard extends Component {
const user = this.props.user;
const controls = UserControls.controls(user, this).toArray();
const color = user.color();
const badges = user.badges().toArray();
return (
<div className={'UserCard ' + (this.props.className || '')}
@ -53,9 +54,11 @@ export default class UserCard extends Component {
)}
</h2>
<ul className="UserCard-badges badges">
{listItems(user.badges().toArray())}
</ul>
{badges.length ? (
<ul className="UserCard-badges badges">
{listItems(badges)}
</ul>
) : ''}
<ul className="UserCard-info">
{listItems(this.infoItems().toArray())}

View File

@ -89,8 +89,7 @@ export default class UserPage extends Component {
* Given a username, load the user's profile from the store, or make a request
* if we don't have it yet. Then initialize the profile page with that user.
*
* @param {[type]} username [description]
* @return {[type]}
* @param {String} username
*/
loadUser(username) {
const lowercaseUsername = username.toLowerCase();

View File

@ -47,6 +47,7 @@
margin-left: -130px;
@media @phone {
display: block;
float: none;
margin: 0 auto 20px;
width: 64px + 8px;

View File

@ -1,4 +1,3 @@
.UserPage {
.UserCard-controls {
float: right;