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 user = this.props.user;
const controls = UserControls.controls(user, this).toArray(); const controls = UserControls.controls(user, this).toArray();
const color = user.color(); const color = user.color();
const badges = user.badges().toArray();
return ( return (
<div className={'UserCard ' + (this.props.className || '')} <div className={'UserCard ' + (this.props.className || '')}
@ -53,9 +54,11 @@ export default class UserCard extends Component {
)} )}
</h2> </h2>
<ul className="UserCard-badges badges"> {badges.length ? (
{listItems(user.badges().toArray())} <ul className="UserCard-badges badges">
</ul> {listItems(badges)}
</ul>
) : ''}
<ul className="UserCard-info"> <ul className="UserCard-info">
{listItems(this.infoItems().toArray())} {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 * 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. * if we don't have it yet. Then initialize the profile page with that user.
* *
* @param {[type]} username [description] * @param {String} username
* @return {[type]}
*/ */
loadUser(username) { loadUser(username) {
const lowercaseUsername = username.toLowerCase(); const lowercaseUsername = username.toLowerCase();

View File

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

View File

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