2019-02-02 11:11:36 -08:00
|
|
|
<template>
|
2019-02-05 07:17:50 -08:00
|
|
|
<StillImage
|
|
|
|
class="avatar"
|
2019-05-01 07:33:56 -07:00
|
|
|
:alt="user.screen_name"
|
|
|
|
:title="user.screen_name"
|
|
|
|
:src="user.profile_image_url_original"
|
2019-02-05 07:17:50 -08:00
|
|
|
:class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
|
2019-07-05 00:17:44 -07:00
|
|
|
:image-load-error="imageLoadError"
|
2019-02-05 07:17:50 -08:00
|
|
|
/>
|
2019-02-02 11:11:36 -08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./user_avatar.js"></script>
|
2019-02-02 11:33:13 -08:00
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.avatar.still-image {
|
|
|
|
width: 48px;
|
|
|
|
height: 48px;
|
|
|
|
box-shadow: var(--avatarStatusShadow);
|
|
|
|
border-radius: $fallback--avatarRadius;
|
|
|
|
border-radius: var(--avatarRadius, $fallback--avatarRadius);
|
2019-02-02 12:33:02 -08:00
|
|
|
|
|
|
|
img {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2019-02-02 11:33:13 -08:00
|
|
|
|
|
|
|
&.better-shadow {
|
|
|
|
box-shadow: var(--avatarStatusShadowInset);
|
|
|
|
filter: var(--avatarStatusShadowFilter)
|
|
|
|
}
|
|
|
|
|
|
|
|
&.animated::before {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2019-02-02 12:33:02 -08:00
|
|
|
&.avatar-compact {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: $fallback--avatarAltRadius;
|
|
|
|
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
2019-02-02 11:33:13 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|