2019-02-13 04:14:23 -08:00
|
|
|
<template>
|
2019-03-05 10:54:49 -08:00
|
|
|
<div class="basic-user-card">
|
2019-02-13 04:14:23 -08:00
|
|
|
<router-link :to="userProfileLink(user)">
|
2019-02-25 19:49:50 -08:00
|
|
|
<UserAvatar class="avatar" @click.prevent.native="toggleUserExpanded" :src="user.profile_image_url"/>
|
2019-02-13 04:14:23 -08:00
|
|
|
</router-link>
|
2019-03-05 10:54:49 -08:00
|
|
|
<div class="basic-user-card-expanded-content" v-if="userExpanded">
|
2019-03-05 11:01:49 -08:00
|
|
|
<UserCard :user="user" :rounded="true" :bordered="true"/>
|
2019-02-13 04:14:23 -08:00
|
|
|
</div>
|
2019-03-05 10:54:49 -08:00
|
|
|
<div class="basic-user-card-collapsed-content" v-else>
|
|
|
|
<div :title="user.name" class="basic-user-card-user-name">
|
2019-02-27 08:58:29 -08:00
|
|
|
<span v-if="user.name_html" v-html="user.name_html"></span>
|
|
|
|
<span v-else>{{ user.name }}</span>
|
2019-02-13 04:14:23 -08:00
|
|
|
</div>
|
2019-02-27 08:58:29 -08:00
|
|
|
<div>
|
2019-03-05 10:54:49 -08:00
|
|
|
<router-link class="basic-user-card-screen-name" :to="userProfileLink(user)">
|
2019-02-27 08:58:29 -08:00
|
|
|
@{{user.screen_name}}
|
|
|
|
</router-link>
|
2019-02-13 04:14:23 -08:00
|
|
|
</div>
|
2019-02-27 08:58:29 -08:00
|
|
|
<slot></slot>
|
2019-02-13 04:14:23 -08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./basic_user_card.js"></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2019-03-05 10:54:49 -08:00
|
|
|
.basic-user-card {
|
2019-02-13 04:14:23 -08:00
|
|
|
display: flex;
|
|
|
|
flex: 1 0;
|
2019-03-04 23:32:23 -08:00
|
|
|
margin: 0;
|
2019-02-13 04:14:23 -08:00
|
|
|
padding-top: 0.6em;
|
|
|
|
padding-right: 1em;
|
|
|
|
padding-bottom: 0.6em;
|
|
|
|
padding-left: 1em;
|
|
|
|
border-bottom: 1px solid;
|
|
|
|
border-bottom-color: $fallback--border;
|
2019-02-20 08:22:01 -08:00
|
|
|
border-bottom-color: var(--border, $fallback--border);
|
2019-02-13 04:14:23 -08:00
|
|
|
|
2019-02-13 11:31:02 -08:00
|
|
|
&-collapsed-content {
|
|
|
|
margin-left: 0.7em;
|
|
|
|
text-align: left;
|
|
|
|
flex: 1;
|
2019-02-28 09:48:14 -08:00
|
|
|
min-width: 0;
|
2019-02-26 03:57:29 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-user-name {
|
|
|
|
img {
|
|
|
|
object-fit: contain;
|
|
|
|
height: 16px;
|
|
|
|
width: 16px;
|
|
|
|
vertical-align: middle;
|
2019-02-13 11:31:02 -08:00
|
|
|
}
|
|
|
|
}
|
2019-02-13 04:14:23 -08:00
|
|
|
|
2019-02-13 11:31:02 -08:00
|
|
|
&-expanded-content {
|
|
|
|
flex: 1;
|
2019-02-25 19:50:34 -08:00
|
|
|
margin-left: 0.7em;
|
2019-02-13 04:14:23 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|