some more improvements. changed the way user-card is layout, but should look the

same, except that longer user names should be properly ellipsis-ed.
This commit is contained in:
Henry Jameson 2018-04-08 04:23:43 +03:00
parent 59a05081c5
commit 38d366f9aa
3 changed files with 25 additions and 20 deletions

View File

@ -64,6 +64,10 @@
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg, $fallback--bg) 80%) background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--bg, $fallback--bg) 80%)
} }
time {
white-space: nowrap;
}
.text { .text {
min-width: 0px; min-width: 0px;
word-wrap: break-word; word-wrap: break-word;

View File

@ -7,7 +7,7 @@
<user-card-content :user="user" :switcher="false"></user-card-content> <user-card-content :user="user" :switcher="false"></user-card-content>
</div> </div>
<div class="name-and-screen-name" v-else> <div class="name-and-screen-name" v-else>
<div class="user-name"> <div :title="user.name" class="user-name">
{{ user.name }} {{ user.name }}
<span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you"> <span class="follows-you" v-if="!userExpanded && showFollows && user.follows_you">
{{ $t('user_card.follows_you') }} {{ $t('user_card.follows_you') }}
@ -26,7 +26,6 @@
.name-and-screen-name { .name-and-screen-name {
margin-left: 0.7em; margin-left: 0.7em;
margin-top:0.0em; margin-top:0.0em;
margin-right: 2em;
text-align: left; text-align: left;
width: 100%; width: 100%;
} }

View File

@ -9,9 +9,8 @@
<router-link :to="{ name: 'user-profile', params: { id: user.id } }"> <router-link :to="{ name: 'user-profile', params: { id: user.id } }">
<StillImage class="avatar" :src="user.profile_image_url_original"/> <StillImage class="avatar" :src="user.profile_image_url_original"/>
</router-link> </router-link>
<span class="glyphicon glyphicon-user"></span>
<div class="name-and-screen-name"> <div class="name-and-screen-name">
<div class='user-name'>{{user.name}}</div> <div :title="user.name" class='user-name'>{{user.name}}</div>
<router-link :to="{ name: 'user-profile', params: { id: user.id } }"> <router-link :to="{ name: 'user-profile', params: { id: user.id } }">
<div class='user-screen-name'>@{{user.screen_name}}</div> <div class='user-screen-name'>@{{user.screen_name}}</div>
</router-link> </router-link>
@ -125,13 +124,8 @@
.container { .container {
padding: 16px 10px 4px 10px; padding: 16px 10px 4px 10px;
display: flex; display: flex;
flex-wrap: wrap;
flex-direction: column;
align-content: flex-start;
justify-content: center;
max-height: 56px; max-height: 56px;
overflow: hidden; overflow: hidden;
}
.avatar { .avatar {
border-radius: $fallback--avatarRadius; border-radius: $fallback--avatarRadius;
@ -146,6 +140,7 @@
display: none; display: none;
} }
} }
}
&:hover .animated.avatar { &:hover .animated.avatar {
canvas { canvas {
@ -158,16 +153,24 @@
text-shadow: 0px 1px 1.5px rgba(0, 0, 0, 1.0); text-shadow: 0px 1px 1.5px rgba(0, 0, 0, 1.0);
.usersettings {
color: #fff;
opacity: .8;
}
.name-and-screen-name { .name-and-screen-name {
display: block; display: block;
margin-left: 0.6em; margin-left: 0.6em;
text-align: left; text-align: left;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
flex: 1 1 0;
} }
.user-name{ .user-name{
color: white; color: white;
text-overflow: ellipsis;
overflow: hidden;
} }
.user-screen-name { .user-screen-name {
@ -175,7 +178,6 @@
font-weight: lighter; font-weight: lighter;
font-size: 15px; font-size: 15px;
padding-right: 0.1em; padding-right: 0.1em;
flex: 0 0 auto;
} }
.user-interactions { .user-interactions {