2019-02-03 06:11:36 +11:00
|
|
|
<template>
|
2019-02-06 02:17:50 +11:00
|
|
|
<StillImage
|
|
|
|
class="avatar"
|
|
|
|
:class="{ 'avatar-compact': compact, 'better-shadow': betterShadow }"
|
|
|
|
:src="imgSrc"
|
|
|
|
:imageLoadError="imageLoadError"
|
|
|
|
/>
|
2019-02-03 06:11:36 +11:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./user_avatar.js"></script>
|
2019-02-03 06:33:13 +11: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-03 07:33:02 +11:00
|
|
|
|
|
|
|
img {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
2019-02-03 06:33:13 +11:00
|
|
|
|
|
|
|
&.better-shadow {
|
|
|
|
box-shadow: var(--avatarStatusShadowInset);
|
|
|
|
filter: var(--avatarStatusShadowFilter)
|
|
|
|
}
|
|
|
|
|
|
|
|
&.animated::before {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2019-02-03 07:33:02 +11:00
|
|
|
&.avatar-compact {
|
|
|
|
width: 32px;
|
|
|
|
height: 32px;
|
|
|
|
border-radius: $fallback--avatarAltRadius;
|
|
|
|
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
2019-02-03 06:33:13 +11:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|