From 1f4e2d0fd63c56db77a9341229b427703704f2bc Mon Sep 17 00:00:00 2001 From: Kris Aubuchon Date: Sat, 1 Nov 2014 22:58:18 -0400 Subject: [PATCH] adding last post/joined to usercard --- .../discourse/templates/user-card.hbs | 65 ++++++++++--------- app/assets/stylesheets/desktop/user-card.scss | 54 +++++++++------ 2 files changed, 70 insertions(+), 49 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/user-card.hbs b/app/assets/javascripts/discourse/templates/user-card.hbs index 600c37022..49b183074 100644 --- a/app/assets/javascripts/discourse/templates/user-card.hbs +++ b/app/assets/javascripts/discourse/templates/user-card.hbs @@ -7,7 +7,7 @@

- {{#link-to 'user' user}}{{username}}{{/link-to}} + {{#link-to 'user' user}}{{username}}{{{user.statusIcon}}}{{/link-to}}

{{#if user.name}} @@ -15,11 +15,7 @@ {{/if}} {{#if user.title}} - {{#if user.name}} -

/ {{user.title}}

- {{else}} -

{{user.title}}

- {{/if}} +

{{user.title}}

{{/if}} {{#if showName}} @@ -30,29 +26,6 @@ {{#if user}} - {{#if isSuspended}} -
- {{fa-icon "ban"}} - {{i18n user.suspended_notice date="user.suspendedTillDate"}}
- {{i18n user.suspended_reason}} {{user.suspend_reason}} -
- {{else}} - {{#if user.bio_cooked}}
{{{user.bio_cooked}}}
{{/if}} - {{/if}} - -{{#if showBadges}} -
- {{#each user.featured_user_badges}} - {{user-badge badge=badge}} - {{/each}} - {{#if showMoreBadges}} - {{#link-to 'user.badges' user class="btn more-user-badges"}} - {{i18n badges.more_badges count=moreBadgesCount}} - {{/link-to}} - {{/if}} -
-{{/if}} - + {{#if isSuspended}} +
+ {{fa-icon "ban"}} + {{i18n user.suspended_notice date="user.suspendedTillDate"}}
+ {{i18n user.suspended_reason}} {{user.suspend_reason}} +
+ {{else}} + {{#if user.bio_cooked}}
{{{user.bio_cooked}}}
{{/if}} + {{/if}} + {{#if user.card_badge}} {{#link-to 'badges.show' user.card_badge class="card-badge"}} {{icon-or-image user.card_badge.image}} {{/link-to}} {{/if}} + + + {{#if showBadges}} +
+ {{#each user.featured_user_badges}} + {{user-badge badge=badge}} + {{/each}} + {{#if showMoreBadges}} + {{#link-to 'user.badges' user class="btn more-user-badges"}} + {{i18n badges.more_badges count=moreBadgesCount}} + {{/link-to}} + {{/if}} +
+ {{/if}}
+ {{else}}

{{i18n loading}}

{{/if}} diff --git a/app/assets/stylesheets/desktop/user-card.scss b/app/assets/stylesheets/desktop/user-card.scss index 175110b4a..25758df71 100644 --- a/app/assets/stylesheets/desktop/user-card.scss +++ b/app/assets/stylesheets/desktop/user-card.scss @@ -14,9 +14,9 @@ min-height: 175px; .card-content { - padding: 12px; + padding: 12px 12px 0 12px; background: rgba($primary, .85); - margin-top: 85px; + margin-top: 80px; &:after { content: ''; @@ -53,6 +53,10 @@ a { color: $secondary; } + i { + font-size: 18px; + color: $secondary; + } } h2 { @@ -64,7 +68,6 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - display: inline; a { color: $secondary; } @@ -93,11 +96,12 @@ } .metadata { - position: absolute; - right: 20px; - top: 10px; - max-width: 180px; - text-align: right; + width: 100%; + clear: both; + h3 {display: inline; margin-right: 5px; } + div {display: inline; color: scale-color($primary, $lightness: 50%); + .group-link {color: scale-color($primary, $lightness: 50%);} + } } .bottom { @@ -106,11 +110,8 @@ } .bio { - max-height: 60px; - overflow: hidden; - float: left; - margin: 10px 0; - width: 70%; + padding: 15px 0 0 0; + clear: left; a { color: $secondary; text-decoration: underline; @@ -118,12 +119,17 @@ img { max-width: 100%; } + + .overflow { + max-height: 60px; + overflow: hidden; + } } img.avatar { float: left; padding-right: 10px; - margin-top: -60px; + margin-top: -53px; } p { @@ -142,9 +148,14 @@ .usercard-controls { list-style-type: none; - margin: 0; - position: absolute; - right: 12px; + float: right; + + &:after { + content: ''; + display: block; + clear: both; + + } a {width: 100%; min-width: 150px;} } @@ -161,6 +172,7 @@ height: 60px; position: relative; width: 45%; + margin-top: 11px; span { position: absolute; @@ -172,13 +184,15 @@ } .badge-section { - margin-top: 10px; float: left; - width: 390px; + width: 500px; + padding-bottom: 10px; + margin-top: 5px; .user-badge { background: transparent; - color: $secondary; + color: scale-color($primary, $lightness: 50%); + border-color: scale-color($primary, $lightness: 50%); }