UX: Fix user onebox layout (#21284)

This commit is contained in:
Penar Musaraj 2023-04-28 09:50:49 -04:00 committed by GitHub
parent 69696843c6
commit a67c96438c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -268,6 +268,16 @@ aside.onebox {
.location { .location {
margin-right: 10px; margin-right: 10px;
} }
.user-onebox--joined {
color: var(--primary-medium);
margin-top: 10px;
}
.aspect-image {
width: 80px;
height: 80px;
float: left;
margin-right: 1em;
}
} }
// instagram + reddit fixes // instagram + reddit fixes

View File

@ -1,7 +1,7 @@
<aside class="onebox"> <aside class="onebox">
<article class="onebox-body user-onebox"> <article class="onebox-body user-onebox">
{{{avatar}}} {{{avatar}}}
<h3><a href="{{original_url}}">{{{username}}}</a></h3> <h3><a href="{{original_url}}">@{{{username}}}</a></h3>
<div> <div>
{{#name}} {{#name}}
<span class="full-name">{{name}}</span> <span class="full-name">{{name}}</span>
@ -26,7 +26,7 @@
{{#bio}} {{#bio}}
<p>{{{bio}}}</p> <p>{{{bio}}}</p>
{{/bio}} {{/bio}}
<span>{{joined}}</span> <div class="user-onebox--joined">{{joined}}</div>
</article> </article>
<div class="clearfix"></div> <div class="clearfix"></div>
</aside> </aside>

View File

@ -455,7 +455,7 @@ module Oneboxer
args = { args = {
user_id: user.id, user_id: user.id,
username: user.username, username: user.username,
avatar: PrettyText.avatar_img(user.avatar_template, "extra_large"), avatar: PrettyText.avatar_img(user.avatar_template, "huge"),
name: name, name: name,
bio: user.user_profile.bio_excerpt(230), bio: user.user_profile.bio_excerpt(230),
location: Onebox::Helpers.sanitize(user.user_profile.location), location: Onebox::Helpers.sanitize(user.user_profile.location),