diff --git a/app/assets/javascripts/discourse/controllers/user-card.js.es6 b/app/assets/javascripts/discourse/controllers/user-card.js.es6 index bcb11c85112..39d938b8c7b 100644 --- a/app/assets/javascripts/discourse/controllers/user-card.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-card.js.es6 @@ -27,6 +27,7 @@ export default Ember.Controller.extend({ showMoreBadges: Em.computed.gt('moreBadgesCount', 0), showDelete: Em.computed.and("viewingAdmin", "showName", "user.canBeDeleted"), linkWebsite: Em.computed.not('user.isBasic'), + hasLocationOrWebsite: Em.computed.or('user.location', 'user.website_name'), @computed('user.user_fields.@each.value') publicUserFields() { diff --git a/app/assets/javascripts/discourse/templates/user-card.hbs b/app/assets/javascripts/discourse/templates/user-card.hbs index 5c948b62bbe..5a348402d1c 100644 --- a/app/assets/javascripts/discourse/templates/user-card.hbs +++ b/app/assets/javascripts/discourse/templates/user-card.hbs @@ -55,22 +55,24 @@ {{/link-to}} {{/if}} -
- {{#if user.location}} - {{fa-icon "map-marker"}} {{user.location}} - {{/if}} + {{#if hasLocationOrWebsite}} +
+ {{#if user.location}} + {{fa-icon "map-marker"}} {{user.location}} + {{/if}} - {{#if user.website_name}} - - {{fa-icon "globe"}} - {{#if linkWebsite}} - {{user.website_name}} - {{else}} - {{user.website_name}} - {{/if}} - - {{/if}} -
+ {{#if user.website_name}} + + {{fa-icon "globe"}} + {{#if linkWebsite}} + {{user.website_name}} + {{else}} + {{user.website_name}} + {{/if}} + + {{/if}} +
+ {{/if}} {{#if user}}
diff --git a/app/assets/stylesheets/desktop/user-card.scss b/app/assets/stylesheets/desktop/user-card.scss index 9181f02f2ca..2980ef2cf18 100644 --- a/app/assets/stylesheets/desktop/user-card.scss +++ b/app/assets/stylesheets/desktop/user-card.scss @@ -159,9 +159,13 @@ $user_card_background: #222; } } - .website-name { - a { - color: $user_card_primary; + .location-and-website { + clear: left; + + .website-name { + a { + color: $user_card_primary; + } } }